42 using mobject::LUMIERA_ERROR_BUILDER_LIFECYCLE;
43 using mobject::LUMIERA_ERROR_INVALID_MODEL_PORT;
44 using mobject::LUMIERA_ERROR_UNCONNECTED_MODEL_PORT;
61 INFO (builder,
"disabling ModelPort registry....");
79 INFO_IF (!previous, builder,
"activating new ModelPort registry.");
80 WARN_IF ( previous, builder,
"switching ModelPort registry instance.");
96 throw error::State (
"global model port registry is not accessible"
97 , LUMIERA_ERROR_BUILDER_LIFECYCLE);
138 throw error::State (
"This model port is disconnected or NIL"
139 , LUMIERA_ERROR_UNCONNECTED_MODEL_PORT);
141 throw error::Logic (
"Model port was never registered, or got unregistered meanwhile."
142 ,LUMIERA_ERROR_INVALID_MODEL_PORT);
144 MPTable::const_iterator pos =
currentReg_.find (key);
146 ASSERT (pos->second.isValid());
174 throw error::Logic (
"attempt to register a model port with a pipe-ID, "
175 "which has already been used to register a "
176 "model port within this transaction (build process)."
177 , LUMIERA_ERROR_DUPLICATE_MODEL_PORT);
213 TRACE (builder,
"committing new ModelPort list....");
226 TRACE (builder,
"discarding changes to ModelPort list (rollback)....");
233 LUMIERA_ERROR_DEFINE (DUPLICATE_MODEL_PORT,
"Attempt to define a new model port with an pipe-ID already denoting an existing port");
292 return this->
id_.streamType();
Steam-Layer Facade: access to the Builder.
A synchronisation protection guard employing a lock scoped to the parameter type as a whole,...
Optional or switchable link to an existing object.
thin wrapper around a size_t hash ID used as primary key for all Asset objects.
ModelPortDescriptor records are used as actual storage within the model port registration table; they...
const StID holder() const
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
std::map< PID, ModelPortDescriptor > MPTable
bool contains(PID) const
does the transaction currently being built already contain a model port registration for the given ID...
static ModelPortRegistry & globalInstance()
access the globally valid registry instance.
static void shutdown()
globally deactivate access to model ports
static lib::OptionalRef< ModelPortRegistry > theGlobalRegistry
storage for the link to the global Registry instance currently in charge
static ModelPortDescriptor const & accessDescriptor(PID)
access the globally valid model port for the given pipe.
bool isRegistered(PID) const
static ModelPortRegistry * setActiveInstance(ModelPortRegistry &newRegistry)
switch the implicit link to the global ModelPort registry to point to the given implementation instan...
void clear()
schedule removal of all registry contents.
void commit()
activate pending model port changes.
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...
#define LUMIERA_ERROR_DEFINE(err, msg)
Definition and initialisation of an error constant.
Lumiera error handling (C++ interface).
This header is for including and configuring NoBug.
Mutation and management facility for model ports within the builder.
Organising the output data calculation possibilities.
LumieraError< LERR_(STATE)> State
LumieraError< LERR_(LOGIC)> Logic
ModelPortRegistry::ModelPortDescriptor const & MPDescriptor
Steam-Layer implementation namespace root.
bool contains(MAP &map, typename MAP::key_type const &key)
shortcut for containment test on a map
A special implementation of lib::Sync, where the storage of the object monitor is associated directly...