The callback that executes when a generator port on a node generates an event.
Public Member Functions | |
VuoCompilerGeneratorAction (VuoCompilerGeneratorPort *port, VuoCompilerNode *node) | |
Creates a generator callback. | |
void | generateAllocation (Module *module) |
Generates code to allocate global variables for this generator. | |
void | generateInitialization (Module *module, BasicBlock *block) |
Generates code to initialize the global variables for this generator. | |
void | generateFinalization (Module *module, BasicBlock *block) |
Generates code to finalize the global variables for this generator. | |
Function * | generateSubmissionToDispatchQueue (Module *module, BasicBlock *block, string identifier) |
Generates code to submit a task to this generator's dispatch queue. | |
Value * | generateDataValueDidChange (Module *module, BasicBlock *block, Function *generatorWorker) |
Generates code to handle the generator's data value (if any) having changed. | |
Type * | getDataType (void) |
Returns the type of data associated with the generator, or NULL if the generator is event-only. | |
string | getIdentifier (void) |
Returns an identifier for this generator. | |
Value * VuoCompilerGeneratorAction::generateDataValueDidChange | ( | Module * | module, |
BasicBlock * | block, | ||
Function * | generatorWorker | ||
) |
Generates code to handle the generator's data value (if any) having changed.
Assumes the vuoRetain
and vuoRelease
functions have been generated.
Function * VuoCompilerGeneratorAction::generateSubmissionToDispatchQueue | ( | Module * | module, |
BasicBlock * | block, | ||
string | identifier | ||
) |
Generates code to submit a task to this generator'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 VuoCompilerGeneratorPort
. Passes the argument of that function, if any, as the context which will be passed to the worker function.