25 #ifndef PRESAGE_DISPATCHER 26 #define PRESAGE_DISPATCHER 41 template <
class class_t>
54 for (std::list<Observable*>::iterator it =
observables.begin();
57 (*it)->detach (
object);
79 std::cerr <<
"[Dispatcher] Unable to handle notification from observable: " 91 #endif // PRESAGE_DISPATCHER void(class_t::* mbr_func_ptr_t)(const std::string &value)
void dispatch(const Observable *var)
virtual void attach(Observer *observer)
dispatch_map_t dispatch_map
virtual std::string get_name() const =0
std::map< std::string, mbr_func_ptr_t > dispatch_map_t
void map(Observable *var, const mbr_func_ptr_t &ptr)
virtual std::string get_value() const =0
std::list< Observable * > observables
const Logger< _charT, _Traits > & endl(const Logger< _charT, _Traits > &lgr)