My Project
Public Member Functions | Static Public Member Functions | List of all members
ParaEngine::CFileReplaceMap Class Reference

mapping a file to another file a replace file mapping. More...

#include <AssetManifest.h>

Public Member Functions

 CFileReplaceMap (const string &filename, bool bReplaceExistingOnes=true)
 
void LoadReplaceFile (const string &filename, bool bReplaceExistingOnes=true)
 
bool IsEmpty ()
 whether there is no files in the file. More...
 
bool ReplaceFile (string &inout)
 Replace file. More...
 

Static Public Member Functions

static CFileReplaceMapGetSingleton ()
 get a global singleton instance. More...
 

Detailed Description

mapping a file to another file a replace file mapping.

it is just file name to file name pairs. If the file is requested on the left during GetFile(filename), file on the right is returned instead. This function is very useful to temperarily change the 3D and 2D theme of the entire game world, in which only a text file needs to be updated. Example: CFileReplaceMap::GetSingleton().ReplaceFile(filename);

Member Function Documentation

§ GetSingleton()

CFileReplaceMap & CFileReplaceMap::GetSingleton ( )
static

get a global singleton instance.

§ IsEmpty()

bool CFileReplaceMap::IsEmpty ( )

whether there is no files in the file.

§ ReplaceFile()

bool CFileReplaceMap::ReplaceFile ( string &  inout)

Replace file.

Parameters
inoutthe file name to replace. the replaced file will also be written to it after function returns.
Returns
true if file is replaced. or false if not.

The documentation for this class was generated from the following files: