Vuo
0.8.0
|
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
.
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. | |
VuoNode * | newNode (string title="", double x=0, double y=0) |
Creates a dummy base node instance from this node class. | |
VuoNode * | newNode (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. | |
VuoPortClass * | getRefreshPortClass (void) |
Returns the node class's refresh port class. | |
void | setRefreshPortClass (VuoPortClass *refreshPortClass) |
Sets the node class's refresh port class. | |
VuoPortClass * | getDonePortClass (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. | |
void | print (void) |
Prints info about this node class and its ports, for debugging. | |
![]() | |
VuoBase (string id) | |
Creates a VuoNodeClass base class. | |
void | setCompiler (VuoCompilerNodeClass *compiler) |
Sets the VuoNodeClass base class instance's VuoCompilerNodeClass detail class instance. | |
VuoCompilerNodeClass * | getCompiler (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. | |
![]() | |
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. | |
VuoNodeSet * | getNodeSet (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. | |
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 or done port. |
outputPortClassNames | Strings 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.
className | The node class name. See getClassName . |
refreshPortClass | The refresh port class. |
donePortClass | The done port class. |
inputPortClasses | This node class's input ports. This list should include refreshPortClass . |
outputPortClasses | This node class's output ports. |
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.]
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.
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).
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.
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.
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.
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.
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.
|
static |
The class name of the Vuo published input pseudo-node.
|
static |
The Graphviz identifier of the Vuo published input pseudo-node.
|
static |
The name of the Vuo published input port that can fire an event for all published input ports simultaneously.
|
static |
The class name of the Vuo published output pseudo-node.
|
static |
The Graphviz identifier of the Vuo published output pseudo-node.
|
static |
The starting index for unreserved input ports within the inputPortClasses
list.
|
static |
The starting index for unreserved output ports within the outputPortClasses
list.