BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
7d3347c
Branches
Tags
master
Blinker
src
common
SyncFile.h
implement synchronization streams and managers
Stefan Schuermans
commited
7d3347c
at 2014-01-03 14:54:06
SyncFile.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_SYNCFILE_H #define BLINKER_SYNCFILE_H #include "File.h" #include "NameFile.h" #include "Sync.h" #include "SyncMgr.h" namespace Blinker { /// setting file containting a name of a sync stream class SyncFile: public NameFile { public: /** * @brief constructor from path * @param[in] path path to file * @param[in] syncMgr sync stream manager */ SyncFile(const std::string &path, SyncMgr &syncMgr); /** * @brief constructor from basic file * @param[in] file basic file object * @param[in] syncMgr sync stream manager */ SyncFile(const File &file, SyncMgr &syncMgr); /// destructor ~SyncFile(); /** * @brief assignment operator * @param[in] file basic file object */ const SyncFile & operator=(const File &file); private: /// copy constructor disabled SyncFile(const SyncFile &that); /// assignment operator disabled const SyncFile & operator=(const SyncFile &that); public: /// update, i.e. (re-)read file and reference new sync stream void update(); protected: /// unreference sync stream void unref(); /// reference sync stream void ref(); protected: SyncMgr &m_syncMgr; ///< sync stream manager Sync *m_pSync; ///< sync stream }; // class SyncFile } // namespace Blinker #endif // #ifndef BLINKER_SYNCFILE_H