40 using mobject::ModelPort;
46 using MPDescriptor = ModelPortRegistry::ModelPortDescriptor
const&;
48 using mobject::LUMIERA_ERROR_INVALID_MODEL_PORT;
49 using mobject::LUMIERA_ERROR_UNCONNECTED_MODEL_PORT;
61 getTimeline (
string id)
110 fabricating_ModelPorts (ctx.registry_);
111 accessing_ModelPorts();
112 transactionalSwitch (ctx.registry_);
120 PID pipeA = getPipe (
"pipeA");
121 PID pipeB = getPipe (
"pipeB");
122 TID someTimeline = getTimeline (
"some_test_Timeline");
125 MPDescriptor p1 = registry.
definePort (pipeA, someTimeline);
126 MPDescriptor p2 = registry.
definePort (pipeB, someTimeline);
134 CHECK (pipeA == p1.id());
135 CHECK (pipeB == p2.id());
136 CHECK (someTimeline == p1.holder());
137 CHECK (someTimeline == p2.holder());
144 accessing_ModelPorts ()
146 PID pipeA = getPipe (
"pipeA");
147 PID pipeB = getPipe (
"pipeB");
148 PID pipeWC = getPipe (
"WCpipe");
170 CHECK (!isSameObject (mp1, mp1x));
173 CHECK (mp1 != mpNull);
174 CHECK (mp2 != mpNull);
176 CHECK (mp1.
pipe() == pipeA);
177 CHECK (mp2.
pipe() == pipeB);
178 CHECK (mp1x.
pipe() == pipeA);
189 PID pipeA = getPipe (
"pipeA");
190 PID pipeB = getPipe (
"pipeB");
191 PID pipeWC = getPipe (
"WCpipe");
203 TID anotherTimeline = getTimeline (
"another_test_Timeline");
204 MPDescriptor p1 = registry.
definePort (pipeA, anotherTimeline);
206 CHECK (anotherTimeline == p1.holder());
207 CHECK (
ModelPort(pipeA).holder() != anotherTimeline);
210 registry.
definePort (pipeWC, anotherTimeline);
212 CHECK ( registry.
contains (pipeWC));
223 CHECK (portA.pipe() == pipeA);
224 CHECK (portB.
pipe() == pipeB);
225 CHECK (portA.holder() != anotherTimeline);
233 CHECK (portA.holder() == anotherTimeline);
234 CHECK (portA.pipe() == pipeA);
239 CHECK (pwc.pipe() == pipeWC);
240 CHECK (pwc.holder() == anotherTimeline);
246 CHECK ( registry.
contains (pipeWC));
251 CHECK (!registry.
contains (pipeWC));
262 CHECK ( registry.
contains (pipeWC));
ModelPortDescriptor const & get(PID) const
basic access operation: access the descriptor of a currently valid model port.
ModelPortDescriptor const & definePort(PID pipe, StID element_exposing_this_port)
create and register a new model port entry, within the pending transaction
A "processing pipe" represented as Asset.
void clear()
schedule removal of all registry contents.
bool contains(PID) const
does the transaction currently being built already contain a model port registration for the given ID...
Basic and generic representation of an internal query.
void commit()
activate pending model port changes.
static bool exists(ID< asset::Pipe >)
check if the global model port registration contains a mapping for the given pipe-ID ...
Mutation and management facility for model ports within the builder.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
Steam-Layer implementation namespace root.
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
static StructFactory retrieve
storage for the static StructFactory instance
ID< asset::Pipe > pipe() const
access the Pipe (ID) of the global model port registered with the ID underlying this model port...
static ModelPortRegistry * setActiveInstance(ModelPortRegistry &newRegistry)
switch the implicit link to the global ModelPort registry to point to the given implementation instan...
static void shutdown()
globally deactivate access to model ports
Management facility for tracking model ports.
Simplistic test class runner.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
A collection of frequently used helper functions to support unit testing.
StreamType::ID streamType() const
allows to fetch the StreamType directly just from a Pipe-ID
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
bool isRegistered(PID) const
Handle designating a point within the model, where actually output data can be pulled.
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
ID< asset::Struct > holder() const
access the timeline (or similar structural element) holding a global pipe which corresponds to this m...
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
StreamType::ID streamType() const
convenience shortcut to access the stream type associated with the pipe-ID corresponding to this mode...
void rollback()
discard pending changes.
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
void remove(PID)
remove a model port entry from the pending transaction
Top level structural element within the session.
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities. ...