29 using std::static_pointer_cast;
31 using std::placeholders::_1;
57 using error::Invalid::Invalid;
65 :
IDErr(
_Fmt(
"Query for Asset with ID=%d, which up to now " 66 "hasn't been created or encountered.") % aID
67 ,LERR_(UNKNOWN_ASSET_ID))
74 :
IDErr (
_Fmt(
"Request for Asset(%s), specifying an Asset kind, " 75 "that doesn't match the actual type (and can't be " 76 "casted either).") % idi
77 ,LERR_(WRONG_ASSET_KIND))
90 AssetManager::AssetManager ()
100 return asset::hash_value (idi);
115 DB& registry (_aMang.registry);
123 registry.put (asset_id, smart_ptr);
153 AssetManager::wrap (
const KIND&
asset)
155 ENSURE (instance().known(asset.id),
156 "unregistered asset instance encountered.");
157 return static_pointer_cast<KIND,
Asset>
158 (instance().registry.get (asset.id));
167 AssetManager::known (
IDA id)
169 return bool(registry.get (
ID<Asset>(
id)));
180 PAsset pA = registry.get (
id);
181 return ( pA && pA->ident.category.isWithin(cat));
190 instance->
remove (pA->getID());
193 function<void(PAsset&)>
194 detach_child_recursively ()
196 return bind( &recursive_call, &AssetManager::instance(), _1 );
205 AssetManager::remove (
IDA id)
208 for_each (asset->dependants, detach_child_recursively());
215 AssetManager::clear()
217 INFO (progress,
"Clearing the Asset registry...");
223 AssetManager::listContent()
const 226 registry.asList (res);
269 template P<Clip> AssetManager::wrap (
const Clip& asset);
270 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.