32 #include <unordered_map> 34 #include <boost/utility.hpp> 40 using std::static_pointer_cast;
41 using std::dynamic_pointer_cast;
44 using lib::RecursiveLock_NoWait;
53 boost::hash_combine(hash, idi.org);
54 boost::hash_combine(hash, idi.name);
55 boost::hash_combine(hash, idi.category);
73 :
public std::unary_function<size_t, size_t>
76 operator() (
size_t val)
const {
return val; }
79 typedef std::unordered_map<size_t, PAsset, IdentityHash> IdHashtable;
91 ,
public Sync<RecursiveLock_NoWait>
112 return dynamic_pointer_cast<KIND,
Asset> (find (hash));
119 table[hash] = static_pointer_cast (ptr);
131 return table.erase (hash);
149 IdHashtable::iterator i = table.begin();
150 IdHashtable::iterator e = table.end();
152 i->second->dependants.clear();
163 IdHashtable::const_iterator i = table.begin();
164 IdHashtable::const_iterator e = table.end();
166 output.push_back (i->second);
172 find (
size_t hash)
const 174 static const PAsset NULLP;
175 IdHashtable::const_iterator i = table.find (hash);
176 if (i == table.end())
Facility for monitor object based locking.
#define ERROR_LOG_AND_IGNORE(_FLAG_, _OP_DESCR_)
convenience shortcut for a sequence of catch blocks just logging and consuming an error...
Any copy and copy construction prohibited.
Per type specific configuration of instances created as service dependencies.
trivial hash functor returns any hash value unmodified.
Steam-Layer implementation namespace root.
Object Monitor based synchronisation.
Implementation of the registry holding all Asset instances known to the Asset Manager subsystem...
void clear()
removes all registered assets and does something similar to Asset::unlink() on each to break cyclic d...
Superinterface describing especially bookkeeping properties.
Steam-Layer Interface: Assets.
Lumiera error handling (C++ interface).
Helper to abstract creation and lifecycle of a dependency.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
The asset subsystem of the Steam-Layer.
void asList(list< PcAsset > &output) const
intended for diagnostics
NoUsableHashDefinition hash_value(...)
declared for metaprogramming only, never defined
thin wrapper around a size_t hash ID used as primary key for all Asset objects.