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 | isProvider (void) |
If true, this node class provides data to the graph from somewhere external to the graph (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 graph, sending it somewhere external to the graph (e.g., output device, file, network). | |
void | setConsumer (bool isConsumer) |
Sets whether this node class is a consumer. | |
bool | isAlwaysConductive (void) |
If true, instances of this node class are guaranteed to conduct all input pushes to all output ports, except Generator ports. | |
void | setAlwaysConductive (bool isAlwaysConductive) |
Sets whether this node always conducts. | |
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. | |
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. | |
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. | |
Public Member Functions inherited from VuoModule | |
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. | |
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::isAlwaysConductive | ( | void | ) |
If true, instances of this node class are guaranteed to conduct all input pushes to all output ports, except Generator ports.
If false, input pushes are conducted at the discretion of the node class implementation.
bool VuoNodeClass::isConsumer | ( | void | ) |
If true, this node class consumes data from the graph, sending it somewhere external to the graph (e.g., output device, file, network).
bool VuoNodeClass::isProvider | ( | void | ) |
If true, this node class provides data to the graph from somewhere external to the graph (e.g., input device, file, network).
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::setAlwaysConductive | ( | bool | isAlwaysConductive | ) |
Sets whether this node always conducts.
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.