BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
baf52da
Branches
Tags
master
Blinker
src
noarch
ModuleMgr.h
put all managers in one structure to simplify adding managers
Stefan Schuermans
commited
baf52da
at 2011-12-22 11:32:05
ModuleMgr.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 BLINKER_MODULEMGR_H #define BLINKER_MODULEMGR_H #include <list> #include "Directory.h" #include "ListTracker.h" #include "Mgrs.h" #include "Module.h" #include "TimeCallee.h" namespace Blinker { /// manager for modules of one type template<typename MODULE> class ModuleMgr: public TimeCallee { protected: /// module container class Cntr; /// module list tracker typedef ListTracker<ModuleMgr, Cntr, Directory> ModuleListTracker; public: /** * @brief constructor * @param[in] mgrs managers * @param[in] dirBase base directory */ ModuleMgr(Mgrs &mgrs, const Directory &dirBase); /// destructor ~ModuleMgr(); private: /// copy constructor disabled ModuleMgr(const ModuleMgr &that); /// assignment operator disabled const ModuleMgr & operator=(const ModuleMgr &that); public: /// callback when requested time reached virtual void timeCall(); protected: /// check for update of configuration void updateConfig(); protected: Mgrs &m_mgrs; ///< managers Directory m_dirBase; ///< base directory ModuleListTracker m_moduleListTracker; ///< module list tracker }; // class ModuleMgr } // namespace Blinker #endif // #ifndef BLINKER_MODULEMGR_H