BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
7d3347c
Branches
Tags
master
Blinker
src
common
Sync.h
implement synchronization streams and managers
Stefan Schuermans
commited
7d3347c
at 2014-01-03 14:54:06
Sync.h
Blame
History
Raw
/* Blinker Copyright 2011-2014 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef BLINKER_SYNC_H #define BLINKER_SYNC_H #include <set> #include <string> #include "SyncRecv.h" namespace Blinker { /// a synchronization information sync stream class Sync { public: /// synchronization information typedef SyncRecv::Info Info; protected: /// set of receivers of this sync stream typedef std::set<SyncRecv *> Recvs; public: /// constructor Sync(); /// destructor ~Sync(); public: /** * @brief attach a sync stream receiver * @param[in] recv sync stream receiver to attach */ void attach(SyncRecv *recv); /** * @brief detach a sync stream receiver * @param[in] recv sync stream receiver to detach */ void detach(SyncRecv *recv); /** * @brief send synchronization information * @param[in] pInfo synchronization information */ void sendInfo(Info &info); protected: /// sync stream name std::string m_name; /// receivers of this sync stream Recvs m_recvs; friend class SyncMgr; }; // class Sync } // namespace Blinker #endif // #ifndef BLINKER_SYNC_H