Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/asset/db.hpp"
Implementation of the registry holding all Asset instances known to the Asset Manager subsystem.
As of 8/2007 implemented by a hashtable.
Public Member Functions | |
void | asList (list< PcAsset > &output) const |
intended for diagnostics | |
void | clear () |
removes all registered assets and does something similar to Asset::unlink() on each to break cyclic dependencies (we can't use the real unlink()-function, because this will propagate, including calls to the AssetManager. More... | |
bool | del (ID< Asset > hash) |
template<class KIND > | |
lib::P< KIND > | get (ID< KIND > hash) const |
template<class KIND > | |
void | put (ID< KIND > hash, lib::P< KIND > &ptr) |
void | put (ID< Asset > hash, PAsset &ptr) |
Friends | |
class | lib::DependencyFactory< DB > |
Private Member Functions | |
const PAsset & | find (size_t hash) const |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
Private Attributes | |
IdHashtable | table |
Additional Inherited Members | |
Static Public Member Functions inherited from Sync< CONF > | |
static Monitor & | getMonitor (Sync const *forThis) |
|
inline |
removes all registered assets and does something similar to Asset::unlink() on each to break cyclic dependencies (we can't use the real unlink()-function, because this will propagate, including calls to the AssetManager.
As the destructor of DB needs to call clear(), this could result in segfaults. This doesn't seem to be a problem, though, because we register and process all assets and the net effect is just breaking any cyclic dependencies)