Vuo
0.4.3
|
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 *receptorClass, vector< VuoPortClass * > inputPortClasses, vector< VuoPortClass * > outputPortClasses) | |
Create a base node class with actual ports. | |
VuoNode * | newNode (string displayName="", double x=0, double y=0) |
Creates a dummy base node instance from this node class. | |
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 | isProvider (void) |
If true, this node class provides data to the composition from somewhere external to the composition (e.g., input device, file, network). | |
void | setProvider (bool isProvider) |
Sets whether this node class is a provider. | |
bool | isConsumer (void) |
If true, this node class consumes data from the composition, sending it somewhere external to the composition (e.g., output device, file, network). | |
void | setConsumer (bool isConsumer) |
Sets whether this node class is a consumer. | |
VuoPortClass * | getReceptorClass (void) |
Returns the node class's receptor port class. | |
void | setReceptorClass (VuoPortClass *receptorClass) |
Sets the node class's receptor port class. | |
vector< VuoPortClass * > | getInputPortClasses (void) |
Returns a list of the node class's input port classes, in the order defined in the node class implementation's event function, with the exception that the receptor port is always present (even if not specified in the node class implementation's event function) and is always first. | |
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, in the order defined in the node class implementation's event function. | |
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. | |
string | getDefaultDisplayName (void) |
Returns the default display name for instances of this module, as specified by the .bc implementation. | |
void | setDefaultDisplayName (string defaultDisplayName) |
Sets the default display name for instances of this module. | |
string | getDescription (void) |
Returns the description of this module provided as documentation. | |
void | setDescription (string description) |
Sets the description of this module provided as documentation. | |
unsigned int | getVersion (void) |
Returns the module's version, represented as an integer. | |
void | setVersion (unsigned int version) |
Sets the module's version, represented as an integer. | |
vector< string > | getKeywords (void) |
Returns a list of the module's keywords. | |
void | setKeywords (vector< string > keywords) |
Sets the module's keywords. | |
Static Public Attributes | |
static const int | unreservedInputPortStartIndex = 1 |
The starting index for unreserved input ports within the inputPortClasses list. | |
static const int | unreservedOutputPortStartIndex = 0 |
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. | |
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 receptor. |
outputPortClassNames | Strings representing the names of this node class's output ports. |
VuoNodeClass::VuoNodeClass | ( | string | className, |
VuoPortClass * | receptorClass, | ||
vector< VuoPortClass * > | inputPortClasses, | ||
vector< VuoPortClass * > | outputPortClasses | ||
) |
Create a base node class with actual ports.
className | The node class name. See getClassName . |
receptorClass | The receptor port class. |
inputPortClasses | This node class's input ports. This list should include receptorClass . |
outputPortClasses | This node class's output ports. |
string VuoNodeClass::getClassName | ( | void | ) |
The unique class name for this node class.
Matches the .bc filename, minus the extension.
Possible characters: [A-Za-z0-9.]
bool VuoNodeClass::isConsumer | ( | void | ) |
If true, this node class consumes data from the composition, sending it somewhere external to the composition (e.g., output device, file, network).
bool VuoNodeClass::isProvider | ( | void | ) |
If true, this node class provides data to the composition 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 | displayName = "" , |
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.
void VuoNodeClass::setConsumer | ( | bool | isConsumer | ) |
Sets whether this node class is a consumer.
void VuoNodeClass::setProvider | ( | bool | isProvider | ) |
Sets whether this node class is a provider.