A collection of nodes and the cables connecting them.
Definition at line 26 of file VuoComposition.hh.
Public Member Functions | |
VuoComposition (void) | |
Creates an empty composition. More... | |
void | setMetadata (VuoCompositionMetadata *metadata, bool takeOwnership) |
Assigns metadata to this composition. More... | |
VuoCompositionMetadata * | getMetadata (void) |
Returns the metadata associated with this composition. More... | |
void | setDirectory (string directory) |
Sets the directory containing the composition's .vuo source file. More... | |
string | getDirectory (void) |
Returns the directory containing the composition's .vuo source file. More... | |
void | addNode (VuoNode *node) |
Adds a node to the composition. More... | |
void | removeNode (VuoNode *node) |
Removes a node from the composition. More... | |
set< VuoNode * > | getNodes (void) |
Returns the nodes in this composition. More... | |
void | addCable (VuoCable *cable) |
Adds a cable to the composition. More... | |
void | removeCable (VuoCable *cable) |
Disconnects and removes a cable from the composition. More... | |
set< VuoCable * > | getCables (void) |
Returns the cables in this composition. More... | |
void | addComment (VuoComment *comment) |
Adds a comment to the composition. More... | |
void | removeComment (VuoComment *comment) |
Removes a comment from the composition. More... | |
set< VuoComment * > | getComments (void) |
Returns the comments in this composition. More... | |
void | addPublishedInputPort (VuoPublishedPort *port, int index) |
Adds a published port to this composition's list of published input ports at the given index. More... | |
void | addPublishedOutputPort (VuoPublishedPort *port, int index) |
Adds a published port to this composition's list of published output ports at the given index. More... | |
void | removePublishedInputPort (int index) |
Removes the published port at the given index from this composition's list of published input ports. More... | |
void | removePublishedOutputPort (int index) |
Removes the published port at the given index from this composition's list of published input ports. More... | |
vector< VuoPublishedPort * > | getPublishedInputPorts (void) |
Returns the published input ports in this composition. More... | |
vector< VuoPublishedPort * > | getPublishedOutputPorts (void) |
Returns the published output ports in this composition. More... | |
VuoPublishedPort * | getPublishedInputPortWithName (string name) |
Returns the published input port with the given name, or null if none matches. More... | |
VuoPublishedPort * | getPublishedOutputPortWithName (string name) |
Returns the published output port with the given name, or null if none matches. More... | |
int | getIndexOfPublishedPort (VuoPublishedPort *port, bool isInput) |
Returns the index of the published port in the list of published input or output ports. More... | |
vector< VuoPublishedPort * > | getProtocolAwarePublishedPortOrder (VuoProtocol *protocol, bool publishedInputs) |
Returns an ordered list of the composition's published input or output ports, with published ports belonging to the provided protocol listed first, followed by published ports that are not part of the protocol. More... | |
Public Member Functions inherited from VuoBase< VuoCompilerComposition, VuoRendererComposition > | |
VuoBase (string id) | |
Creates a base class. More... | |
void | setCompiler (VuoCompilerComposition *compiler) |
Sets the base class instance's compiler detail class instance. More... | |
VuoCompilerComposition * | getCompiler (void) const |
Returns the base class instance's compiler detail class instance. More... | |
bool | hasCompiler (void) const |
Returns true if this base class instance has a compiler detail. More... | |
void | setRenderer (VuoRendererComposition *renderer) |
Sets the base class instance's renderer detail class instance. More... | |
VuoRendererComposition * | getRenderer (void) const |
Returns the base class instance's renderer detail class instance. More... | |
bool | hasRenderer (void) const |
Returns true if this base class instance has a renderer detail. More... | |
VuoComposition::VuoComposition | ( | void | ) |
Creates an empty composition.
Definition at line 20 of file VuoComposition.cc.
void VuoComposition::addCable | ( | VuoCable * | cable | ) |
Adds a cable to the composition.
The caller is responsible for adding the nodes on either end of the cable to the composition.
Definition at line 104 of file VuoComposition.cc.
void VuoComposition::addComment | ( | VuoComment * | comment | ) |
Adds a comment to the composition.
Definition at line 131 of file VuoComposition.cc.
void VuoComposition::addNode | ( | VuoNode * | node | ) |
Adds a node to the composition.
Definition at line 76 of file VuoComposition.cc.
void VuoComposition::addPublishedInputPort | ( | VuoPublishedPort * | port, |
int | index | ||
) |
Adds a published port to this composition's list of published input ports at the given index.
Definition at line 155 of file VuoComposition.cc.
void VuoComposition::addPublishedOutputPort | ( | VuoPublishedPort * | port, |
int | index | ||
) |
Adds a published port to this composition's list of published output ports at the given index.
Definition at line 163 of file VuoComposition.cc.
set< VuoCable * > VuoComposition::getCables | ( | void | ) |
Returns the cables in this composition.
Definition at line 123 of file VuoComposition.cc.
set< VuoComment * > VuoComposition::getComments | ( | void | ) |
Returns the comments in this composition.
Definition at line 147 of file VuoComposition.cc.
string VuoComposition::getDirectory | ( | void | ) |
Returns the directory containing the composition's .vuo source file.
Definition at line 68 of file VuoComposition.cc.
int VuoComposition::getIndexOfPublishedPort | ( | VuoPublishedPort * | port, |
bool | isInput | ||
) |
Returns the index of the published port in the list of published input or output ports.
Definition at line 234 of file VuoComposition.cc.
VuoCompositionMetadata * VuoComposition::getMetadata | ( | void | ) |
Returns the metadata associated with this composition.
Definition at line 52 of file VuoComposition.cc.
set< VuoNode * > VuoComposition::getNodes | ( | void | ) |
Returns the nodes in this composition.
Definition at line 94 of file VuoComposition.cc.
vector< VuoPublishedPort * > VuoComposition::getProtocolAwarePublishedPortOrder | ( | VuoProtocol * | protocol, |
bool | publishedInputs | ||
) |
Returns an ordered list of the composition's published input or output ports, with published ports belonging to the provided protocol listed first, followed by published ports that are not part of the protocol.
Definition at line 249 of file VuoComposition.cc.
vector< VuoPublishedPort * > VuoComposition::getPublishedInputPorts | ( | void | ) |
Returns the published input ports in this composition.
Definition at line 187 of file VuoComposition.cc.
VuoPublishedPort * VuoComposition::getPublishedInputPortWithName | ( | string | name | ) |
Returns the published input port with the given name, or null if none matches.
Definition at line 203 of file VuoComposition.cc.
vector< VuoPublishedPort * > VuoComposition::getPublishedOutputPorts | ( | void | ) |
Returns the published output ports in this composition.
Definition at line 195 of file VuoComposition.cc.
VuoPublishedPort * VuoComposition::getPublishedOutputPortWithName | ( | string | name | ) |
Returns the published output port with the given name, or null if none matches.
Definition at line 211 of file VuoComposition.cc.
void VuoComposition::removeCable | ( | VuoCable * | cable | ) |
Disconnects and removes a cable from the composition.
Definition at line 112 of file VuoComposition.cc.
void VuoComposition::removeComment | ( | VuoComment * | comment | ) |
Removes a comment from the composition.
Definition at line 139 of file VuoComposition.cc.
void VuoComposition::removeNode | ( | VuoNode * | node | ) |
Removes a node from the composition.
The caller is responsible for removing any cables attached to the node.
Definition at line 86 of file VuoComposition.cc.
void VuoComposition::removePublishedInputPort | ( | int | index | ) |
Removes the published port at the given index from this composition's list of published input ports.
Definition at line 171 of file VuoComposition.cc.
void VuoComposition::removePublishedOutputPort | ( | int | index | ) |
Removes the published port at the given index from this composition's list of published input ports.
Definition at line 179 of file VuoComposition.cc.
void VuoComposition::setDirectory | ( | string | directory | ) |
Sets the directory containing the composition's .vuo source file.
Definition at line 60 of file VuoComposition.cc.
void VuoComposition::setMetadata | ( | VuoCompositionMetadata * | metadata, |
bool | takeOwnership | ||
) |
Assigns metadata to this composition.
If takeOwnership is true, this composition becomes responsible for destroying metadata. Otherwise, the caller is responsible.
Definition at line 40 of file VuoComposition.cc.