Vuo  0.6.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | List of all members
VuoNodeClass Class Reference

Description

This base class represents the metadata and implementation of one node class — i.e., for each node implementation file, there is one instance of VuoNodeClass.

To instantiate a node implemented by this node class, create an instance of VuoNode using VuoNodeClass::newNode or VuoCompilerNodeClass::newNode.

See Also
VuoCompilerNodeClass

Public Member Functions

 VuoNodeClass (string className, vector< string > inputPortClassNames, vector< string > outputPortClassNames)
 Create a dummy base node class with no implementation.
 
 VuoNodeClass (string className, VuoPortClass *refreshPortClass, VuoPortClass *donePortClass, vector< VuoPortClass * > inputPortClasses, vector< VuoPortClass * > outputPortClasses)
 Create a base node class with actual ports.
 
VuoNodenewNode (string title="", double x=0, double y=0)
 Creates a dummy base node instance from this node class.
 
VuoNodenewNode (VuoNode *nodeToCopyMetadataFrom)
 Creates a dummy base node instance with its metadata copied from the existing nodeToCopyMetadataFrom.
 
string getClassName (void)
 The unique class name for this node class.
 
bool isTypecastNodeClass (void)
 Returns true if this node class is a typecast node class.
 
bool isInterface (void)
 If true, this node class sends data to or receives data from somewhere external to the composition (e.g., input device, file, network).
 
void setInterface (bool isInterface)
 Sets whether this node class is an interface.
 
vector< string > getExampleCompositionFileNames (void)
 Returns a list of example compositions that demonstrate this node class.
 
void setExampleCompositionFileNames (vector< string > exampleCompositionFileNames)
 Sets the list of example compositions that demonstrate this node class.
 
VuoPortClassgetRefreshPortClass (void)
 Returns the node class's refresh port class.
 
void setRefreshPortClass (VuoPortClass *refreshPortClass)
 Sets the node class's refresh port class.
 
VuoPortClassgetDonePortClass (void)
 Returns the node class's done port class.
 
void setDonePortClass (VuoPortClass *donePortClass)
 Sets the node class's done port class.
 
vector< VuoPortClass * > getInputPortClasses (void)
 Returns a list of the node class's input port classes.
 
void setInputPortClasses (vector< VuoPortClass * > inputPortClasses)
 Sets the node class's list of input port classes.
 
vector< VuoPortClass * > getOutputPortClasses (void)
 Returns a list of the node class's output port classes.
 
void setOutputPortClasses (vector< VuoPortClass * > outputPortClasses)
 Sets the node class's list of output port classes.
 
vector< string > getAutomaticKeywords (void)
 Returns a list of keywords automatically associated with this node class, based on attributes such as its port classes.
 
void print (void)
 Prints info about this node class and its ports, for debugging.
 
- Public Member Functions inherited from VuoBase< VuoCompilerNodeClass, void >
 VuoBase (string id)
 Creates a VuoNodeClass base class.
 
void setCompiler (VuoCompilerNodeClass *compiler)
 Sets the VuoNodeClass base class instance's VuoCompilerNodeClass detail class instance.
 
VuoCompilerNodeClassgetCompiler (void) const
 Returns the VuoNodeClass base class instance's VuoCompilerNodeClass detail class instance.
 
bool hasCompiler (void) const
 Returns true if this base class instance has a compiler detail.
 
void setRenderer (void *renderer)
 Does nothing.
 
void * getRenderer (void) const
 Does nothing.
 
bool hasRenderer (void) const
 Returns false.
 
- Public Member Functions inherited from VuoModule
 VuoModule (string moduleKey)
 Creates a module.
 
string getModuleKey (void)
 Returns this module's unique name.
 
void setModuleKey (string moduleKey)
 Sets this module's unique name.
 
string getDefaultTitle (void)
 Returns the default title for instances of this module, as specified by the .vuonode/.bc implementation.
 
void setDefaultTitle (string defaultTitle)
 Sets the default title for instances of this module.
 
string getDescription (void)
 Returns the description given in the module's metadata, or if none is given, the description found in a separate file in the module's node set.
 
void setDescription (string description)
 Sets the description of this module provided as documentation.
 
string getVersion (void)
 Returns the module's version, in Semantic Versioning format.
 
void setVersion (string version)
 Sets the module's version, in Semantic Versioning format.
 
vector< string > getKeywords (void)
 Returns a list of the module's keywords.
 
void setKeywords (vector< string > keywords)
 Sets the module's keywords.
 
VuoNodeSetgetNodeSet (void)
 Returns the node set containing this module.
 
void setNodeSet (VuoNodeSet *nodeSet)
 Sets the node set containing this module.
 

Static Public Attributes

static const int unreservedInputPortStartIndex = 1
 The starting index for unreserved input ports within the inputPortClasses list.
 
static const int unreservedOutputPortStartIndex = 1
 The starting index for unreserved output ports within the outputPortClasses list.
 
static const string publishedInputNodeClassName = "vuo.in"
 The class name of the Vuo published input pseudo-node.
 
static const string publishedOutputNodeClassName = "vuo.out"
 The class name of the Vuo published output pseudo-node.
 
static const string publishedInputNodeIdentifier = "PublishedInputs"
 The Graphviz identifier of the Vuo published input pseudo-node.
 
static const string publishedOutputNodeIdentifier = "PublishedOutputs"
 The Graphviz identifier of the Vuo published output pseudo-node.
 
static const string publishedInputNodeSimultaneousTriggerName = "vuoSimultaneous"
 The name of the Vuo published input port that can fire an event for all published input ports simultaneously.
 

Constructor & Destructor Documentation

VuoNodeClass::VuoNodeClass ( string  className,
vector< string >  inputPortClassNames,
vector< string >  outputPortClassNames 
)

Create a dummy base node class with no implementation.

Parameters
classNameThe node class name. See getClassName.
inputPortClassNamesStrings representing the names of this node class's input ports. This list should not include the refresh or done port.
outputPortClassNamesStrings representing the names of this node class's output ports.
VuoNodeClass::VuoNodeClass ( string  className,
VuoPortClass refreshPortClass,
VuoPortClass donePortClass,
vector< VuoPortClass * >  inputPortClasses,
vector< VuoPortClass * >  outputPortClasses 
)

Create a base node class with actual ports.

Parameters
classNameThe node class name. See getClassName.
refreshPortClassThe refresh port class.
donePortClassThe done port class.
inputPortClassesThis node class's input ports. This list should include refreshPortClass.
outputPortClassesThis node class's output ports.

Member Function Documentation

vector< string > VuoNodeClass::getAutomaticKeywords ( void  )

Returns a list of keywords automatically associated with this node class, based on attributes such as its port classes.

string VuoNodeClass::getClassName ( void  )

The unique class name for this node class.

Matches the .vuonode filename, minus the extension.

Possible characters: [A-Za-z0-9.]

Example:
vuo.math.lessThan.i64
VuoPortClass * VuoNodeClass::getDonePortClass ( void  )

Returns the node class's done port class.

vector< string > VuoNodeClass::getExampleCompositionFileNames ( void  )

Returns a list of example compositions that demonstrate this node class.

See Also
VuoModuleMetadata
vector< VuoPortClass * > VuoNodeClass::getInputPortClasses ( void  )

Returns a list of the node class's input port classes.

The port classes are listed in the order defined in the node class implementation's event function, with the exception that the refresh port is always present (even if not specified in the node class implementation's event function) and is always first.

vector< VuoPortClass * > VuoNodeClass::getOutputPortClasses ( void  )

Returns a list of the node class's output port classes.

The port classes are listed in the order defined in the node class implementation's event function, with the exception that the done port is always present (even if not specified in the node class implementation's event function) and is always first.

VuoPortClass * VuoNodeClass::getRefreshPortClass ( void  )

Returns the node class's refresh port class.

bool VuoNodeClass::isInterface ( void  )

If true, this node class sends data to or receives data from somewhere external to the composition (e.g., input device, file, network).

See Also
VuoModuleMetadata
bool VuoNodeClass::isTypecastNodeClass ( void  )

Returns true if this node class is a typecast node class.

A typecast node class is a node that has exactly 1 data+event input port and 1 data+event or event-only output port.

Todo:
Temporary workaround. Instead use VuoNode::isCollapsed() elsewhere. (https://b33p.net/kosada/node/5477)
VuoNode * VuoNodeClass::newNode ( string  title = "",
double  x = 0,
double  y = 0 
)

Creates a dummy base node instance from this node class.

The node by this method does not include a VuoCompilerNode. If you want to create a substantial node instance, use VuoCompilerNodeClass::newNode instead.

VuoNode * VuoNodeClass::newNode ( VuoNode nodeToCopyMetadataFrom)

Creates a dummy base node instance with its metadata copied from the existing nodeToCopyMetadataFrom.

The node returned by this method does not include a VuoCompilerNode. If you want to create a substantial node instance, use VuoCompilerNodeClass::newNode instead.

void VuoNodeClass::print ( void  )

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

void VuoNodeClass::setDonePortClass ( VuoPortClass donePortClass)

Sets the node class's done port class.

void VuoNodeClass::setExampleCompositionFileNames ( vector< string >  exampleCompositionFileNames)

Sets the list of example compositions that demonstrate this node class.

The example compositions and the node class must be packaged together in a node set.

See Also
VuoModuleMetadata
void VuoNodeClass::setInputPortClasses ( vector< VuoPortClass * >  inputPortClasses)

Sets the node class's list of input port classes.

void VuoNodeClass::setInterface ( bool  isInterface)

Sets whether this node class is an interface.

See Also
VuoModuleMetadata
void VuoNodeClass::setOutputPortClasses ( vector< VuoPortClass * >  outputPortClasses)

Sets the node class's list of output port classes.

void VuoNodeClass::setRefreshPortClass ( VuoPortClass refreshPortClass)

Sets the node class's refresh port class.

Member Data Documentation

const string VuoNodeClass::publishedInputNodeClassName = "vuo.in"
static

The class name of the Vuo published input pseudo-node.

const string VuoNodeClass::publishedInputNodeIdentifier = "PublishedInputs"
static

The Graphviz identifier of the Vuo published input pseudo-node.

const string VuoNodeClass::publishedInputNodeSimultaneousTriggerName = "vuoSimultaneous"
static

The name of the Vuo published input port that can fire an event for all published input ports simultaneously.

const string VuoNodeClass::publishedOutputNodeClassName = "vuo.out"
static

The class name of the Vuo published output pseudo-node.

const string VuoNodeClass::publishedOutputNodeIdentifier = "PublishedOutputs"
static

The Graphviz identifier of the Vuo published output pseudo-node.

const int VuoNodeClass::unreservedInputPortStartIndex = 1
static

The starting index for unreserved input ports within the inputPortClasses list.

const int VuoNodeClass::unreservedOutputPortStartIndex = 1
static

The starting index for unreserved output ports within the outputPortClasses list.


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