50 using mobject::Session;
70 string pipeID = isnil (arg)?
"Black Hole" : arg[1];
71 string streamID = 2>arg.size()?
"teststream" : arg[2] ;
73 createExplicit (pipeID,streamID);
74 create_or_ref (pipeID);
75 create_using_default ();
76 dependProcPatt (pipeID);
82 void createExplicit (
string pID,
string sID)
85 normaliseID (pID_sane);
86 CHECK (pID_sane != pID);
91 CHECK (thePipe->getProcPatt());
92 CHECK (thePipe->getPipeID() == pID_sane);
94 CHECK (thePipe->shortDesc == pID_sane);
97 CHECK (idi.
org ==
"lumi");
98 CHECK (contains (idi.
name, thePipe->getPipeID()));
99 CHECK (contains (idi.
name,
string{thePipe->getStreamID()}));
103 CHECK ( cat.hasKind (STRUCT) );
104 CHECK ( cat.isWithin(refcat) );
108 void create_or_ref(
string pID)
114 CHECK (pipe1->getPipeID() == pID);
116 string pID2 =
"another-" + pID;
119 CHECK (pipe2 != pipe1);
120 Category c1 = pipe1->ident.category;
121 Category c2 = pipe2->ident.category;
126 CHECK (pipe3 == pipe2);
130 void create_using_default()
136 CHECK (pipe1->ident.category.hasKind(VIDEO));
137 CHECK (pipe1->getProcPatt());
139 CHECK (propa == pipe1->getProcPatt());
143 CHECK (pipe2 == pipe1);
145 CHECK (pipe2 == pipe1);
147 CHECK (pipe2 == pipe1);
149 auto sID =
string{pipe1->getStreamID()};
157 void dependProcPatt(
string pID)
164 PProcPatt thePatt = thePipe->getProcPatt();
166 CHECK (dependencyCheck (thePipe, thePatt));
168 PProcPatt pattern2 = thePatt->
newCopy(
"another");
169 CHECK (thePatt != pattern2);
170 CHECK (!dependencyCheck (thePipe, pattern2));
171 TODO (
"add something to the new pattern, e.g. an effect");
177 CHECK (pattern2 == pipe2x->getProcPatt());
180 thePipe->switchProcPatt(pattern2);
181 CHECK ( dependencyCheck (thePipe, pattern2));
182 CHECK (!dependencyCheck (thePipe, thePatt));
185 CHECK ( aMang.
known (thePipe->getID()));
191 CHECK (!aMang.
known (thePipe->getID()));
194 PProcPatt pattern3 = thePipe->getProcPatt();
195 CHECK (thePipe->getProcPatt());
196 CHECK ( pattern3 == pattern2);
199 pattern3 = pipe3x->getProcPatt();
200 CHECK (pattern3 != pattern2);
202 CHECK (pipe3x != pipe2x);
205 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.
Simple 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