Vuo  0.4.6
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | 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

Public Types

enum  TintColor {
  TintNone, TintYellow, TintOrange, TintMagenta,
  TintViolet, TintCyan, TintGreen
}
 Possible colors with which the user can tint a node. More...
 

Public Member Functions

 VuoNode (VuoNodeClass *nodeClass, string displayName, VuoPort *refreshPort, VuoPort *donePort, 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.
 
VuoNodeClassgetNodeClass (void)
 Returns the node class this node is an instance of.
 
VuoPortgetInputPortWithName (string portName)
 Returns the input port matching the specified portName, if one exists.
 
VuoPortgetOutputPortWithName (string portName)
 Returns the output port matching the specified portName, if one exists.
 
vector< VuoPort * > getInputPorts (void)
 Returns all input ports.
 
vector< VuoPort * > getOutputPorts (void)
 Returns all output ports.
 
VuoPortgetRefreshPort (void)
 Returns the refresh port.
 
VuoPortgetDonePort (void)
 Returns the done port.
 
string getDisplayName (void)
 Returns the node instance's display name.
 
void setDisplayName (string displayName)
 Sets the node instance's display name.
 
bool isTypecastNode (void)
 Returns true if this node is a typecast node.
 
int getX (void)
 Returns the x coordinate at which this node instance is drawn in the editor.
 
void setX (int x)
 Sets the x coordinate at which this node instance is drawn in the editor.
 
int getY (void)
 Returns the y coordinate at which this node instance is drawn in the editor.
 
void setY (int y)
 Sets the y coordinate at which this node instance is drawn in the editor.
 
bool isCollapsed (void)
 Returns true if this node is to be rendered collapsed against its parent (output) node.
 
void setCollapsed (bool collapsed)
 Sets whether this node is to be rendered collapsed against its parent (output) node.
 
enum TintColor getTintColor (void)
 Returns this node's tint color.
 
string getTintColorGraphvizName (void)
 Returns this node's tint color as a Graphviz color name, or emptystring if there is no tint.
 
void setTintColor (enum TintColor tintColor)
 Sets this node's tint color.
 
void print (void)
 Prints info about this node and its ports, for debugging.
 
- Public Member Functions inherited from VuoBase< VuoCompilerNode, VuoRendererNode >
 VuoBase (string id)
 Creates a VuoNode base class.
 
void setCompiler (VuoCompilerNode *compiler)
 Sets the VuoNode base class instance's VuoCompilerNode detail class instance.
 
VuoCompilerNodegetCompiler (void) const
 Returns the VuoNode base class instance's VuoCompilerNode detail class instance.
 
bool hasCompiler (void) const
 Returns true if this base class instance has a compiler detail.
 
void setRenderer (VuoRendererNode *renderer)
 Sets the VuoNode base class instance's VuoRendererNode detail class instance.
 
VuoRendererNodegetRenderer (void) const
 Returns the VuoNode base class instance's VuoRendererNode detail class instance.
 
bool hasRenderer (void) const
 Returns true if this base class instance has a renderer detail.
 

Member Enumeration Documentation

Possible colors with which the user can tint a node.

(Red is reserved for error reporting; Blue is reserved for selection/hovering/highlighting.)

Constructor & Destructor Documentation

VuoNode::VuoNode ( VuoNodeClass nodeClass,
string  displayName,
VuoPort refreshPort,
VuoPort donePort,
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.

Member Function Documentation

string VuoNode::getDisplayName ( void  )

Returns the node instance's display name.

See Also
VuoNode::VuoNode
Example:
My Awesome Sum
VuoPort * VuoNode::getInputPortWithName ( string  portName)

Returns the input port matching the specified portName, if one exists.

Otherwise null.

VuoPort * VuoNode::getOutputPortWithName ( string  portName)

Returns the output port matching the specified portName, if one exists.

Otherwise null.

void VuoNode::setDisplayName ( string  displayName)

Sets the node instance's display name.

See Also
VuoNode::VuoNode
Example:
My Awesome Sum

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