BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
b6b2996
Branches
Tags
master
Blinker
src
noarch
SettingFile.h
update copyright years
Stefan Schuermans
commited
b6b2996
at 2014-01-02 21:57:13
SettingFile.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_SETTINGFILE_H #define BLINKER_SETTINGFILE_H #include <string> #include "File.h" namespace Blinker { /// file containting a single setting template<typename TYPE> class SettingFile: public File { public: /** * @brief constructor from path * @param[in] path path to file */ SettingFile(const std::string &path); /** * @brief constructor from basic file * @param[in] file basic file object */ SettingFile(const File &file); /** * @brief assignment operator * @param[in] file basic file object */ const SettingFile & operator=(const File &file); public: /// update, i.e. (re-)read file void update(); protected: /** * @brief get setting as string * @param[out] val setting read from file * @return if setting was successfully read from file */ bool getStr(std::string& val) const; public: TYPE m_obj; ///< setting object read from file bool m_valid; ///< if setting object could be read and parsed }; // class SettingFile } // namespace Blinker #endif // #ifndef BLINKER_SETTINGFILE_H