Aria
2.8.0
|
A class to hold a list of callbacks to call with an argument of type P1 The functors added to the list must be pointers to a subclass of ArFunctor1<P1>. More...
#include <ariaUtil.h>
Inherits ArGenericCallbackList< ArFunctor1< P1 > *>.
Public Member Functions | |
ArCallbackList1 (const char *name="", ArLog::LogLevel logLevel=ArLog::Verbose, bool singleShot=false) | |
Constructor. | |
void | invoke (P1 p1) |
Calls the callback list. | |
virtual | ~ArCallbackList1 () |
Destructor. | |
Public Member Functions inherited from ArGenericCallbackList< ArFunctor1< P1 > *> | |
void | addCallback (ArFunctor1< P1 > * functor, int position=50) |
Adds a callback. | |
ArGenericCallbackList (const char *name="", ArLog::LogLevel logLevel=ArLog::Verbose, bool singleShot=false) | |
Constructor. | |
void | remCallback (ArFunctor1< P1 > * functor) |
Removes a callback. | |
void | setLogging (bool on) |
Enable or disable logging when invoking the list. Logging is enabled by default at the log level given in the constructor. | |
void | setLogLevel (ArLog::LogLevel logLevel) |
Sets the log level. | |
void | setName (const char *name) |
Sets the name. | |
void | setNameVar (const char *name,...) |
Sets the name with formatting. More... | |
void | setSingleShot (bool singleShot) |
Sets if its single shot. | |
virtual | ~ArGenericCallbackList () |
Destructor. | |
Additional Inherited Members | |
Protected Attributes inherited from ArGenericCallbackList< ArFunctor1< P1 > *> | |
ArMutex | myDataMutex |
std::multimap< int, ArFunctor1< P1 > * > | myList |
bool | myLogging |
ArLog::LogLevel | myLogLevel |
std::string | myName |
bool | mySingleShot |
A class to hold a list of callbacks to call with an argument of type P1 The functors added to the list must be pointers to a subclass of ArFunctor1<P1>.
Declare like this:
then add a functor like this:
then invoke it like this: