41 using mobject::Session;
61 string pipeID = isnil (arg)?
"Black Hole" : arg[1];
62 string streamID = 2>arg.size()?
"teststream" : arg[2] ;
64 createExplicit (pipeID,streamID);
65 create_or_ref (pipeID);
66 create_using_default ();
67 dependProcPatt (pipeID);
73 void createExplicit (
string pID,
string sID)
76 normaliseID (pID_sane);
77 CHECK (pID_sane != pID);
82 CHECK (thePipe->getProcPatt());
83 CHECK (thePipe->getPipeID() == pID_sane);
85 CHECK (thePipe->shortDesc == pID_sane);
88 CHECK (idi.
org ==
"lumi");
89 CHECK (contains (idi.
name, thePipe->getPipeID()));
90 CHECK (contains (idi.
name,
string{thePipe->getStreamID()}));
94 CHECK ( cat.hasKind (STRUCT) );
95 CHECK ( cat.isWithin(refcat) );
99 void create_or_ref(
string pID)
105 CHECK (pipe1->getPipeID() == pID);
107 string pID2 =
"another-" + pID;
110 CHECK (pipe2 != pipe1);
111 Category c1 = pipe1->ident.category;
112 Category c2 = pipe2->ident.category;
117 CHECK (pipe3 == pipe2);
121 void create_using_default()
127 CHECK (pipe1->ident.category.hasKind(VIDEO));
128 CHECK (pipe1->getProcPatt());
130 CHECK (propa == pipe1->getProcPatt());
134 CHECK (pipe2 == pipe1);
136 CHECK (pipe2 == pipe1);
138 CHECK (pipe2 == pipe1);
140 auto sID =
string{pipe1->getStreamID()};
148 void dependProcPatt(
string pID)
155 PProcPatt thePatt = thePipe->getProcPatt();
157 CHECK (dependencyCheck (thePipe, thePatt));
159 PProcPatt pattern2 = thePatt->
newCopy(
"another");
160 CHECK (thePatt != pattern2);
161 CHECK (!dependencyCheck (thePipe, pattern2));
162 TODO (
"add something to the new pattern, e.g. an effect");
168 CHECK (pattern2 == pipe2x->getProcPatt());
171 thePipe->switchProcPatt(pattern2);
172 CHECK ( dependencyCheck (thePipe, pattern2));
173 CHECK (!dependencyCheck (thePipe, thePatt));
176 CHECK ( aMang.
known (thePipe->getID()));
182 CHECK (!aMang.
known (thePipe->getID()));
185 PProcPatt pattern3 = thePipe->getProcPatt();
186 CHECK (thePipe->getProcPatt());
187 CHECK ( pattern3 == pattern2);
190 pattern3 = pipe3x->getProcPatt();
191 CHECK (pattern3 != pattern2);
193 CHECK (pipe3x != pipe2x);
196 TRACE (asset_mem,
"leaving BasicPipe_test::dependProcPatt()");
string name
element ID, comprehensible but sanitised.
Utilities to support working with predicate queries.
Steam-Layer Interface: Asset Lookup and Organisation.
A "processing pipe" represented as Asset.
Basic and generic representation of an internal query.
Tree like classification of Assets.
void normaliseID(string &id)
ensure standard format for a given id string.
void remove(IDA id)
remove the given asset from the internal DB.
Facade for the Asset subsystem.
This header is for including and configuring NoBug.
static session::SessManager & current
access point to the current Session
Steam-Layer implementation namespace root.
DefaultsAccess defaults
manages default configured objects
static lib::Depend< AssetManager > instance
get at the system-wide asset manager instance.
virtual const ID< Struct > & getID() const
<
static StructFactory retrieve
storage for the static StructFactory instance
a POD comprised of all the information sufficiently identifying any given Asset.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
lib::P< Pipe > newPipe(string pipeID, string streamID)
Factory method for creating Pipes explicitly.
const string org
origin or authorship id.
Small helper and diagnostic functions related to Asset and AssetManager.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Primary Interface to the current Session.
lib::P< ProcPatt > newCopy(string newID) const
create a new ProcPatt asset as a literal copy of this one.
asset::Category category
primary tree like classification of the asset.
The asset subsystem of the Steam-Layer.
Definition of Asset categorisation.
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
bool contains(SEQ const &cont, typename SEQ::const_reference val)
shortcut for brute-force containment test in any sequential container