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(), and ResourcesManager::saveTreasures().

+ Here is the caller graph for this function:

◆ assetModified()

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

◆ 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.

Referenced by ResourcesManager::saveTreasures().

+ Here is the caller graph for this function:

◆ files()

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

◆ 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::originOf(), and 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::origins(), and ResourcesManager::questOrigins().

+ Here is the caller graph for this function:

◆ saveModifiedAssets()

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

◆ 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< Animations >::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: