BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
587ae25
Branches
Tags
master
Blinker
src
noarch
ModuleMgr_impl.h
namespace for preprocessor constants
Stefan Schuermans
commited
587ae25
at 2011-12-14 20:23:49
ModuleMgr_impl.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_IMPL_H #define BLINKER_MODULEMGR_IMPL_H #include <list> #include "CallMgr.h" #include "Directory.h" #include "ListTracker.h" #include "ListTracker_impl.h" #include "Module.h" #include "ModuleMgr.h" #include "ModuleMgrCntr.h" #include "ModuleMgrCntr_impl.h" #include "StreamMgr.h" #include "TimeCallee.h" namespace Blinker { /** * @brief constructor * @param[in] callMgr callback manager * @param[in] streamMgr stream manager * @param[in] dirBase base directory */ template<typename MODULE> ModuleMgr<MODULE>::ModuleMgr(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase): m_callMgr(callMgr), m_streamMgr(streamMgr), m_dirBase(dirBase), m_moduleListTracker(*this, dirBase) { m_moduleListTracker.init(); // request call in 1s m_callMgr.requestTimeCall(this, Time::now() + Time(1)); } /// destructor template<typename MODULE> ModuleMgr<MODULE>::~ModuleMgr() { m_moduleListTracker.clear(); } /// callback when requested time reached template<typename MODULE> void ModuleMgr<MODULE>::timeCall() { updateConfig(); // request next call in 1s m_callMgr.requestTimeCall(this, Time::now() + Time(1)); } /// check for update of configuration template<typename MODULE> void ModuleMgr<MODULE>::updateConfig() { // module list update m_moduleListTracker.updateConfig(); } } // namespace Blinker #endif // #ifndef BLINKER_MODULEMGR_IMPL_H