owlps/owlps-positioning/src/configuration.hh

33 lines
1.0 KiB
C++
Raw Normal View History

#ifndef _OWLPS_POSITIONING_CONFIGURATION_HH_
#define _OWLPS_POSITIONING_CONFIGURATION_HH_
#include <string>
#include <vector>
#include <boost/program_options/variables_map.hpp>
/// Stocks the configuration of the program
class Configuration
{
private:
/// Configuration structure
static boost::program_options::variables_map configuration ;
public:
/// Get a reference to the configuration structure
static boost::program_options::variables_map& getw_configuration(void) ;
/// Checks if the key exists in the configuration
static bool is_configured(const std::string &key) ;
/// Get the string value corresponding to \em key
static const std::string& string_value(const std::string &key) ;
/// Get the int value corresponding to \em key
static int int_value(const std::string &key) ;
static bool value_exists_in_string_vector(
const std::string &key,
const std::string &value) ;
static const std::vector<std::string>&
string_vector_value(const std::string &key) ;
} ;
#endif // _OWLPS_POSITIONING_CONFIGURATION_HH_