BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
362c1f4
Branches
Tags
master
Blinker
src
common
Sync.h
update copyright header
Stefan Schuermans
commited
362c1f4
at 2019-05-04 17:17:10
Sync.h
Blame
History
Raw
/* Blinker Copyright 2011-2019 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