Vuo  2.0.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
VuoNode Class Reference

Description

This class represents an instance of a VuoNodeClass.

There may exist 0 to many VuoNodes for each VuoNodeClass, depending on the composition being processed.

See also
VuoCompilerNode
VuoRendererNode

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...
 
VuoNodeClassgetNodeClass (void)
 Returns the node class this node is an instance of. More...
 
VuoPortgetInputPortWithName (string portName)
 Returns the input port matching the specified portName, if one exists. More...
 
VuoPortgetOutputPortWithName (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...
 
VuoPortgetRefreshPort (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...
 
VuoCompilerNodegetCompiler (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...
 
VuoRendererNodegetRenderer (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...
 

Member Enumeration Documentation

◆ 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.

Constructor & Destructor Documentation

◆ VuoNode()

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.

Member Function Documentation

◆ getGraphvizNameForTint()

string VuoNode::getGraphvizNameForTint ( enum TintColor  tintColor)
static

Returns the Graphviz identifier corresponding to the provided tintColor.

Definition at line 348 of file VuoNode.cc.

◆ getInputPorts()

vector< VuoPort * > VuoNode::getInputPorts ( void  )

Returns all input ports.

Definition at line 82 of file VuoNode.cc.

◆ getInputPortsAfterPort()

vector< VuoPort * > VuoNode::getInputPortsAfterPort ( VuoPort port)

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.

◆ getInputPortsBeforePort()

vector< VuoPort * > VuoNode::getInputPortsBeforePort ( VuoPort port)

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.

◆ getInputPortWithName()

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.

◆ getNodeClass()

VuoNodeClass * VuoNode::getNodeClass ( void  )

Returns the node class this node is an instance of.

Definition at line 42 of file VuoNode.cc.

◆ getOutputPorts()

vector< VuoPort * > VuoNode::getOutputPorts ( void  )

Returns all output ports.

Definition at line 125 of file VuoNode.cc.

◆ getOutputPortsAfterPort()

vector< VuoPort * > VuoNode::getOutputPortsAfterPort ( VuoPort port)

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.

◆ getOutputPortsBeforePort()

vector< VuoPort * > VuoNode::getOutputPortsBeforePort ( VuoPort port)

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.

◆ getOutputPortWithName()

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.

◆ getRawGraphvizDeclaration()

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.

◆ getRawGraphvizIdentifier()

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.

◆ getRefreshPort()

VuoPort * VuoNode::getRefreshPort ( void  )

Returns the refresh port.

Definition at line 74 of file VuoNode.cc.

◆ getTintColor()

enum VuoNode::TintColor VuoNode::getTintColor ( void  )

Returns this node's tint color.

Definition at line 248 of file VuoNode.cc.

◆ getTintColorGraphvizName()

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.

◆ getTintWithGraphvizName()

enum VuoNode::TintColor VuoNode::getTintWithGraphvizName ( string  name)
static

Returns the tint color corresponding to the provided Graphviz identifier.

Definition at line 378 of file VuoNode.cc.

◆ getTitle()

string VuoNode::getTitle ( void  )

Returns the node instance's title.

See also
VuoNode::VuoNode
Example:
My Awesome Sum

Definition at line 172 of file VuoNode.cc.

◆ getX()

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.

◆ getY()

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.

◆ isCollapsed()

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.

◆ isForbidden()

bool VuoNode::isForbidden ( void  )

Returns the value from VuoNode::setForbidden if any, otherwise false.

Definition at line 272 of file VuoNode.cc.

◆ isTypecastNode()

bool VuoNode::isTypecastNode ( void  )

Returns true if this node is a typecast node.

Definition at line 192 of file VuoNode.cc.

◆ print()

void VuoNode::print ( void  )

Prints info about this node and its ports, for debugging.

Definition at line 317 of file VuoNode.cc.

◆ setCollapsed()

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.

◆ setForbidden()

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.

◆ setRawGraphvizDeclaration()

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.

◆ setTintColor()

void VuoNode::setTintColor ( enum TintColor  tintColor)

Sets this node's tint color.

Definition at line 264 of file VuoNode.cc.

◆ setTitle()

void VuoNode::setTitle ( string  title)

Sets the node instance's title.

See also
VuoNode::VuoNode
Example:
My Awesome Sum

Definition at line 184 of file VuoNode.cc.

◆ setX()

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.

◆ setY()

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.


The documentation for this class was generated from the following files: