BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
f0c104c
Branches
Tags
master
Blinker
src
noarch
StreamFile.h
implemented specialized setting files for different data types, simplified input/output stream handling in modules
Stefan Schuermans
commited
f0c104c
at 2011-12-04 20:10:37
StreamFile.h
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef STREAMFILE_H #define STREAMFILE_H #include "File.h" #include "NameFile.h" #include "Stream.h" #include "StreamMgr.h" namespace Blinker { /// setting file containting a name of a stream class StreamFile: public NameFile { public: /** * @brief constructor from path * @param[in] path path to file * @param[in] streamMgr stream manager */ StreamFile(const std::string &path, StreamMgr &streamMgr); /** * @brief constructor from basic file * @param[in] file basic file object * @param[in] streamMgr stream manager */ StreamFile(const File &file, StreamMgr &streamMgr); /// destructor ~StreamFile(); /** * @brief assignment operator * @param[in] file basic file object */ const StreamFile & operator=(const File &file); public: /// update, i.e. (re-)read file and reference new stream void update(); protected: /// unreference stream void unref(); /// reference stream void ref(); protected: StreamMgr &m_streamMgr; ///< stream manager Stream *m_pStream; ///< stream }; // class StreamFile } // namespace Blinker #endif // #ifndef STREAMFILE_H