presage 0.9.1
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.

References observables.

Member Function Documentation

◆ dispatch()

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

Definition at line 73 of file dispatcher.h.

References dispatch_map, Observable::get_name(), Observable::get_value(), and object.

Referenced by map().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ map()

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

Definition at line 62 of file dispatcher.h.

References Observable::attach(), dispatch(), dispatch_map, Observable::get_name(), and observables.

Here is the call graph for this function:

Member Data Documentation

◆ dispatch_map

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

Definition at line 86 of file dispatcher.h.

Referenced by dispatch(), and map().

◆ object

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

Definition at line 85 of file dispatcher.h.

Referenced by dispatch().

◆ observables

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

Definition at line 87 of file dispatcher.h.

Referenced by map(), and ~Dispatcher().


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