/* Blinker
   Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org>
   Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
   a blinkenarea.org project */

#ifndef BLINKER_MODULEMGRCNTR_IMPL_H
#define BLINKER_MODULEMGRCNTR_IMPL_H

#include <string>

#include "Directory.h"
#include "File.h"
#include "Module.h"
#include "ModuleMgr.h"
#include "ModuleMgrCntr.h"
#include "Sender.h"
#include "SettingFile.h"

namespace Blinker {

/**
 * @brief constructor
 * @param[in] mgr owning module manager
 * @param[in] name name of module
 * @param[in] dirBase base directory
 */
template<typename MODULE>
ModuleMgr<MODULE>::Cntr::Cntr(ModuleMgr &mgr, const std::string &name,
                              const Directory &dirBase):
  m_mgr(mgr),
  m_name(name),
  m_mod(mgr.m_name + "/" + name, mgr.m_mgrs, dirBase)
{
}

/// destructor
template<typename MODULE>
ModuleMgr<MODULE>::Cntr::~Cntr()
{
}

/// check for update of configuration
template<typename MODULE>
void ModuleMgr<MODULE>::Cntr::updateConfig()
{
  m_mod.updateConfig();
}

} // namespace Blinker

#endif // #ifndef BLINKER_MODULEMGRCNTR_IMPL_H

