83 string pipeID = isnil(arg)?
"Black Hole" : arg[1];
84 string streamID = 2>arg.size()?
"teststream" : arg[2];
87 normaliseID (streamID);
89 retrieveSimpleDefault (pipeID);
90 retrieveConstrainedDefault (pipeID, streamID);
91 failureCreatesNewDefault();
99 retrieveSimpleDefault (
string)
106 CHECK (pipe2 == pipe1);
108 CHECK (pipe2 == pipe1);
110 CHECK (pipe2 == pipe1);
112 CHECK (pipe2 == pipe1);
114 CHECK (pipe2 == pipe1);
119 retrieveConstrainedDefault (
string pID,
string sID)
123 "stream-ID \"%s\" not suitable for test, because " 124 "the default-pipe \"%s\" happens to have the same " 125 "stream-ID. We need it to be different",
126 sID.c_str(), pID.c_str()
129 string query_for_sID{
"stream("+sID+
")"};
132 CHECK (pipe2 != pipe1);
138 failureCreatesNewDefault()
142 string new_pID =
_Fmt{
"dummy_%s_%i"}
145 ; // make random new pipeID 146 Query<Pipe> query_for_new{"pipe("+new_pID+")"}; 148 CHECK (!find (query_for_new)); // check it doesn't exist
150 CHECK ( find (query_for_new));
152 CHECK (pipe1 != pipe2);
172 CHECK (2 == pipe1.use_count());
173 hash = pipe1->getID();
180 CHECK ( aMang.
known (assetID));
182 CHECK (!aMang.
known (assetID));
185 CHECK (!find(query_for_pID));
187 CHECK ( find(query_for_pID));
Utilities to support working with predicate queries.
Steam-Layer Interface: Asset Lookup and Organisation.
A "processing pipe" represented as Asset.
Framework for classification of media streams.
Basic and generic representation of an internal query.
bool define(lib::P< TAR > const &, Query< TAR > const &=Query< TAR >())
register the given object as default, after ensuring it fulfils the query.
void normaliseID(string &id)
ensure standard format for a given id string.
void remove(IDA id)
remove the given asset from the internal DB.
int rani(uint bound=_iBOUND())
Facade for the Asset subsystem.
static session::SessManager & current
access point to the current Session
Steam-Layer implementation namespace root.
A front-end for using printf-style formatting.
DefaultsAccess defaults
manages default configured objects
Namespace of Session and user visible high-level objects.
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
void verifyRemoval()
verify the defaults manager holds only weak refs, so if an object goes out of scope, any defaults entries are purged silently
lib::P< STRU > newInstance(Symbol nameID="")
invoke the factory to create new Structural Asset.
static StructFactory retrieve
storage for the static StructFactory instance
Token or Atom with distinct identity.
Marker types to indicate a literal string and a Symbol.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
Superinterface describing especially bookkeeping properties.
Steam-Layer Interface: Assets.
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
Primary Interface to the current Session.
Asset representation of structural elements within the model.
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
thin wrapper around a size_t hash ID used as primary key for all Asset objects.