38 using std::static_pointer_cast;
40 using std::placeholders::_1;
66 using error::Invalid::Invalid;
74 :
IDErr(
_Fmt(
"Query for Asset with ID=%d, which up to now " 75 "hasn't been created or encountered.") % aID
76 ,LERR_(UNKNOWN_ASSET_ID))
83 :
IDErr (
_Fmt(
"Request for Asset(%s), specifying an Asset kind, " 84 "that doesn't match the actual type (and can't be " 85 "casted either).") % idi
86 ,LERR_(WRONG_ASSET_KIND))
99 AssetManager::AssetManager ()
109 return asset::hash_value (idi);
124 DB& registry (_aMang.registry);
132 registry.put (asset_id, smart_ptr);
162 AssetManager::wrap (
const KIND&
asset)
164 ENSURE (instance().known(asset.id),
165 "unregistered asset instance encountered.");
166 return static_pointer_cast<KIND,
Asset>
167 (instance().registry.get (asset.id));
176 AssetManager::known (
IDA id)
178 return bool(registry.get (
ID<Asset>(
id)));
189 PAsset pA = registry.get (
id);
190 return ( pA && pA->ident.category.isWithin(cat));
199 instance->
remove (pA->getID());
202 function<void(PAsset&)>
203 detach_child_recursively ()
205 return bind( &recursive_call, &AssetManager::instance(), _1 );
214 AssetManager::remove (
IDA id)
217 for_each (asset->dependants, detach_child_recursively());
224 AssetManager::clear()
226 INFO (progress,
"Clearing the Asset registry...");
232 AssetManager::listContent()
const 235 registry.asList (res);
278 template P<Clip> AssetManager::wrap (
const Clip& asset);
279 template P<Pipe> AssetManager::wrap (
const Pipe& asset);
Facility for monitor object based locking.
Steam-Layer Interface: Asset Lookup and Organisation.
Definition of a structural asset to express patterns of wiring or processing Processing patterns can ...
A "processing pipe" represented as Asset.
"Processing Pattern" is a structural Asset representing information how to build some part of the ren...
Tree like classification of Assets.
void remove(IDA id)
remove the given asset from the internal DB.
scoped guard to control the actual locking.
Facade for the Asset subsystem.
Steam-Layer implementation namespace root.
A front-end for using printf-style formatting.
Access point to singletons and other kinds of dependencies designated by type.
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
AssetManager error responses, caused by querying invalid Asset IDs from the internal DB...
Object Monitor based synchronisation.
Implementation of the registry holding all Asset instances known to the Asset Manager subsystem...
An entity to collect, possibly filter and persist incident records.
Derived specific exceptions within Lumiera's exception hierarchy.
Structural building block of the session: a sequence of clips.
Data processing Plugins and Codecs can be treated as a specific Kind of Asset.
a POD comprised of all the information sufficiently identifying any given Asset.
Superinterface describing especially bookkeeping properties.
void for_each(CON const &elements, FUN function, P1 &&bind1, ARGS &&...args)
Accept binding for arbitrary function arguments.
Definition of Asset representation for a media clip.
Implementation of the Asset database.
bookkeeping (Asset) view of a media clip.
Lumiera public interface.
To establish a reference scale for quantised time values.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
The asset subsystem of the Steam-Layer.
Asset representation of structural elements within the model.
Perform operations "for each element" of a collection.
Top level structural element within the session.
#define LUMIERA_ERROR_DEFINE(err, msg)
Definition and initialisation of an error constant.