Open Lighting Architecture  0.9.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Files | Classes | Functions
Callback Helpers

Detailed Description

A series a Callback helpers that simplify complex behavior.

Note
Please see CallbackRunner.h and MultiCallback.h for examples of each.

Files

file  CallbackRunner.h
 Automatically execute a 0-arg callback when it goes out of scope.
file  MultiCallback.h
 A callback which can be executed multiple times. When a pre-defined limit is reached, then the underlying callback is executed.

Classes

class  ola::CallbackRunner< CallbackClass >
 Automatically execute a callback when it goes out of scope. More...
class  ola::MultiCallback
 The MultiCallback class takes a limit & a callback. When the Run() method is called limit times, the callback is executed and the MultiCallback object deleted. More...

Functions

BaseCallback0< void > * ola::NewMultiCallback (unsigned int limit, BaseCallback0< void > *callback)
 A helper function to create a new MultiCallback.

Function Documentation

BaseCallback0<void>* ola::NewMultiCallback ( unsigned int  limit,
BaseCallback0< void > *  callback 
)
inline

A helper function to create a new MultiCallback.

Parameters
limitthe number of times to run before calling callback
callbackthe callback to call after limit times
Returns
a pointer to a MultiCallback object