DUECA/DUSIME
Public Member Functions | List of all members
dueca::CallbackWithId< T, I > Class Template Reference

Template class for callback to a member function. More...

Inheritance diagram for dueca::CallbackWithId< T, I >:
Inheritance graph
[legend]
Collaboration diagram for dueca::CallbackWithId< T, I >:
Collaboration graph
[legend]

Public Member Functions

void operator() (const TimeSpec &t)
 The callback action.
 
void print (ostream &os) const
 Print to stream, for debugging.
 
 CallbackWithId (T *obj, void(T::*h)(const TimeSpec &t, I &id), const I &id)
 Constructor.
 
 ~CallbackWithId ()
 Destructor.
 
- Public Member Functions inherited from dueca::GenericCallback
 GenericCallback ()
 Constructor.
 
virtual ~GenericCallback ()
 Destructor.
 

Detailed Description

template<class T, class I>
class dueca::CallbackWithId< T, I >

Template class for callback to a member function.

With a member function of a specific type (with only a TimeSpec as parameter, and a pointer to an object, this object can implement callbacks. This is an extension to the Callback class, it also takes a second template parameter I, and a value for this parameter. When the client class method is called a reference to this parameter is passed, so that it is possible to "store some data" with the callback.


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