Lumiera
0.pre.03
»edit your freedom«
|
#include "steam/mobject/model-port.hpp"
Handle designating a point within the model, where actually output data can be pulled.
ModelPort is a frontend to be used by clients. These ModelPort handle objects may be copied and stored at will, but their validity will be verified on each access. Actually, the Builder will discover any model ports and maintain a ModelPortRegistry behind the scenes.
Each model port corresponds to a (global) pipe within a specific Timeline ("holder"); consequently each such port is also bound to produce data of a specific StreamType (as defined by the corresponding pipe). A model port may be in unconnected state, which can be checked through bool
conversion. While the ModelPort handles are value objects, the identity of the underlying model port (descriptor) is given by the corresponding pipe-ID, thus effectively resulting in a global namespace for model ports.
Definition at line 95 of file model-port.hpp.
Public Member Functions | |
ModelPort (ID< asset::Pipe > refID) | |
ID< asset::Struct > | holder () const |
access the timeline (or similar structural element) holding a global pipe which corresponds to this model port More... | |
bool | isValid () const |
operator bool () const | |
ID< asset::Pipe > | pipe () const |
access the Pipe (ID) of the global model port registered with the ID underlying this model port. More... | |
StreamType::ID | streamType () const |
convenience shortcut to access the stream type associated with the pipe-ID corresponding to this model port. More... | |
Static Public Member Functions | |
static bool | exists (ID< asset::Pipe >) |
check if the global model port registration contains a mapping for the given pipe-ID | |
Friends | |
bool | operator!= (ModelPort const &mp1, ModelPort const &mp2) |
bool | operator< (ModelPort const &mp1, ModelPort const &mp2) |
bool | operator== (ModelPort const &mp1, ModelPort const &mp2) |
Private Attributes | |
ID< asset::Pipe > | id_ |
ModelPort | ( | ID< asset::Pipe > | refID | ) |
Definition at line 244 of file model-port-registry.cpp.
References ModelPortRegistry::accessDescriptor().
ID< asset::Pipe > pipe | ( | ) | const |
access the Pipe (ID) of the global model port registered with the ID underlying this model port.
error::Logic | if no model port is registered for this Pipe-ID |
Definition at line 265 of file model-port-registry.cpp.
References ModelPortRegistry::accessDescriptor().
ID< asset::Struct > holder | ( | ) | const |
access the timeline (or similar structural element) holding a global pipe which corresponds to this model port
error::Logic | if no model port is registered for this Pipe-ID |
Definition at line 278 of file model-port-registry.cpp.
References ModelPortRegistry::accessDescriptor().
StreamType::ID streamType | ( | ) | const |
convenience shortcut to access the stream type associated with the pipe-ID corresponding to this model port.
error::Invalid | in case of unknown/unregistered Pipe-ID |
Definition at line 290 of file model-port-registry.cpp.