/* 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();