41 #include <unordered_map> 43 #include <boost/utility.hpp> 49 using std::static_pointer_cast;
50 using std::dynamic_pointer_cast;
53 using lib::RecursiveLock_NoWait;
62 boost::hash_combine(hash, idi.org);
63 boost::hash_combine(hash, idi.name);
64 boost::hash_combine(hash, idi.category);
82 :
public std::unary_function<size_t, size_t>
85 operator() (
size_t val)
const {
return val; }
88 typedef std::unordered_map<size_t, PAsset, IdentityHash> IdHashtable;
100 ,
public Sync<RecursiveLock_NoWait>
121 return dynamic_pointer_cast<KIND,
Asset> (find (hash));
128 table[hash] = static_pointer_cast (ptr);
140 return table.erase (hash);
158 IdHashtable::iterator i = table.begin();
159 IdHashtable::iterator e = table.end();
161 i->second->dependants.clear();
172 IdHashtable::const_iterator i = table.begin();
173 IdHashtable::const_iterator e = table.end();
175 output.push_back (i->second);
181 find (
size_t hash)
const 183 static const PAsset NULLP;
184 IdHashtable::const_iterator i = table.find (hash);
185 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.