BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
7d3347c
Branches
Tags
master
Blinker
src
common
OutSyncFile.cpp
implement synchronization streams and managers
Stefan Schuermans
commited
7d3347c
at 2014-01-03 14:54:06
OutSyncFile.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 "File.h" #include "OutSyncFile.h" #include "Sync.h" #include "SyncFile.h" #include "SyncMgr.h" #include "SyncRecv.h" namespace Blinker { /** * @brief constructor from path * @param[in] path path to file * @param[in] syncMgr sync stream manager */ OutSyncFile::OutSyncFile(const std::string &path, SyncMgr &syncMgr): SyncFile(path, syncMgr) { update(); } /** * @brief constructor from basic file * @param[in] file basic file object * @param[in] syncMgr sync stream manager */ OutSyncFile::OutSyncFile(const File &file, SyncMgr &syncMgr): SyncFile(file, syncMgr) { update(); } /// destructor OutSyncFile::~OutSyncFile() { // unreferencing sync stream happens in destructor of SyncFile } /** * @brief assignment operator * @param[in] file basic file object */ const OutSyncFile & OutSyncFile::operator=(const File &file) { SyncFile::operator=(file); return *this; } /// update, i.e. (re-)read file and reference new sync stream void OutSyncFile::update() { SyncFile::update(); } /** * @brief send synchronization information * @param[in] pInfo synchronization information */ void OutSyncFile::sendInfo(SyncRecv::Info &info) { if (m_pSync) m_pSync->sendInfo(info); } } // namespace Blinker