67 lines
2.3 KiB
C++
67 lines
2.3 KiB
C++
/*
|
|
* This file is part of the Owl Positioning System (OwlPS) project.
|
|
* It is subject to the copyright notice and license terms in the
|
|
* COPYRIGHT.t2t file found in the top-level directory of this
|
|
* distribution and at
|
|
* http://code.lm7.fr/p/owlps/source/tree/master/COPYRIGHT.t2t
|
|
* No part of the OwlPS Project, including this file, may be copied,
|
|
* modified, propagated, or distributed except according to the terms
|
|
* contained in the COPYRIGHT.t2t file; the COPYRIGHT.t2t file must be
|
|
* distributed along with this file, either separately or by replacing
|
|
* this notice by the COPYRIGHT.t2t file's contents.
|
|
*/
|
|
|
|
|
|
#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:
|
|
/** @name General accessors */
|
|
//@{
|
|
/// 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) ;
|
|
//@}
|
|
|
|
/** @name Type-specific accessors */
|
|
//@{
|
|
/// Returns the string value corresponding to `key`
|
|
static const std::string& string_value(const std::string &key) ;
|
|
/// Returns the int value corresponding to `key`
|
|
static int int_value(const std::string &key) ;
|
|
/// Returns the unsigned int value corresponding to `key`
|
|
static unsigned int uint_value(const std::string &key) ;
|
|
/// Returns the float value corresponding to `key`
|
|
static float float_value(const std::string &key) ;
|
|
/// Returns the bool value corresponding to `key`
|
|
static bool bool_value(const std::string &key) ;
|
|
/// Checks if a given string value exists in `key`
|
|
static bool value_exists_in_string_vector(
|
|
const std::string &key,
|
|
const std::string &value) ;
|
|
/// Returns the vector value corresponding to `key`
|
|
static const std::vector<std::string>&
|
|
string_vector_value(const std::string &key) ;
|
|
//@}
|
|
|
|
/** @name Option-specific accessors */
|
|
//@{
|
|
/// Checks if the autocalibration is enabled
|
|
static bool autocalibration_enabled(void) ;
|
|
//@}
|
|
} ;
|
|
|
|
#endif // _OWLPS_POSITIONING_CONFIGURATION_HH_
|