Open Lighting Architecture 0.10.9
Loading...
Searching...
No Matches
ola::MultiCallback Class Reference

Detailed Description

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.

Note
MultiCallback is NOT thread safe.
If limit is 0, the callback is executed immediately.
Inheritance diagram for ola::MultiCallback:
ola::BaseCallback0< void >

Public Member Functions

 MultiCallback (unsigned int limit, BaseCallback0< void > *callback)
 Constructor.
 
void Run ()
 Executes the callback passed in during creation after limit calls. Then MultiCallback deletes itself.
 
- Public Member Functions inherited from ola::BaseCallback0< void >

Constructor & Destructor Documentation

◆ MultiCallback()

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

Constructor.

Parameters
limitafter limit the object is deleted
callbackis a BaseCallback0<void> to be executed after Run is called limit times

Member Function Documentation

◆ Run()

void ola::MultiCallback::Run ( )
inlinevirtual

Executes the callback passed in during creation after limit calls. Then MultiCallback deletes itself.

Implements ola::BaseCallback0< void >.


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