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

Description

The callback that executes when a trigger port on a node generates an event.

Public Member Functions

 VuoCompilerTriggerAction (VuoCompilerTriggerPort *port, VuoCompilerNode *node)
 Creates a trigger callback.
 
void generateAllocation (Module *module)
 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).
 
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.
 

Constructor & Destructor Documentation

VuoCompilerTriggerAction::VuoCompilerTriggerAction ( VuoCompilerTriggerPort port,
VuoCompilerNode node 
)

Creates a trigger callback.

Member Function Documentation

void VuoCompilerTriggerAction::generateAllocation ( Module *  module)

Generates code to allocate global variables for this trigger.

Function * VuoCompilerTriggerAction::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 a VuoCompilerTriggerPort. Passes the argument of that function, if any, as the context which will be passed to the worker function.

void VuoCompilerTriggerAction::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 * VuoCompilerTriggerAction::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 VuoCompilerTriggerAction::generateFinalization ( Module *  module,
BasicBlock *  block 
)

Generates code to finalize the global variables for this trigger.

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

Generates code to initialize the global variables for this trigger.

Function * VuoCompilerTriggerAction::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.

GlobalVariable * VuoCompilerTriggerAction::getPreviousDataVariable ( void  )

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


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