Aria  2.8.0
ArGenericCallbackList< GenericFunctor > Class Template Reference

A class to hold a list of callbacks to call GenericFunctor must be a pointer to an ArFunctor or subclass. More...

#include <ariaUtil.h>

Public Member Functions

void addCallback (GenericFunctor functor, int position=50)
 Adds a callback.
 
 ArGenericCallbackList (const char *name="", ArLog::LogLevel logLevel=ArLog::Verbose, bool singleShot=false)
 Constructor.
 
void remCallback (GenericFunctor 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.
 

Protected Attributes

ArMutex myDataMutex
 
std::multimap< int, GenericFunctor > myList
 
bool myLogging
 
ArLog::LogLevel myLogLevel
 
std::string myName
 
bool mySingleShot
 

Detailed Description

template<class GenericFunctor>
class ArGenericCallbackList< GenericFunctor >

A class to hold a list of callbacks to call GenericFunctor must be a pointer to an ArFunctor or subclass.

e.g. declare like this:

then invoke it like this:

callbackList.invoke();

To pass an argument to the callbacks, use ArCallbackList1 instead.

Member Function Documentation

◆ setNameVar()

template<class GenericFunctor>
void ArGenericCallbackList< GenericFunctor >::setNameVar ( const char *  name,
  ... 
)
inline

Sets the name with formatting.

Java and Python Wrappers: Not available in Java or Python wrapper libraries. use setName()


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