This class represents an instance of a VuoNodeClass
.
There may exist 0 to many VuoNodes
for each VuoNodeClass
, depending on the composition being processed.
Definition at line 25 of file VuoNode.hh.
Public Types | |
enum | TintColor { TintNone , TintYellow , TintTangerine , TintOrange , TintMagenta , TintViolet , TintBlue , TintCyan , TintGreen , TintLime } |
Possible colors with which the user can tint a node. More... | |
Public Member Functions | |
VuoNode (VuoNodeClass *nodeClass, string title, VuoPort *refreshPort, vector< VuoPort * >inputPorts, vector< VuoPort * > outputPorts, double x=0, double y=0, bool collapsed=false, VuoNode::TintColor tintColor=TintNone) | |
Creates a base node instance from a VuoNodeClass . More... | |
VuoNodeClass * | getNodeClass (void) |
Returns the node class this node is an instance of. More... | |
VuoPort * | getInputPortWithName (string portName) |
Returns the input port matching the specified portName , if one exists. More... | |
VuoPort * | getOutputPortWithName (string portName) |
Returns the output port matching the specified portName , if one exists. More... | |
vector< VuoPort * > | getInputPorts (void) |
Returns all input ports. More... | |
vector< VuoPort * > | getInputPortsBeforePort (VuoPort *port) |
Returns the input ports that appear before (above) port , not including port . More... | |
vector< VuoPort * > | getInputPortsAfterPort (VuoPort *port) |
Returns the input ports that appear after (below) port , not including port . More... | |
vector< VuoPort * > | getOutputPorts (void) |
Returns all output ports. More... | |
vector< VuoPort * > | getOutputPortsBeforePort (VuoPort *port) |
Returns the output ports that appear before (above) port , not including port . More... | |
vector< VuoPort * > | getOutputPortsAfterPort (VuoPort *port) |
Returns the output ports that appear after (below) port , not including port . More... | |
VuoPort * | getRefreshPort (void) |
Returns the refresh port. More... | |
string | getTitle (void) |
Returns the node instance's title. More... | |
void | setTitle (string title) |
Sets the node instance's title. More... | |
bool | isTypecastNode (void) |
Returns true if this node is a typecast node. More... | |
int | getX (void) |
Returns the x coordinate at which this node instance is drawn in the editor. More... | |
void | setX (int x) |
Sets the x coordinate at which this node instance is drawn in the editor. More... | |
int | getY (void) |
Returns the y coordinate at which this node instance is drawn in the editor. More... | |
void | setY (int y) |
Sets the y coordinate at which this node instance is drawn in the editor. More... | |
bool | isCollapsed (void) |
Returns true if this node is to be rendered collapsed against its parent (output) node. More... | |
void | setCollapsed (bool collapsed) |
Sets whether this node is to be rendered collapsed against its parent (output) node. More... | |
enum TintColor | getTintColor (void) |
Returns this node's tint color. More... | |
string | getTintColorGraphvizName (void) |
Returns this node's tint color as a Graphviz color name, or emptystring if there is no tint. More... | |
void | setTintColor (enum TintColor tintColor) |
Sets this node's tint color. More... | |
bool | isForbidden (void) |
Returns the value from VuoNode::setForbidden if any, otherwise false. More... | |
void | setForbidden (bool forbidden) |
Sets whether the caller has determined that this node class isn't allowed to be added to the intended composition. More... | |
void | setRawGraphvizDeclaration (string declaration) |
Stores the node's original declaration found when parsing it from a Graphviz-formatted composition string. More... | |
string | getRawGraphvizDeclaration (void) |
Returns the node's original declaration found when parsing it from a Graphviz-formatted composition string. More... | |
string | getRawGraphvizIdentifier (void) |
Returns the node's original identifier found when parsing it from a Graphviz-formatted composition string. More... | |
void | print (void) |
Prints info about this node and its ports, for debugging. More... | |
Public Member Functions inherited from VuoBase< VuoCompilerNode, VuoRendererNode > | |
VuoBase (string id) | |
Creates a base class. More... | |
void | setCompiler (VuoCompilerNode *compiler) |
Sets the base class instance's compiler detail class instance. More... | |
VuoCompilerNode * | 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 (VuoRendererNode *renderer) |
Sets the base class instance's renderer detail class instance. More... | |
VuoRendererNode * | 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... | |
Static Public Member Functions | |
static string | getGraphvizNameForTint (enum TintColor tintColor) |
Returns the Graphviz identifier corresponding to the provided tintColor . More... | |
static TintColor | getTintWithGraphvizName (string name) |
Returns the tint color corresponding to the provided Graphviz identifier. More... | |
enum VuoNode::TintColor |
Possible colors with which the user can tint a node.
(Red is reserved for error reporting.)
Definition at line 32 of file VuoNode.hh.
VuoNode::VuoNode | ( | VuoNodeClass * | nodeClass, |
string | title, | ||
VuoPort * | refreshPort, | ||
vector< VuoPort * > | inputPorts, | ||
vector< VuoPort * > | outputPorts, | ||
double | x = 0 , |
||
double | y = 0 , |
||
bool | collapsed = false , |
||
VuoNode::TintColor | tintColor = TintNone |
||
) |
Creates a base node instance from a VuoNodeClass
.
You'll probably want to use the factories VuoNodeClass::newNode
or VuoCompilerNodeClass::newNode
instead, for convenience.
Definition at line 24 of file VuoNode.cc.
|
static |
Returns the Graphviz identifier corresponding to the provided tintColor
.
Definition at line 348 of file VuoNode.cc.
vector< VuoPort * > VuoNode::getInputPorts | ( | void | ) |
Returns all input ports.
Definition at line 82 of file VuoNode.cc.
Returns the input ports that appear after (below) port
, not including port
.
If port
is not found, returns an empty list.
Definition at line 108 of file VuoNode.cc.
Returns the input ports that appear before (above) port
, not including port
.
If port
is not found, returns an empty list.
Definition at line 92 of file VuoNode.cc.
VuoPort * VuoNode::getInputPortWithName | ( | string | portName | ) |
Returns the input port matching the specified portName
, if one exists.
Otherwise null.
Definition at line 50 of file VuoNode.cc.
VuoNodeClass * VuoNode::getNodeClass | ( | void | ) |
Returns the node class this node is an instance of.
Definition at line 42 of file VuoNode.cc.
vector< VuoPort * > VuoNode::getOutputPorts | ( | void | ) |
Returns all output ports.
Definition at line 125 of file VuoNode.cc.
Returns the output ports that appear after (below) port
, not including port
.
If port
is not found, returns an empty list.
Definition at line 151 of file VuoNode.cc.
Returns the output ports that appear before (above) port
, not including port
.
If port
is not found, returns an empty list.
Definition at line 135 of file VuoNode.cc.
VuoPort * VuoNode::getOutputPortWithName | ( | string | portName | ) |
Returns the output port matching the specified portName
, if one exists.
Otherwise null.
Definition at line 62 of file VuoNode.cc.
string VuoNode::getRawGraphvizDeclaration | ( | void | ) |
Returns the node's original declaration found when parsing it from a Graphviz-formatted composition string.
This is useful when a Graphviz declaration for this node is needed but this node lacks a VuoCompilerNode.
Definition at line 297 of file VuoNode.cc.
string VuoNode::getRawGraphvizIdentifier | ( | void | ) |
Returns the node's original identifier found when parsing it from a Graphviz-formatted composition string.
This is useful when a Graphviz identifier for this node is needed but this node lacks a VuoCompilerNode.
Definition at line 306 of file VuoNode.cc.
VuoPort * VuoNode::getRefreshPort | ( | void | ) |
Returns the refresh port.
Definition at line 74 of file VuoNode.cc.
enum VuoNode::TintColor VuoNode::getTintColor | ( | void | ) |
Returns this node's tint color.
Definition at line 240 of file VuoNode.cc.
string VuoNode::getTintColorGraphvizName | ( | void | ) |
Returns this node's tint color as a Graphviz color name, or emptystring if there is no tint.
Definition at line 256 of file VuoNode.cc.
|
static |
Returns the tint color corresponding to the provided Graphviz identifier.
Definition at line 348 of file VuoNode.cc.
string VuoNode::getTitle | ( | void | ) |
Returns the node instance's title.
Definition at line 172 of file VuoNode.cc.
int VuoNode::getX | ( | void | ) |
Returns the x coordinate at which this node instance is drawn in the editor.
Definition at line 200 of file VuoNode.cc.
int VuoNode::getY | ( | void | ) |
Returns the y coordinate at which this node instance is drawn in the editor.
Definition at line 208 of file VuoNode.cc.
bool VuoNode::isCollapsed | ( | void | ) |
Returns true if this node is to be rendered collapsed against its parent (output) node.
Definition at line 232 of file VuoNode.cc.
bool VuoNode::isForbidden | ( | void | ) |
Returns the value from VuoNode::setForbidden if any, otherwise false.
Definition at line 272 of file VuoNode.cc.
bool VuoNode::isTypecastNode | ( | void | ) |
Returns true if this node is a typecast node.
Definition at line 192 of file VuoNode.cc.
void VuoNode::print | ( | void | ) |
Prints info about this node and its ports, for debugging.
Definition at line 317 of file VuoNode.cc.
void VuoNode::setCollapsed | ( | bool | collapsed | ) |
Sets whether this node is to be rendered collapsed against its parent (output) node.
Definition at line 240 of file VuoNode.cc.
void VuoNode::setForbidden | ( | bool | forbidden | ) |
Sets whether the caller has determined that this node class isn't allowed to be added to the intended composition.
Definition at line 280 of file VuoNode.cc.
void VuoNode::setRawGraphvizDeclaration | ( | string | declaration | ) |
Stores the node's original declaration found when parsing it from a Graphviz-formatted composition string.
Definition at line 288 of file VuoNode.cc.
void VuoNode::setTintColor | ( | enum TintColor | tintColor | ) |
Sets this node's tint color.
Definition at line 264 of file VuoNode.cc.
void VuoNode::setTitle | ( | string | title | ) |
Sets the node instance's title.
Definition at line 184 of file VuoNode.cc.
void VuoNode::setX | ( | int | x | ) |
Sets the x coordinate at which this node instance is drawn in the editor.
Definition at line 216 of file VuoNode.cc.
void VuoNode::setY | ( | int | y | ) |
Sets the y coordinate at which this node instance is drawn in the editor.
Definition at line 224 of file VuoNode.cc.