Vuo  0.9.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
VuoCompilerTriggerPort Class Reference

Description

A trigger output port.

See Also
{VuoCompilerTriggerPortClass}

Public Member Functions

 VuoCompilerTriggerPort (VuoPort *basePort)
 Creates a trigger port based on portClass.
 
void generateAllocation (Module *module, string nodeInstanceIdentifier)
 Generates code to allocate global variables for this trigger.
 
void generateInitialization (Module *module, BasicBlock *block)
 Generates code to initialize the global variables for this trigger.
 
void generateFinalization (Module *module, BasicBlock *block)
 Generates code to finalize the global variables for this trigger.
 
Function * generateAsynchronousSubmissionToDispatchQueue (Module *module, BasicBlock *block, string identifier)
 Generates code to submit a task to this trigger's dispatch queue.
 
Function * generateSynchronousSubmissionToDispatchQueue (Module *module, BasicBlock *block, string identifier)
 Generates code to submit a task to this trigger's dispatch queue.
 
Value * generateDataValueUpdate (Module *module, BasicBlock *block, Function *triggerWorker)
 Generates code to update the trigger's data value (if any) with the worker function argument.
 
void generateDataValueDiscard (Module *module, BasicBlock *block, Function *triggerWorker)
 Generates code to discard the worker function argument without updating the trigger's data value (if any).
 
LoadInst * generateLoad (BasicBlock *block)
 Does nothing.
 
StoreInst * generateStore (Value *value, BasicBlock *block)
 Does nothing.
 
void setFunction (Function *function)
 Sets the function that's called each time the trigger port generates a push.
 
Function * getFunction (void)
 Returns the function that's called each time the trigger port generates a push.
 
GlobalVariable * getPreviousDataVariable (void)
 Returns the variable that stores the most recent data value fired from this trigger, or NULL if the trigger is event-only.
 
Type * getDataType (void)
 Returns the type of data associated with the trigger, or NULL if the trigger is event-only.
 
VuoCompilerTriggerPortClassgetClass (void)
 Returns the trigger port class of this trigger port.
 
string getIdentifier (void)
 Returns a unique, consistent identifier for this port.
 
- Public Member Functions inherited from VuoCompilerPort
bool hasConnectedCable (bool includePublishedCables) const
 Returns a boolean indicating whether this port has any attached cables.
 
bool hasConnectedDataCable (bool includePublishedCables) const
 Returns a boolean indicating whether this port has any attached data+event cables.
 
VuoTypegetDataVuoType (void)
 Returns tthis port's data type, or null if this port is event-only.
 
void setDataVuoType (VuoType *dataType)
 Sets the data type for this port, overriding the type from the port class.
 
- Public Member Functions inherited from VuoCompilerNodeArgument
GlobalVariable * getVariable (void)
 Returns the global variable to store the argument's value, if generateAllocation has been called.
 
- Public Member Functions inherited from VuoBaseDetail< VuoPort >
 VuoBaseDetail (string description, VuoPort *base)
 Creates a VuoNode detail class.
 
VuoPortgetBase (void) const
 Returns the VuoNode detail class instance's base class instance.
 
void setBase (VuoPort *base)
 Sets the VuoNode detail class instance's base class instance.
 

Additional Inherited Members

- Protected Member Functions inherited from VuoCompilerPort
 VuoCompilerPort (VuoPort *basePort)
 Creates a compiler detail from a given basePort.
 
- Protected Attributes inherited from VuoCompilerNodeArgument
GlobalVariable * variable
 The global variable in the generated code in which this argument is stored.
 

Constructor & Destructor Documentation

VuoCompilerTriggerPort::VuoCompilerTriggerPort ( VuoPort basePort)

Creates a trigger port based on portClass.

Member Function Documentation

void VuoCompilerTriggerPort::generateAllocation ( Module *  module,
string  nodeInstanceIdentifier 
)
virtual

Generates code to allocate global variables for this trigger.

Reimplemented from VuoCompilerNodeArgument.

Function * VuoCompilerTriggerPort::generateAsynchronousSubmissionToDispatchQueue ( Module *  module,
BasicBlock *  block,
string  identifier 
)

Generates code to submit a task to this trigger's dispatch queue.

Returns the worker function, which will be called by the dispatch queue to execute the task. The caller is responsible for filling in the body of the worker function.

Assumes block is inside the function associated with this trigger. Passes the argument of that function, if any, as the context which will be passed to the worker function.

void VuoCompilerTriggerPort::generateDataValueDiscard ( Module *  module,
BasicBlock *  block,
Function *  triggerWorker 
)

Generates code to discard the worker function argument without updating the trigger's data value (if any).

Value * VuoCompilerTriggerPort::generateDataValueUpdate ( Module *  module,
BasicBlock *  block,
Function *  triggerWorker 
)

Generates code to update the trigger's data value (if any) with the worker function argument.

Returns
The trigger's new data value.
void VuoCompilerTriggerPort::generateFinalization ( Module *  module,
BasicBlock *  block 
)

Generates code to finalize the global variables for this trigger.

void VuoCompilerTriggerPort::generateInitialization ( Module *  module,
BasicBlock *  block 
)

Generates code to initialize the global variables for this trigger.

LoadInst * VuoCompilerTriggerPort::generateLoad ( BasicBlock *  block)
virtual

Does nothing.

Reimplemented from VuoCompilerNodeArgument.

StoreInst * VuoCompilerTriggerPort::generateStore ( Value *  value,
BasicBlock *  block 
)
virtual

Does nothing.

Reimplemented from VuoCompilerNodeArgument.

Function * VuoCompilerTriggerPort::generateSynchronousSubmissionToDispatchQueue ( Module *  module,
BasicBlock *  block,
string  identifier 
)

Generates code to submit a task to this trigger's dispatch queue.

Returns the worker function, which will be called by the dispatch queue to execute the task. The caller is responsible for filling in the body of the worker function.

VuoCompilerTriggerPortClass * VuoCompilerTriggerPort::getClass ( void  )

Returns the trigger port class of this trigger port.

Type * VuoCompilerTriggerPort::getDataType ( void  )

Returns the type of data associated with the trigger, or NULL if the trigger is event-only.

Function * VuoCompilerTriggerPort::getFunction ( void  )

Returns the function that's called each time the trigger port generates a push.

string VuoCompilerTriggerPort::getIdentifier ( void  )
virtual

Returns a unique, consistent identifier for this port.

Assumes generateAllocation has been called.

Implements VuoCompilerPort.

GlobalVariable * VuoCompilerTriggerPort::getPreviousDataVariable ( void  )

Returns the variable that stores the most recent data value fired from this trigger, or NULL if the trigger is event-only.

void VuoCompilerTriggerPort::setFunction ( Function *  function)

Sets the function that's called each time the trigger port generates a push.


The documentation for this class was generated from the following files: