47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
/*
|
|
* This file is part of the Owl Positioning System (OwlPS).
|
|
* OwlPS is a project of the University of Franche-Comté
|
|
* (Université de Franche-Comté), France.
|
|
*/
|
|
|
|
|
|
#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:
|
|
/// Returns 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) ;
|
|
/// Returns the string value corresponding to \em key
|
|
static const std::string& string_value(const std::string &key) ;
|
|
/// Returns the int value corresponding to \em key
|
|
static int int_value(const std::string &key) ;
|
|
/// Returns the unsigned int value corresponding to \em key
|
|
static unsigned int uint_value(const std::string &key) ;
|
|
/// Returns the float value corresponding to \em key
|
|
static float float_value(const std::string &key) ;
|
|
/// Returns the bool value corresponding to \em key
|
|
static bool bool_value(const std::string &key) ;
|
|
/// Checks if a given string value exists in \em key
|
|
static bool value_exists_in_string_vector(
|
|
const std::string &key,
|
|
const std::string &value) ;
|
|
/// Returns the vector value corresponding to \em key
|
|
static const std::vector<std::string>&
|
|
string_vector_value(const std::string &key) ;
|
|
} ;
|
|
|
|
#endif // _OWLPS_POSITIONING_CONFIGURATION_HH_
|