BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
7d3347c
Branches
Tags
master
Blinker
src
common
Sync.cpp
implement synchronization streams and managers
Stefan Schuermans
commited
7d3347c
at 2014-01-03 14:54:06
Sync.cpp
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 */ #include <set> #include "Sync.h" #include "SyncRecv.h" namespace Blinker { /// constructor Sync::Sync() { } /// destructor Sync::~Sync() { } /** * @brief attach a sync stream receiver * @param[in] recv sync stream receiver to attach */ void Sync::attach(SyncRecv *recv) { m_recvs.insert(recv); } /** * @brief detach a sync stream receiver * @param[in] recv sync stream receiver to detach */ void Sync::detach(SyncRecv *recv) { m_recvs.erase(recv); } /** * @brief send synchronization information * @param[in] pInfo synchronization information */ void Sync::sendInfo(Info &info) { // pass sync information to all receivers Recvs::iterator it; for (it = m_recvs.begin(); it != m_recvs.end(); ++it) (*it)->sendInfo(m_name, info); } } // namespace Blinker