29using std::static_pointer_cast;
31using 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))
156 "unregistered asset instance encountered.");
157 return static_pointer_cast<KIND,Asset>
181 return ( pA and pA->ident.category.isWithin(cat));
190 instance->remove (pA->getID());
208 for_each (
asset->dependants, detach_child_recursively());
217 INFO (progress,
"Clearing the Asset registry...");
275 using meta::TimeGrid;
276 using meta::ErrorLog;
Definition of Asset representation for a media clip.
Steam-Layer Interface: Asset Lookup and Organisation.
Access point to singletons and other kinds of dependencies designated by type.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
scoped guard to control the actual locking.
Facility for monitor object based locking.
Derived specific exceptions within Lumiera's exception hierarchy.
Facade for the Asset subsystem.
static void destroy(Asset *aa)
deleter function used by the Asset smart pointers to delete Asset objects
static ID< Asset > getID(const Asset::Ident &)
provide the unique ID for given Asset::Ident tuple
list< PcAsset > listContent() const
extract a sorted list of all registered Assets
void clear()
deregister and evict all known Assets.
static lib::P< KIND > wrap(const KIND &asset)
retrieve the registered smart-ptr for any asset
lib::P< KIND > getAsset(const ID< KIND > &id)
find and return corresponding object
static ID< KIND > reg(KIND *obj, const Asset::Ident &idi)
registers an asset object in the internal DB, providing its unique key.
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
void remove(IDA id)
remove the given asset from the internal DB.
Tree like classification of Assets.
Implementation of the registry holding all Asset instances known to the Asset Manager subsystem.
lib::P< KIND > get(ID< KIND > hash) const
void asList(list< PcAsset > &output) const
intended for diagnostics
bool del(ID< Asset > hash)
void put(ID< KIND > hash, lib::P< KIND > &ptr)
void clear()
removes all registered assets and does something similar to Asset::unlink() on each to break cyclic d...
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
A front-end for using printf-style formatting.
Implementation of the Asset database.
An entity to collect, possibly filter and persist incident records.
#define LUMIERA_ERROR_DEFINE(err, msg)
Definition and initialisation of an error constant.
Lumiera public interface.
void recursive_call(AssetManager *instance, PAsset &pA)
function< void(PAsset &)> detach_child_recursively()
The asset subsystem of the Steam-Layer.
size_t hash_value(Category const &cat)
Steam-Layer implementation namespace root.
disable_if< can_IterForEach< Container >, FUN > for_each(Container const &coll, FUN doIt)
operate on all elements of a STL container.
A "processing pipe" represented as Asset.
Data processing Plugins and Codecs can be treated as a specific Kind of Asset.
Definition of a structural asset to express patterns of wiring or processing Processing patterns can ...
Structural building block of the session: a sequence of clips.
Asset representation of structural elements within the model.
a POD comprised of all the information sufficiently identifying any given Asset.
AssetManager error responses, caused by querying invalid Asset IDs from the internal DB.
UnknownID(ID< Asset > aID)
WrongKind(Asset::Ident idi)
Object Monitor based synchronisation.
To establish a reference scale for quantised time values.
Top level structural element within the session.
Perform operations "for each element" of a collection.