CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BoundCallback< ParamT, DelegateT > Class Template Reference

#include <async.h>

Inheritance diagram for BoundCallback< ParamT, DelegateT >:
Collaboration diagram for BoundCallback< ParamT, DelegateT >:

Public Types

typedef void(DelegateT::* CallbackMethod )(const ParamT &value)
 

Public Member Functions

 BoundCallback (CallbackMethod method, DelegateT *delegate)
 
void operator() (const ParamT &value) const
 
- Public Member Functions inherited from CallbackBase< ParamT >
virtual ~CallbackBase ()
 

Private Attributes

DelegateT * delegate_
 
CallbackMethod method_
 

Detailed Description

template<typename ParamT, class DelegateT>
class BoundCallback< ParamT, DelegateT >

A BoundCallback can be used to call a member of an arbitrary object as a callback. The member must have the following interface: void <DelegateT>::<member name>="">(ParamT <parameter>);

Note: it is the responsibility of the user to ensure that the bound object for delegate remains alive in the whole time this callback might be invoked.

Parameters
ParamTthe type of the parameter to be passed to the callback
DelegateTthe <class name>=""> of the object the member <member name>=""> should be invoked in

Definition at line 84 of file async.h.

Member Typedef Documentation

template<typename ParamT, class DelegateT>
typedef void(DelegateT::* BoundCallback< ParamT, DelegateT >::CallbackMethod)(const ParamT &value)

Definition at line 86 of file async.h.

Constructor & Destructor Documentation

template<typename ParamT, class DelegateT>
BoundCallback< ParamT, DelegateT >::BoundCallback ( CallbackMethod  method,
DelegateT *  delegate 
)
inline

Definition at line 88 of file async.h.

Member Function Documentation

template<typename ParamT, class DelegateT>
void BoundCallback< ParamT, DelegateT >::operator() ( const ParamT &  value) const
inlinevirtual

Implements CallbackBase< ParamT >.

Definition at line 92 of file async.h.

Member Data Documentation

template<typename ParamT, class DelegateT>
DelegateT* BoundCallback< ParamT, DelegateT >::delegate_
private

Definition at line 95 of file async.h.

template<typename ParamT, class DelegateT>
CallbackMethod BoundCallback< ParamT, DelegateT >::method_
private

Definition at line 96 of file async.h.


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