Vuo  0.4.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
Node Parameters

Description

Parameter decorations to be used by node classes.

Macros

#define VuoInstanceData(type)
 Use this to decorate parameters referring to a stateful node's instance data structure.
 
#define VuoInputData(type, default)
 Use this to decorate parameters acting as data input ports.
 
#define VuoInputConductor(conductivity, name)
 Use this to decorate parameters acting as event input ports.
 
#define VuoInputReceptor
 Use this to decorate the receptor parameter.
 
#define VuoOutputData(type)
 Use this to decorate parameters acting as data output ports.
 
#define VuoOutputConductor(name)
 Use this to decorate parameters acting as event output ports.
 
#define VuoOutputTrigger(name, type)
 Use this to decorate parameters acting as event triggers.
 

Macro Definition Documentation

#define VuoInputConductor (   conductivity,
  name 
)

Use this to decorate parameters acting as event input ports.

Indicates whether this particular input port was pushed. The input port name should use lowerCamelCase.

Parameters
conductivityA value of type VuoPortConductivity, indicating the port's type of conductivity.
nameThe identifier of the corresponding data port, or blank if this is intended to be an event-only input port.
Example:
void nodeEvent(VuoInputData(VuoInteger,"0") seconds, VuoInputConductor(VuoPortNeverConducts,seconds) secondsPushed);
Example:
#define VuoInputData (   type,
  default 
)

Use this to decorate parameters acting as data input ports.

The input port name should use lowerCamelCase.

Parameters
typeThis input port's C type. Must be a typedef from a Vuo type definition.
defaultThe literal default value for this port. The default value must be represented as a string.
Example:
void nodeEvent(VuoInputData(VuoInteger,"0") seconds);
#define VuoInputReceptor

Use this to decorate the receptor parameter.

Indicates whether the node's receptor port was pushed.

Example:
void nodeEvent(VuoInputReceptor receptor);
#define VuoInstanceData (   type)

Use this to decorate parameters referring to a stateful node's instance data structure.

Parameters
typeThe instance data's C type.
Example:
#define VuoOutputConductor (   name)

Use this to decorate parameters acting as event output ports.

Indicates whether a push should be conducted through this particular output port. The output port name should use lowerCamelCase. Allowed only if nodeAlwaysConducts=false.

Parameters
nameThe identifier of the corresponding data port, or blank if this is intended to be an event-only output port.
Example:
void nodeEvent(VuoOutputData(VuoInteger) seconds, VuoOutputConductor(seconds) secondsPush);
Example:
void nodeEvent(VuoOutputConductor() started);
#define VuoOutputData (   type)

Use this to decorate parameters acting as data output ports.

The output port name should use lowerCamelCase.

Parameters
typeThis output port's C type. Must be a typedef from a Vuo type definition.
Example:
#define VuoOutputTrigger (   name,
  type 
)

Use this to decorate parameters acting as event triggers.

Indicates whether an event should be fired from this particular output port. Allowed only if nodeAlwaysConducts=false.

Parameters
nameThe identifier of the triggers function. Use lowerCamelCase.
typeThe C type of the data passed along when an event is fired.
Example:
void nodeEvent(VuoOutputTrigger(started,void))
{
// Generate an event without any data.
started();
}
Example:
void nodeEvent(VuoOutputTrigger(ding,int))
{
// Generate an event with stack data.
ding(5);
}
Example:
void nodeEvent(VuoOutputTrigger(ding,char *))
{
// Generate an event with heap data.
char *heapData = (char *)malloc(strlen("hello")+1);
strcpy(heapData, "hello");
ding(heapData);
VuoRelease(heapData);
}