Skip to content

Commit

Permalink
Refactor: Renamed *MetaFile => *Manifest
Browse files Browse the repository at this point in the history
Applied this rename refactoring as discussed.
  • Loading branch information
danij-deng committed Dec 4, 2012
1 parent ed8169a commit 2c4f11b
Show file tree
Hide file tree
Showing 21 changed files with 387 additions and 386 deletions.
6 changes: 3 additions & 3 deletions doomsday/engine/engine.pro
Expand Up @@ -187,7 +187,7 @@ DENG_HEADERS += \
include/filesys/fs_main.h \
include/filesys/fs_util.h \
include/filesys/lumpindex.h \
include/filesys/metafile.h \
include/filesys/manifest.h \
include/filesys/searchpath.h \
include/filesys/sys_direc.h \
include/filesys/sys_findfile.h \
Expand Down Expand Up @@ -306,7 +306,7 @@ DENG_HEADERS += \
include/resource/r_data.h \
include/resource/rawtexture.h \
include/resource/texture.h \
include/resource/texturemetafile.h \
include/resource/texturemanifest.h \
include/resource/textures.h \
include/resource/texturevariant.h \
include/resource/texturevariantspecification.h \
Expand Down Expand Up @@ -476,7 +476,7 @@ SOURCES += \
src/filesys/fs_scheme.cpp \
src/filesys/fs_util.cpp \
src/filesys/lumpindex.cpp \
src/filesys/metafile.cpp \
src/filesys/manifest.cpp \
src/filesys/searchpath.cpp \
src/filesys/sys_direc.c \
src/game.cpp \
Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/include/de_filesys.h
Expand Up @@ -32,7 +32,7 @@
#include "filesys/fs_main.h"
#include "filesys/fs_util.h"
#include "filesys/lumpindex.h"
#include "filesys/metafile.h"
#include "filesys/manifest.h"
#include "filesys/sys_direc.h"
#include "filesys/sys_findfile.h"

Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/include/de_resource.h
Expand Up @@ -38,7 +38,7 @@
#include "resource/zip.h"

#ifdef __cplusplus
# include "resource/texturemetafile.h"
# include "resource/texturemanifest.h"
#endif

#endif /* LIBDENG_RESOURCE_SUBSYSTEM_H */
@@ -1,7 +1,7 @@
/**
* @file metafile.h
* @file manifest.h
*
* Metafile. @ingroup fs
* Manifest. @ingroup fs
*
* @author Copyright &copy; 2010-2012 Daniel Swanson <danij@dengine.net>
* @author Copyright &copy; 2010-2012 Jaakko Keränen <jaakko.keranen@iki.fi>
Expand All @@ -21,8 +21,8 @@
* 02110-1301 USA</small>
*/

#ifndef LIBDENG_METAFILE_H
#define LIBDENG_METAFILE_H
#ifndef LIBDENG_MANIFEST_H
#define LIBDENG_MANIFEST_H

#ifdef __cplusplus

Expand All @@ -39,16 +39,16 @@ namespace de
*
* @ingroup core
*/
class MetaFile
class Manifest
{
public:
/**
* @param rClass Class for the associated resource.
* @param fFlags @ref fileFlags
* @param name An expected name for the associated file.
*/
MetaFile(resourceclassid_t rClass, int fFlags, String* name = 0);
~MetaFile();
Manifest(resourceclassid_t rClass, int fFlags, String* name = 0);
~Manifest();

/// @return Class of the associated resource.
resourceclassid_t resourceClass() const;
Expand All @@ -66,12 +66,12 @@ namespace de
* Attempt to locate this file by systematically resolving and then
* checking each search path.
*/
MetaFile& locateFile();
Manifest& locateFile();

/**
* "Forget" the currently located file if one has been found.
*/
MetaFile& forgetFile();
Manifest& forgetFile();

/**
* Attempt to resolve a path to (and maybe locate) this file.
Expand All @@ -85,29 +85,29 @@ namespace de
String const& resolvedPath(bool tryLocate = true);

/**
* Add a new file segment identity key to the list for this metafile.
* Add a new file segment identity key to the list for this manifest.
*
* @param newIdentityKey New identity key (e.g., a lump/file name).
* @param didAdd If not @c =0, the outcome will be written here.
*/
MetaFile& addIdentityKey(String newIdentityKey, bool* didAdd = 0);
Manifest& addIdentityKey(String newIdentityKey, bool* didAdd = 0);

/**
* Add a new file name to the list of names for this metafile.
* Add a new file name to the list of names for this manifest.
*
* @param newName New name for this file. Newer names have precedence.
* @param didAdd If not @c =0, the outcome will be written here.
*/
MetaFile& addName(String newName, bool* didAdd = 0);
Manifest& addName(String newName, bool* didAdd = 0);

/**
* Print information about a file to the console.
*
* @param metafile Metafile for the file.
* @param manifest Manifest for the file.
* @param showStatus @c true = print loaded/located status for the
* associated file.
*/
static void consolePrint(MetaFile& metafile, bool showStatus = true);
static void consolePrint(Manifest& manifest, bool showStatus = true);

private:
struct Instance;
Expand All @@ -118,4 +118,4 @@ namespace de

#endif // __cplusplus

#endif /* LIBDENG_METAFILE_H */
#endif /* LIBDENG_MANIFEST_H */
22 changes: 11 additions & 11 deletions doomsday/engine/include/game.h
Expand Up @@ -44,7 +44,7 @@ extern "C" {
#define PGF_EVERYTHING (PGF_BANNER|PGF_STATUS|PGF_LIST_STARTUP_RESOURCES|PGF_LIST_OTHER_RESOURCES)
///@}

struct metafile_s;
struct manifest_s;
struct gamedef_s;

#ifdef __cplusplus
Expand All @@ -58,7 +58,7 @@ struct gamedef_s;
namespace de {

class File1;
class MetaFile;
class Manifest;
class GameCollection;

/**
Expand All @@ -70,7 +70,7 @@ class GameCollection;
class Game
{
public:
typedef QMultiMap<resourceclassid_t, MetaFile*> MetaFiles;
typedef QMultiMap<resourceclassid_t, Manifest*> Manifests;

public:
/**
Expand Down Expand Up @@ -111,20 +111,20 @@ class Game
Game& setPluginId(pluginid_t newId);

/**
* Add a new metafile to the list of metafiles.
* Add a new manifest to the list of manifests.
*
* @note Registration order defines load order (among files of the same class).
*
* @param metafile MetaFile to add.
* @param manifest Manifest to add.
*/
Game& addMetafile(MetaFile& metafile);
Game& addManifest(Manifest& manifest);

bool allStartupFilesFound() const;

/**
* Provides access to the metafiles for efficent traversals.
* Provides access to the manifests for efficent traversals.
*/
MetaFiles const& metafiles() const;
Manifests const& manifests() const;

/**
* Is @a file required by this game? This decision is made by comparing the
Expand Down Expand Up @@ -193,7 +193,7 @@ class NullGame : public Game
public:
NullGame();

Game& addMetafile(struct metafile_s& /*record*/) {
Game& addManifest(struct manifest_s& /*record*/) {
throw NullObjectError("NullGame::addResource", "Invalid action on null-object");
}

Expand All @@ -205,7 +205,7 @@ class NullGame : public Game
return true; // Always.
}

struct metafile_s* const* metafiles(resourceclassid_t /*classId*/, int* /*count*/) const {
struct manifest_s* const* manifests(resourceclassid_t /*classId*/, int* /*count*/) const {
return 0;
}

Expand Down Expand Up @@ -237,7 +237,7 @@ void Game_Delete(Game* game);

boolean Game_IsNullObject(Game const* game);

struct game_s* Game_AddMetafile(Game* game, struct metafile_s* record);
struct game_s* Game_AddManifest(Game* game, struct manifest_s* record);

boolean Game_AllStartupFilesFound(Game const* game);

Expand Down
8 changes: 4 additions & 4 deletions doomsday/engine/include/resource/texture.h
@@ -1,9 +1,9 @@
/**
* @file texture.h
* Abstract Texture component used to model a logical texture. @ingroup resource
* @file texture.h Logical Texture
* @ingroup resource
*
* @authors Copyright &copy; 2003-2012 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright &copy; 2005-2012 Daniel Swanson <danij@dengine.net>
* @author Copyright &copy; 2003-2012 Jaakko Keränen <jaakko.keranen@iki.fi>
* @author Copyright &copy; 2005-2012 Daniel Swanson <danij@dengine.net>
*
* @par License
* GPL: http://www.gnu.org/licenses/gpl.html
Expand Down
@@ -1,5 +1,5 @@
/**
* @file texturemetafile.h
* @file texturemanifest.h
* @ingroup resource
*
* @author Copyright &copy; 2010-2012 Daniel Swanson <danij@dengine.net>
Expand All @@ -19,8 +19,8 @@
* 02110-1301 USA</small>
*/

#ifndef LIBDENG_RESOURCE_TEXTUREMETAFILE_H
#define LIBDENG_RESOURCE_TEXTUREMETAFILE_H
#ifndef LIBDENG_RESOURCE_TEXTUREMANIFEST_H
#define LIBDENG_RESOURCE_TEXTUREMANIFEST_H

#include <QList>
#include <de/PathTree>
Expand All @@ -36,14 +36,14 @@ class Textures;
* Models a texture reference and the associated metadata for a resource
* in the Textures collection.
*/
class TextureMetaFile : public PathTree::Node
class TextureManifest : public PathTree::Node
{
public:
TextureMetaFile(PathTree::NodeArgs const &args);
virtual ~TextureMetaFile();
TextureManifest(PathTree::NodeArgs const &args);
virtual ~TextureManifest();

/**
* Interpret the TextureMetaFile creating a new logical Texture instance.
* Interpret the TextureManifest creating a new logical Texture instance.
*
* @param dimensions Logical dimensions. Components can be @c 0 in which
* case their value will be inherited from the actual
Expand All @@ -59,30 +59,30 @@ class TextureMetaFile : public PathTree::Node
Texture *define(Texture::Flags flags);

/**
* Returns the owning scheme of the TextureMetaFile.
* Returns the owning scheme of the TextureManifest.
*/
Textures::Scheme &scheme() const;

/**
* Compose a URI of the form "scheme:path" for the TextureMetaFile.
* Compose a URI of the form "scheme:path" for the TextureManifest.
*
* The scheme component of the URI will contain the symbolic name of
* the scheme for the TextureMetaFile.
* the scheme for the TextureManifest.
*
* The path component of the URI will contain the percent-encoded path
* of the TextureMetaFile.
* of the TextureManifest.
*/
Uri composeUri(QChar sep = '/') const;

/**
* Compose a URN of the form "urn:scheme:uniqueid" for the texture
* TextureMetaFile.
* TextureManifest.
*
* The scheme component of the URI will contain the identifier 'urn'.
*
* The path component of the URI is a string which contains both the
* symbolic name of the scheme followed by the unique id of the texture
* TextureMetaFile, separated with a colon.
* TextureManifest, separated with a colon.
*
* @see uniqueId(), setUniqueId()
*/
Expand All @@ -94,33 +94,33 @@ class TextureMetaFile : public PathTree::Node
Uri const &resourceUri() const;

/**
* Change the resource URI associated with the metafile.
* Change the resource URI associated with the manifest.
*
* @return @c true iff @a newUri differed to the existing URI, which
* was subsequently changed.
*/
bool setResourceUri(Uri const &newUri);

/**
* Returns the logical Texture instance associated with the metafile;
* Returns the logical Texture instance associated with the manifest;
* otherwise @c 0.
*/
Texture *texture() const;

/**
* Change the logical Texture associated with the metafile.
* Change the logical Texture associated with the manifest.
*
* @param newTexture New logical Texture to associate.
*/
void setTexture(Texture *newTexture);

/**
* Returns the scheme-unique identifier for the metafile.
* Returns the scheme-unique identifier for the manifest.
*/
int uniqueId() const;

/**
* Change the unique identifier associated with the metafile.
* Change the unique identifier associated with the manifest.
*
* @return @c true iff @a newUniqueId differed to the existing unique
* identifier, which was subsequently changed.
Expand All @@ -146,4 +146,4 @@ class TextureMetaFile : public PathTree::Node

} // namespace de

#endif /// LIBDENG_RESOURCE_TEXTUREMETAFILE_H
#endif /// LIBDENG_RESOURCE_TEXTUREMANIFEST_H

0 comments on commit 2c4f11b

Please sign in to comment.