Open Lighting Architecture: Callback Helpers

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
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

## ◆ NewMultiCallback()

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

A helper function to create a new MultiCallback.

Parameters

  limit | the number of times to run before calling callback
  callback | the callback to call after limit times

Returns
  a pointer to a MultiCallback object