40 using mobject::ModelPort;
48 using mobject::LUMIERA_ERROR_INVALID_MODEL_PORT;
49 using mobject::LUMIERA_ERROR_UNCONNECTED_MODEL_PORT;
61 getTimeline (
string id)
81 ModelPortRegistry::setActiveInstance (*previous_);
83 ModelPortRegistry::shutdown();
120 PID pipeA = getPipe (
"pipeA");
121 PID pipeB = getPipe (
"pipeB");
122 TID someTimeline = getTimeline (
"some_test_Timeline");
134 CHECK (pipeA == p1.id());
135 CHECK (pipeB == p2.id());
136 CHECK (someTimeline == p1.holder());
137 CHECK (someTimeline == p2.holder());
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");
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));
Customised refcounting smart pointer template, built upon std::shared_ptr, but forwarding type relati...
Generic interface to express a query for specifically typed result elements exposing some capabilitie...
StreamType::ID streamType() const
allows to fetch the StreamType directly just from a Pipe-ID
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
structural asset corresponding to the part of the model forming a processing pipe for generating medi...
static PPipe query(string const &properties)
convenience shortcut for retrieving default configured pipes
key abstraction: structural asset Created automatically as a sideeffect of building the structure of ...
static StructFactory retrieve
storage for the static StructFactory instance
ModelPortDescriptor records are used as actual storage within the model port registration table; they...
Management facility for tracking model ports.
ModelPortDescriptor const & definePort(PID pipe, StID element_exposing_this_port)
create and register a new model port entry, within the pending transaction
void rollback()
discard pending changes.
ModelPortDescriptor const & get(PID) const
basic access operation: access the descriptor of a currently valid model port.
void remove(PID)
remove a model port entry from the pending transaction
bool contains(PID) const
does the transaction currently being built already contain a model port registration for the given ID...
bool isRegistered(PID) const
void clear()
schedule removal of all registry contents.
void commit()
activate pending model port changes.
void accessing_ModelPorts()
void fabricating_ModelPorts(ModelPortRegistry ®istry)
void transactionalSwitch(ModelPortRegistry ®istry)
Handle designating a point within the model, where actually output data can be pulled.
ID< asset::Struct > holder() const
access the timeline (or similar structural element) holding a global pipe which corresponds to this m...
static bool exists(ID< asset::Pipe >)
check if the global model port registration contains a mapping for the given pipe-ID
ID< asset::Pipe > pipe() const
access the Pipe (ID) of the global model port registered with the ID underlying this model port.
StreamType::ID streamType() const
convenience shortcut to access the stream type associated with the pipe-ID corresponding to this mode...
Mutation and management facility for model ports within the builder.
ModelPortRegistry::ModelPortDescriptor const & MPDescriptor
Steam-Layer implementation namespace root.
Test runner and basic definitions for tests.
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities.
bool isnil(lib::time::Duration const &dur)
A "processing pipe" represented as Asset.
Basic and generic representation of an internal query.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
ModelPortRegistry * previous_
ModelPortRegistry registry_
A collection of frequently used helper functions to support unit testing.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
Top level structural element within the session.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...