presage  0.9.2~beta
Public Types | Public Member Functions | Private Attributes | List of all members
Dispatcher< class_t > Class Template Reference

#include <dispatcher.h>

Inheritance diagram for Dispatcher< class_t >:
Inheritance graph
Collaboration diagram for Dispatcher< class_t >:
Collaboration graph

Public Types

typedef void(class_t::* mbr_func_ptr_t) (const std::string &value)
 
typedef std::map< std::string, mbr_func_ptr_tdispatch_map_t
 

Public Member Functions

 Dispatcher (class_t *obj)
 
 ~Dispatcher ()
 
void map (Observable *var, const mbr_func_ptr_t &ptr)
 
void dispatch (const Observable *var)
 

Private Attributes

class_t * object
 
dispatch_map_t dispatch_map
 
std::list< Observable * > observables
 

Detailed Description

template<class class_t>
class Dispatcher< class_t >

Dispatches observable notifications.

Definition at line 42 of file dispatcher.h.

Member Typedef Documentation

◆ dispatch_map_t

template<class class_t>
typedef std::map<std::string, mbr_func_ptr_t> Dispatcher< class_t >::dispatch_map_t

Definition at line 45 of file dispatcher.h.

◆ mbr_func_ptr_t

template<class class_t>
typedef void(class_t::* Dispatcher< class_t >::mbr_func_ptr_t) (const std::string &value)

Definition at line 44 of file dispatcher.h.

Constructor & Destructor Documentation

◆ Dispatcher()

template<class class_t>
Dispatcher< class_t >::Dispatcher ( class_t *  obj)
inline

Definition at line 47 of file dispatcher.h.

◆ ~Dispatcher()

template<class class_t>
Dispatcher< class_t >::~Dispatcher ( )
inline

Definition at line 52 of file dispatcher.h.

Member Function Documentation

◆ dispatch()

template<class class_t>
void Dispatcher< class_t >::dispatch ( const Observable var)
inline

◆ map()

template<class class_t>
void Dispatcher< class_t >::map ( Observable var,
const mbr_func_ptr_t ptr 
)
inline

Member Data Documentation

◆ dispatch_map

template<class class_t>
dispatch_map_t Dispatcher< class_t >::dispatch_map
private

◆ object

template<class class_t>
class_t* Dispatcher< class_t >::object
private

Definition at line 85 of file dispatcher.h.

Referenced by Dispatcher< ARPAPredictor >::dispatch().

◆ observables

template<class class_t>
std::list<Observable*> Dispatcher< class_t >::observables
private

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