Vuo  2.0.1
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

Definition at line 26 of file VuoNodeClass.hh.

Public Member Functions

 VuoNodeClass (string className, vector< string > inputPortClassNames, vector< string > outputPortClassNames)
 Create a dummy base node class with no implementation. More...
 
 VuoNodeClass (string className, VuoPortClass *refreshPortClass, vector< VuoPortClass * > inputPortClasses, vector< VuoPortClass * > outputPortClasses)
 Create a base node class with actual ports. More...
 
 ~VuoNodeClass (void)
 Destructor. More...
 
VuoNodenewNode (string title="", double x=0, double y=0)
 Creates a dummy base node instance from this node class. More...
 
VuoNodenewNode (VuoNode *nodeToCopyMetadataFrom)
 Creates a dummy base node instance with its metadata copied from the existing nodeToCopyMetadataFrom. More...
 
string getClassName (void)
 The unique class name for this node class. More...
 
bool isTypecastNodeClass (void)
 Returns true if this node class is a typecast node class. More...
 
bool isDrawerNodeClass (void)
 Returns true if this node class is a 'Make List' or 'Make Dictionary' node class. More...
 
vector< string > getExampleCompositionFileNames (void)
 Returns a list of example compositions that demonstrate this node class. More...
 
void setExampleCompositionFileNames (vector< string > exampleCompositionFileNames)
 Sets the list of example compositions that demonstrate this node class. More...
 
bool getDeprecated (void)
 Returns a boolean indicating whether this node is deprecated. More...
 
void setDeprecated (bool deprecated)
 Sets the boolean indicating whether this node is deprecated. More...
 
VuoPortClassgetRefreshPortClass (void)
 Returns the node class's refresh port class. More...
 
void setRefreshPortClass (VuoPortClass *refreshPortClass)
 Sets the node class's refresh port class. More...
 
vector< VuoPortClass * > getInputPortClasses (void)
 Returns a list of the node class's input port classes. More...
 
void setInputPortClasses (vector< VuoPortClass * > inputPortClasses)
 Sets the node class's list of input port classes. More...
 
vector< VuoPortClass * > getOutputPortClasses (void)
 Returns a list of the node class's output port classes. More...
 
void setOutputPortClasses (vector< VuoPortClass * > outputPortClasses)
 Sets the node class's list of output port classes. More...
 
void print (void)
 Prints info about this node class and its ports, for debugging. More...
 
- Public Member Functions inherited from VuoBase< VuoCompilerNodeClass, void >
 VuoBase (string id)
 Creates a base class. More...
 
void setCompiler (VuoCompilerNodeClass *compiler)
 Sets the base class instance's compiler detail class instance. More...
 
VuoCompilerNodeClassgetCompiler (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 (void *renderer)
 Sets the base class instance's renderer detail class instance. More...
 
void * 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...
 
- Public Member Functions inherited from VuoModule
 VuoModule (string moduleKey)
 Creates a module. More...
 
string getModuleKey (void)
 Returns this module's unique name. More...
 
void setModuleKey (string moduleKey)
 Sets this module's unique name. More...
 
string getDefaultTitle (void)
 Returns the default title for instances of this module, as specified by the .vuonode/.bc implementation. More...
 
string getDefaultTitleWithoutSuffix (void)
 Returns the default title, with the optional parenthetical suffix removed. More...
 
void setDefaultTitle (string defaultTitle)
 Sets the default title for instances of this module. More...
 
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. More...
 
void setDescription (string description)
 Sets the description of this module provided as documentation. More...
 
string getVersion (void)
 Returns the module's version, in Semantic Versioning format. More...
 
void setVersion (string version)
 Sets the module's version, in Semantic Versioning format. More...
 
vector< string > getKeywords (void)
 Returns a list of the module's keywords. More...
 
void setKeywords (vector< string > keywords)
 Sets the module's keywords. More...
 
VuoNodeSetgetNodeSet (void)
 Returns the node set containing this module. More...
 
void setNodeSet (VuoNodeSet *nodeSet)
 Sets the node set containing this module. More...
 

Static Public Attributes

static const int unreservedInputPortStartIndex = 1
 The starting index for unreserved input ports within the inputPortClasses list. More...
 
static const int unreservedOutputPortStartIndex = 0
 The starting index for unreserved output ports within the outputPortClasses list. More...
 
static const string publishedInputNodeClassName = "vuo.in"
 The class name of the Vuo published input pseudo-node. More...
 
static const string publishedOutputNodeClassName = "vuo.out"
 The class name of the Vuo published output pseudo-node. More...
 
static const string publishedInputNodeIdentifier = "PublishedInputs"
 The Graphviz identifier of the Vuo published input pseudo-node. More...
 
static const string publishedOutputNodeIdentifier = "PublishedOutputs"
 The Graphviz identifier of the Vuo published output pseudo-node. More...
 

Constructor & Destructor Documentation

◆ VuoNodeClass() [1/2]

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 port.
outputPortClassNamesStrings representing the names of this node class's output ports.

Definition at line 38 of file VuoNodeClass.cc.

◆ VuoNodeClass() [2/2]

VuoNodeClass::VuoNodeClass ( string  className,
VuoPortClass refreshPortClass,
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.
inputPortClassesThis node class's input ports. This list should include refreshPortClass.
outputPortClassesThis node class's output ports.

Definition at line 68 of file VuoNodeClass.cc.

◆ ~VuoNodeClass()

VuoNodeClass::~VuoNodeClass ( void  )

Destructor.

Definition at line 82 of file VuoNodeClass.cc.

Member Function Documentation

◆ getClassName()

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

Definition at line 144 of file VuoNodeClass.cc.

◆ getDeprecated()

bool VuoNodeClass::getDeprecated ( void  )

Returns a boolean indicating whether this node is deprecated.

See also
VuoModuleMetadata

Definition at line 242 of file VuoNodeClass.cc.

◆ getExampleCompositionFileNames()

vector< string > VuoNodeClass::getExampleCompositionFileNames ( void  )

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

See also
VuoModuleMetadata

Definition at line 220 of file VuoNodeClass.cc.

◆ getInputPortClasses()

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.

Definition at line 280 of file VuoNodeClass.cc.

◆ getOutputPortClasses()

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.

Definition at line 298 of file VuoNodeClass.cc.

◆ getRefreshPortClass()

VuoPortClass * VuoNodeClass::getRefreshPortClass ( void  )

Returns the node class's refresh port class.

Definition at line 260 of file VuoNodeClass.cc.

◆ isDrawerNodeClass()

bool VuoNodeClass::isDrawerNodeClass ( void  )

Returns true if this node class is a 'Make List' or 'Make Dictionary' node class.

Definition at line 208 of file VuoNodeClass.cc.

◆ isTypecastNodeClass()

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.

Definition at line 154 of file VuoNodeClass.cc.

◆ newNode() [1/2]

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.

Definition at line 96 of file VuoNodeClass.cc.

◆ newNode() [2/2]

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.

Definition at line 125 of file VuoNodeClass.cc.

◆ print()

void VuoNodeClass::print ( void  )

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

Definition at line 314 of file VuoNodeClass.cc.

◆ setDeprecated()

void VuoNodeClass::setDeprecated ( bool  deprecated)

Sets the boolean indicating whether this node is deprecated.

See also
VuoModuleMetadata

Definition at line 252 of file VuoNodeClass.cc.

◆ setExampleCompositionFileNames()

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

Definition at line 232 of file VuoNodeClass.cc.

◆ setInputPortClasses()

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

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

Definition at line 288 of file VuoNodeClass.cc.

◆ setOutputPortClasses()

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

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

Definition at line 306 of file VuoNodeClass.cc.

◆ setRefreshPortClass()

void VuoNodeClass::setRefreshPortClass ( VuoPortClass refreshPortClass)

Sets the node class's refresh port class.

Definition at line 268 of file VuoNodeClass.cc.

Member Data Documentation

◆ publishedInputNodeClassName

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

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

Definition at line 35 of file VuoNodeClass.hh.

◆ publishedInputNodeIdentifier

const string VuoNodeClass::publishedInputNodeIdentifier = "PublishedInputs"
static

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

Definition at line 37 of file VuoNodeClass.hh.

◆ publishedOutputNodeClassName

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

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

Definition at line 36 of file VuoNodeClass.hh.

◆ publishedOutputNodeIdentifier

const string VuoNodeClass::publishedOutputNodeIdentifier = "PublishedOutputs"
static

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

Definition at line 38 of file VuoNodeClass.hh.

◆ unreservedInputPortStartIndex

const int VuoNodeClass::unreservedInputPortStartIndex = 1
static

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

Definition at line 33 of file VuoNodeClass.hh.

◆ unreservedOutputPortStartIndex

const int VuoNodeClass::unreservedOutputPortStartIndex = 0
static

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

Definition at line 34 of file VuoNodeClass.hh.


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