libsdr  0.1.0
A simple SDR library
Public Member Functions | Protected Attributes | List of all members
sdr::Delegate< T > Class Template Reference

Specific delegate to a method of an object . More...

#include <queue.hh>

Inheritance diagram for sdr::Delegate< T >:
sdr::DelegateInterface

Public Member Functions

 Delegate (T *instance, void(T::*func)(void))
 Constructs a delegate to the method func of the instance instance. More...
 
virtual ~Delegate ()
 Destructor. More...
 
virtual void operator() ()
 Callback, simply calls the method of the instance given to the constructor. More...
 
virtual void * instance ()
 Returns the instance of the delegate. More...
 

Protected Attributes

T * _instance
 The instance. More...
 
void(T::* _function )(void)
 The method. More...
 

Detailed Description

template<class T>
class sdr::Delegate< T >

Specific delegate to a method of an object .

Constructor & Destructor Documentation

template<class T >
sdr::Delegate< T >::Delegate ( T *  instance,
void(T::*)(void)  func 
)
inline

Constructs a delegate to the method func of the instance instance.

template<class T >
virtual sdr::Delegate< T >::~Delegate ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class T >
virtual void* sdr::Delegate< T >::instance ( )
inlinevirtual

Returns the instance of the delegate.

Implements sdr::DelegateInterface.

template<class T >
virtual void sdr::Delegate< T >::operator() ( )
inlinevirtual

Callback, simply calls the method of the instance given to the constructor.

Implements sdr::DelegateInterface.

Member Data Documentation

template<class T >
void(T::* sdr::Delegate< T >::_function) (void)
protected

The method.

template<class T >
T* sdr::Delegate< T >::_instance
protected

The instance.


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