Crossfire Server, Trunk
ModifiedAssetsManager< T > Class Template Reference

#include <ModifiedAssetsManager.h>

+ Inheritance diagram for ModifiedAssetsManager< T >:
+ Collaboration diagram for ModifiedAssetsManager< T >:

Public Member Functions

void assetDefined (const T *asset, const std::string &filename)
 
void assetModified (T *asset)
 
std::vector< T * > dirtyAssetsWithNoOrigin () const
 
std::vector< std::string > files () const
 
bool hasPendingChanges () const
 
 ModifiedAssetsManager (AssetWriter< T > *writer)
 
std::string originOf (const T *asset) const
 
const std::map< std::string, std::set< const T * > > & origins () const
 
void saveModifiedAssets ()
 
virtual ~ModifiedAssetsManager ()
 

Protected Member Functions

void write (const std::string &filename, std::set< const T * > assets)
 

Private Attributes

std::set< T * > myDirty
 
std::map< std::string, std::set< const T * > > myOrigins
 
AssetWriter< T > * myWriter
 

Detailed Description

template<class T>
class ModifiedAssetsManager< T >

Definition at line 24 of file ModifiedAssetsManager.h.

Constructor & Destructor Documentation

◆ ModifiedAssetsManager()

template<class T >
ModifiedAssetsManager< T >::ModifiedAssetsManager ( AssetWriter< T > *  writer)
inline

Definition at line 26 of file ModifiedAssetsManager.h.

◆ ~ModifiedAssetsManager()

template<class T >
virtual ModifiedAssetsManager< T >::~ModifiedAssetsManager ( )
inlinevirtual

Definition at line 27 of file ModifiedAssetsManager.h.

Member Function Documentation

◆ assetDefined()

template<class T >
void ModifiedAssetsManager< T >::assetDefined ( const T *  asset,
const std::string &  filename 
)
inline

Definition at line 48 of file ModifiedAssetsManager.h.

Referenced by ResourcesManager::assetDefined().

+ Here is the caller graph for this function:

◆ assetModified()

template<class T >
void ModifiedAssetsManager< T >::assetModified ( T *  asset)
inline

Definition at line 55 of file ModifiedAssetsManager.h.

Referenced by ResourcesManager::generalMessageModified(), and ResourcesManager::questModified().

+ Here is the caller graph for this function:

◆ dirtyAssetsWithNoOrigin()

template<class T >
std::vector<T *> ModifiedAssetsManager< T >::dirtyAssetsWithNoOrigin ( ) const
inline

Return the list of modified assets which has no origin defined.

Returns
list of assets.

Definition at line 75 of file ModifiedAssetsManager.h.

◆ files()

template<class T >
std::vector<std::string> ModifiedAssetsManager< T >::files ( ) const
inline

Definition at line 31 of file ModifiedAssetsManager.h.

Referenced by ModifiedAssetsManager< archt >::files(), and ResourcesManager::questFiles().

+ Here is the caller graph for this function:

◆ hasPendingChanges()

template<class T >
bool ModifiedAssetsManager< T >::hasPendingChanges ( ) const
inline

Definition at line 69 of file ModifiedAssetsManager.h.

Referenced by ResourcesManager::hasPendingChanges().

+ Here is the caller graph for this function:

◆ originOf()

template<class T >
std::string ModifiedAssetsManager< T >::originOf ( const T *  asset) const
inline

Definition at line 39 of file ModifiedAssetsManager.h.

Referenced by ResourcesManager::originOfQuest().

+ Here is the caller graph for this function:

◆ origins()

template<class T >
const std::map<std::string, std::set<const T*> >& ModifiedAssetsManager< T >::origins ( ) const
inline

Definition at line 29 of file ModifiedAssetsManager.h.

Referenced by ResourcesManager::questOrigins().

+ Here is the caller graph for this function:

◆ saveModifiedAssets()

template<class T >
void ModifiedAssetsManager< T >::saveModifiedAssets ( )
inline

Definition at line 57 of file ModifiedAssetsManager.h.

Referenced by ResourcesManager::saveGeneralMessages(), and ResourcesManager::saveQuests().

+ Here is the caller graph for this function:

◆ write()

template<class T >
void ModifiedAssetsManager< T >::write ( const std::string &  filename,
std::set< const T * >  assets 
)
inlineprotected

Definition at line 84 of file ModifiedAssetsManager.h.

Referenced by ModifiedAssetsManager< archt >::saveModifiedAssets().

+ Here is the caller graph for this function:

Field Documentation

◆ myDirty

◆ myOrigins

◆ myWriter


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