#include <db.hpp>
Public Member Functions | |
| void | asList (list< PcAsset > &output) const |
| intended for diagnostics | |
| void | clear () throw () |
| 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. | |
| bool | del (ID< Asset > hash) |
| template<class KIND> | |
| P< KIND > | get (ID< KIND > hash) const |
| void | put (ID< Asset > hash, PAsset &ptr) |
| template<class KIND> | |
| void | put (ID< KIND > hash, P< KIND > &ptr) |
Private Member Functions | |
| const PAsset & | find (size_t hash) const |
Private Attributes | |
| IdHashtable | table |
Friends | |
| class | lumiera::singleton::StaticCreate< DB > |
Definition at line 86 of file db.hpp.
| void asset::DB::clear | ( | ) | throw () [inline] |
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)
Definition at line 120 of file db.hpp.
References lumiera::Error::what().
00121 { 00122 try 00123 { 00124 IdHashtable::iterator i = table.begin(); 00125 IdHashtable::iterator e = table.end(); 00126 for ( ; i!=e ; ++i ) 00127 i->second->dependants.clear(); 00128 00129 table.clear(); 00130 } 00131 catch (lumiera::Error& EX) 00132 { 00133 WARN (oper, "Problems while clearing Asset registry: %s", EX.what()); 00134 } 00135 catch (...) 00136 { 00137 ERROR (oper, "Serious trouble while clearing Asset registry."); 00138 } }

1.5.5