CLASS VARIABLES_MAP(3)

NAME
boost::program_options::variables_map

SYNOPSIS

// In header: <boost/program_options/variables_map.hpp>
class variables_map : public boost::program_options::abstract_variables_map {
public:
  // construct/copy/destruct
  variables_map();
  variables_map(const abstract_variables_map *);
  // public member functions
  const variable_value & operator[](const std::string &) const;
  void notify();
  // private member functions
  const variable_value & get(const std::string &) const;
  // friend functions
  friend BOOST_PROGRAM_OPTIONS_DECL void
  store(const basic_parsed_options< char > &, variables_map &, bool);
};

DESCRIPTION

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/destruct

    1.

    variables_map();

    2.

    variables_map(const abstract_variables_map * next);

  variables_map public member functions

    1.

    const variable_value & operator[](const std::string & name) const;

    Obtains the value of variable 'name', from *this and possibly from the chain of variable maps.

        &#8226; if there's no value in *this.

            &#8226; if there's next variable map, returns value from it

            &#8226; otherwise, returns empty value

                &#8226; if there's defaulted value

                    &#8226; if there's next varaible map, which has a non-defauled value, return that

                    &#8226; otherwise, return value from *this

                        &#8226; if there's a non-defauled value, returns it.

                        2.

                        void notify();

  variables_map private member functions

    1.

    const variable_value & get(const std::string & name) const;

    Implementation of abstract_variables_map::get which does 'find' in *this.

  variables_map friend functions

    1.

    friend BOOST_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.