...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::program_options::variables_map
// In header: <boost/program_options/variables_map.hpp> class variables_map : public boost::program_options::abstract_variables_map, public std::map< std::string, variable_value > { public: // construct/copy/destruct variables_map(); variables_map(const abstract_variables_map *); // public member functions const variable_value & operator[](const std::string &) const; void clear(); void notify(); // private member functions virtual const variable_value & get(const std::string &) const; // friend functions BOOST_PROGRAM_OPTIONS_DECL void store(const basic_parsed_options< char > &, variables_map &, bool); };
Concrete variables map which store variables in real map.
This class is derived from std::map<std::string, variable_value>, so you can use all map operators to examine its content.
variables_map
public
construct/copy/destructvariables_map();
variables_map(const abstract_variables_map * next);
variables_map
public member functionsconst variable_value & operator[](const std::string & name) const;
void clear();
void notify();
variables_map
private member functionsvirtual const variable_value & get(const std::string & name) const;
Implementation of abstract_variables_map::get which does 'find' in *this.
variables_map
friend functionsBOOST_PROGRAM_OPTIONS_DECL void store(const basic_parsed_options< char > & options, variables_map & xm, bool utf8);
Stores in 'm' all options that are defined in 'options'. If 'm' already has a non-defaulted value of an option, that value is not changed, even if 'options' specify some value.