41 lines
639 B
C++
41 lines
639 B
C++
#include "configuration.hh"
|
|
|
|
namespace po = boost::program_options ;
|
|
|
|
|
|
|
|
/* *** Attribute definitions *** */
|
|
|
|
po::variables_map Configuration::configuration ;
|
|
|
|
|
|
|
|
/* *** Read accessors *** */
|
|
|
|
|
|
po::variables_map& Configuration::getw_configuration()
|
|
{
|
|
return configuration ;
|
|
}
|
|
|
|
|
|
bool Configuration::is_configured(const std::string &key)
|
|
{
|
|
if (configuration.count(key))
|
|
return true ;
|
|
return false ;
|
|
}
|
|
|
|
|
|
const std::string&
|
|
Configuration::get_string_value(const std::string &key)
|
|
{
|
|
return configuration[key].as<std::string>() ;
|
|
}
|
|
|
|
|
|
int Configuration::get_int_value(const std::string &key)
|
|
{
|
|
return configuration[key].as<int>() ;
|
|
}
|