LRT14  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
Configurable.h
1 #ifndef CONFIGURABLE_H_
2 #define CONFIGURABLE_H_
3 
4 #include <string>
5 #include "ConfigRuntime.h"
6 
11 {
12 public:
13  Configurable(std::string configSection);
14  virtual ~Configurable();
15 
19  virtual void Configure() = 0;
20 
21  template<typename T> inline T GetConfig(std::string key, T defaultValue)
22  {
23  return m_config->Get<T>(m_configSection, key, defaultValue);
24  }
25 
26 private:
27  ConfigRuntime* const m_config;
28  std::string m_configSection;
29 };
30 
31 #endif