/* * Channels.hpp * * Created on: Dec 1, 2011 * Author: heber */ #ifndef CHANNELS_HPP_ #define CHANNELS_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "CodePatterns/Observer/defs.hpp" /** Channels aggregate all possible Notifications of an Observable. * * Usually, one implements an enumeration of the channel number which is * visible to the outside only. * */ class Channels { public: Channels(); virtual ~Channels(); void addChannel(size_t no); Notification_ptr getChannel(size_t no) const; size_t getType(Notification_ptr channel) const; protected: void removeChannel(size_t no); private: typedef std::map< size_t, Notification_ptr> NotificationTypetoRefMap; NotificationTypetoRefMap ChannelMap; }; #endif /* CHANNELS_HPP_ */