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
.
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... | |
VuoNode * | newNode (string title="", double x=0, double y=0) |
Creates a dummy base node instance from this node class. More... | |
VuoNode * | newNode (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... | |
VuoPortClass * | getRefreshPortClass (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... | |
VuoCompilerNodeClass * | 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 (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... | |
VuoNodeSet * | getNodeSet (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... | |
VuoNodeClass::VuoNodeClass | ( | string | className, |
vector< string > | inputPortClassNames, | ||
vector< string > | outputPortClassNames | ||
) |
Create a dummy base node class with no implementation.
className | The node class name. See getClassName . |
inputPortClassNames | Strings representing the names of this node class's input ports. This list should not include the refresh port. |
outputPortClassNames | Strings representing the names of this node class's output ports. |
Definition at line 38 of file VuoNodeClass.cc.
VuoNodeClass::VuoNodeClass | ( | string | className, |
VuoPortClass * | refreshPortClass, | ||
vector< VuoPortClass * > | inputPortClasses, | ||
vector< VuoPortClass * > | outputPortClasses | ||
) |
Create a base node class with actual ports.
className | The node class name. See getClassName . |
refreshPortClass | The refresh port class. |
inputPortClasses | This node class's input ports. This list should include refreshPortClass . |
outputPortClasses | This node class's output ports. |
Definition at line 68 of file VuoNodeClass.cc.
VuoNodeClass::~VuoNodeClass | ( | void | ) |
Destructor.
Definition at line 82 of file VuoNodeClass.cc.
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.]
Definition at line 144 of file VuoNodeClass.cc.
bool VuoNodeClass::getDeprecated | ( | void | ) |
Returns a boolean indicating whether this node is deprecated.
Definition at line 242 of file VuoNodeClass.cc.
vector< string > VuoNodeClass::getExampleCompositionFileNames | ( | void | ) |
Returns a list of example compositions that demonstrate this node class.
Definition at line 220 of file VuoNodeClass.cc.
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.
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.
VuoPortClass * VuoNodeClass::getRefreshPortClass | ( | void | ) |
Returns the node class's refresh port class.
Definition at line 260 of file VuoNodeClass.cc.
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.
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.
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.
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.
void VuoNodeClass::print | ( | void | ) |
Prints info about this node class and its ports, for debugging.
Definition at line 314 of file VuoNodeClass.cc.
void VuoNodeClass::setDeprecated | ( | bool | deprecated | ) |
Sets the boolean indicating whether this node is deprecated.
Definition at line 252 of file VuoNodeClass.cc.
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.
Definition at line 232 of file VuoNodeClass.cc.
void VuoNodeClass::setInputPortClasses | ( | vector< VuoPortClass * > | inputPortClasses | ) |
Sets the node class's list of input port classes.
Definition at line 288 of file VuoNodeClass.cc.
void VuoNodeClass::setOutputPortClasses | ( | vector< VuoPortClass * > | outputPortClasses | ) |
Sets the node class's list of output port classes.
Definition at line 306 of file VuoNodeClass.cc.
void VuoNodeClass::setRefreshPortClass | ( | VuoPortClass * | refreshPortClass | ) |
Sets the node class's refresh port class.
Definition at line 268 of file VuoNodeClass.cc.
|
static |
The class name of the Vuo published input pseudo-node.
Definition at line 35 of file VuoNodeClass.hh.
|
static |
The Graphviz identifier of the Vuo published input pseudo-node.
Definition at line 37 of file VuoNodeClass.hh.
|
static |
The class name of the Vuo published output pseudo-node.
Definition at line 36 of file VuoNodeClass.hh.
|
static |
The Graphviz identifier of the Vuo published output pseudo-node.
Definition at line 38 of file VuoNodeClass.hh.
|
static |
The starting index for unreserved input ports within the inputPortClasses
list.
Definition at line 33 of file VuoNodeClass.hh.
|
static |
The starting index for unreserved output ports within the outputPortClasses
list.
Definition at line 34 of file VuoNodeClass.hh.