Lumiera  0.pre.03
»edit your freedom«
DB Class Reference

#include "steam/asset/db.hpp"

Description

Implementation of the registry holding all Asset instances known to the Asset Manager subsystem.

As of 8/2007 implemented by a hashtable.

Definition at line 98 of file db.hpp.

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 PAssetfind (size_t hash) const
 
- Private Member Functions inherited from NonCopyable
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Private Attributes

IdHashtable table
 

Additional Inherited Members

- Static Public Member Functions inherited from Sync< CONF >
static MonitorgetMonitor (Sync const *forThis)
 

Member Function Documentation

◆ clear()

void clear ( )
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)

Note
EX_FREE

Definition at line 155 of file db.hpp.

+ Inheritance diagram for DB:
+ Collaboration diagram for DB:

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