= 1
Allow "--long_name" style.
= allow_long << 1
Allow "-<single character" style.
= allow_short << 1
Allow "-" in short options.
= allow_dash_for_short << 1
Allow "/" in short options.
= allow_slash_for_short << 1

Allow option parameter in the same token for long option, like in --foo=10

= long_allow_adjacent << 1

Allow option parameter in the next token for long options.

= long_allow_next << 1

Allow option parameter in the same token for short options.

= short_allow_adjacent << 1

Allow option parameter in the next token for short options.

= short_allow_next << 1

Allow to merge several short options together, so that "-s -k" become "-sk". All of the options but last should accept no parameter. For example, if "-s" accept a parameter, then "k" will be taken as parameter, not another short option. Dos-style short options cannot be sticky.

= allow_sticky << 1

Allow abbreviated spellings for long options, if they unambiguously identify long option. No long option name should be prefix of other long option name if guessing is in effect.

= allow_guessing << 1

Ignore the difference in case for long options.

= long_case_insensitive << 1

Ignore the difference in case for short options.

= (long_case_insensitive | short_case_insensitive)

Ignore the difference in case for all options.

= short_case_insensitive << 1

Allow long options with single option starting character, e.g `-foo=10`

= (allow_short | short_allow_adjacent | short_allow_next | allow_long | long_allow_adjacent | long_allow_next | allow_sticky | allow_guessing | allow_dash_for_short)

The more-or-less traditional unix style.

= unix_style

The default style.

Various possible styles of options.

There are "long" options, which start with "--" and "short", which start with either "-" or "/". Both kinds can be allowed or disallowed, see allow_long and allow_short. The allowed character for short options is also configurable.

Option's value can be specified in the same token as name ("--foo=bar"), or in the next token.

It's possible to introduce long options by the same character as short options, see allow_long_disguise.

Finally, guessing (specifying only prefix of option) and case insensitive processing are supported.

boost::eof_iterator< environment_iterator, std::pair< std::string, std::string > >
void
char **
iterator_facade< Derived, const ValueType, forward_traversal_tag >

The '`eof_iterator`' class is useful for constructing forward iterators in cases where iterator extract data from some source and it's easy to detect 'eof' -- i.e. the situation where there's no data. One apparent example is reading lines from a file.

Implementing such iterators using 'iterator_facade' directly would require to create class with three core operation, a couple of constructors. When using '`eof_iterator`', the derived class should define only one method to get new value, plus a couple of constructors.

The basic idea is that iterator has 'eof' bit. Two iterators are equal only if both have their 'eof' bits set. The 'get' method either obtains the new value or sets the 'eof' bit.

Specifically, derived class should define:

1. A default constructor, which creates iterator with 'eof' bit set. The constructor body should call 'found_eof' method defined here.

2. Some other constructor. It should initialize some 'data pointer' used in iterator operation and then call 'get'.

3. The 'get' method. It should operate this way:

   - look at some 'data pointer' to see if new element is available; if not, it should call 'found_eof'.

   - extract new element and store it at location returned by the 'value' method.

   - advance the data pointer.

Essentially, the 'get' method has the functionality of both 'increment' and 'dereference'. It's very good for the cases where data extraction implicitly moves data pointer, like for stream operation.

ValueType &

Returns the reference which should be used by derived class to store the next value.

void

Should be called by derived class to indicate that it can't produce next element.

void
bool `const `eof_iterator` &`
const ValueType &
boost::program_options::error_with_no_option_name

Class thrown when there's ambiguity amoung several possible options.

const std::vector< std::string > &
const std::vector< std::string > &
void `const std::string &`

Makes all substitutions using the template

std::logic_error

Base class for all errors in the library.

const std::string &
boost::program_options::error_with_option_name

Base class of unparsable options, when the desired option cannot be identified.

It makes no sense to have an option name, when we can't match an option to the parameter

Having this a part of the `error_with_option_name` hierachy makes error handling a lot easier, even if the name indicates some sort of conceptual dissonance!

void `const std::string &`

Does NOT set option name, because no option name makes sense

const std::string &
const std::string &
""
boost::program_options::error

Base class for most exceptions in the library.

Substitutes the values for the parameter name placeholders in the template to create the human readable error message

Placeholders are surrounded by % signs: example% Poor man's version of boost::format

If a parameter name is absent, perform default substitutions instead so ugly placeholders are never left in-place.

Options are displayed in "canonical" form This is the most unambiguous form of the parsed option name and would correspond to option_description::format_name() i.e. what is shown by print_usage()

The "canonical" form depends on whether the option is specified in short or long form, using dashes or slashes or without a prefix (from a configuration file)

std::string

template with placeholders

void `const std::string &` `const std::string &`

gcc says that throw specification on dtor is loosened without this line Substitute parameter_name->value to create the error message from the error template

void `const std::string &` `const std::string &` `const std::string &`

If the parameter is missing, then make the from->to substitution instead

void `const std::string &` `const std::string &` `int`

Add context to an exception

void `int`
void `const std::string &`

Overridden in `error_with_no_option_name`

std::string
void `const std::string &`
const char *

Creates the error_message on the fly Currently a thin wrapper for substitute_placeholders()

const std::string &
const std::string &
""
const std::string &
""
int
0
void `const std::string &`

Makes all substitutions using the template

void `const std::string &` `const std::string &`
std::string

Construct option name in accordance with the appropriate prefix style: i.e. long dash or short slash etc

std::string
boost::program_options::validation_error

Class thrown if there is an invalid bool value given

const std::string &
boost::program_options::error

Class thrown when there are programming error related to style

const std::string &
boost::program_options::invalid_syntax

Class thrown when there are syntax errors in given command line

kind_t
const std::string &
""
const std::string &
""
int
0
boost::program_options::invalid_syntax
std::string

Convenience functions for backwards compatibility

const std::string &
kind_t
boost::program_options::validation_error

Class thrown if there is an invalid option value given

const std::string &
const std::wstring &
boost::program_options::error_with_option_name

Class thrown when there's syntax error either for command line or config file options. See derived children for concrete classes.

= 30
kind_t
std::string

Convenience functions for backwards compatibility

kind_t
const std::string &
""
const std::string &
""
int
0
std::string `kind_t`

Used to convert kind_t to a related error text

boost::program_options::error_with_option_name

Class thrown when there are several occurrences of an option, but user called a method which cannot return them all.

boost::program_options::error_with_option_name

Class thrown when there are several option values, but user called a method which cannot return them all.

boost::program_options::error

Class thrown if config file can not be read

const char *
boost::program_options::error_with_option_name

Class thrown when a required/mandatory option is missing

const std::string &
boost::program_options::error

Class thrown when there are too many positional options. This is a programming error.

boost::program_options::error_with_no_option_name

Class thrown when option name is not recognized.

const std::string &
""
boost::program_options::error_with_option_name

Class thrown when value of option is incorrect.

= 30
kind_t
kind_t
const std::string &
""
const std::string &
""
int
0
std::string `kind_t`

Used to convert kind_t to a related error text

std::string `const std::string &`

Option found in input source. Contains a key and a value. The key, in turn, can be a string (name of an option), or an integer (position in input source) -- in case no name is specified. The latter is only possible for command line. The template parameter specifies the type of char used for storing the option's value.

std::string

String key of this option. Intentionally independent of the template parameter.

int

Position key of this option. All options without an explicit name are sequentially numbered starting from 0. If an option has explicit name, 'position_key' is equal to -1. It is possible that both position_key and string_key is specified, in case name is implicitly added.

std::vector< std::basic_string< charT > >

Option's value

std::vector< std::basic_string< charT > >

The original unchanged tokens this option was created from.

bool

True if option was not recognized. In that case, 'string_key' and 'value' are results of purely syntactic parsing of source. The original tokens can be recovered from the "original_tokens" member.

bool

True if string_key has to be handled case insensitive.

const std::string &
const std::vector< std::string > &
`basic_option`< char >
`basic_option`< wchar_t >
boost::program_options::error

Class thrown when duplicate option description is found.

const std::string &

Describes one possible command line/config file option. There are two kinds of properties of an option. First describe it syntactically and are used only to validate input. Second affect interpretation of the option, for example default value for it or function that should be called when the value is finally known. Routines which perform parsing never use second kind of properties -- they are side effect free.

See Also:

`options_description`

match_result `const std::string &` `bool` `bool` `bool`

Given 'option', specified in the input source, returns 'true' if 'option' specifies *this.

const std::string & `const std::string &`

Returns the key that should identify the option, in particular in the `variables_map` class. The 'option' parameter is the option spelling from the input source. If option name contains '*', returns 'option'. If long name was specified, it's the long name, otherwise it's a short name with prepended '-'.

std::string `int0`

Returns the canonical name for the option description to enable the user to recognised a matching option. 1) For short options ('-', '/'), returns the short name prefixed. 2) For long options ('–' / '-') returns the first long name prefixed 3) All other cases, returns the first long name (if present) or the short name, unprefixed.

const std::string &
const std::pair< const std::string *, std::size_t >
const std::string & Explanation of this option.
shared_ptr< const `value_semantic` > Semantic of option's value.
std::string Returns the option name, formatted suitably for usage message.
std::string

Returns the parameter name and properties, formatted suitably for usage message.

const char *
const `value_semantic` *

Initializes the object with the passed data.

Note: it would be nice to make the second parameter auto_ptr, to explicitly pass ownership. Unfortunately, it's often needed to create objects of types derived from '`value_semantic`': `options_description` d; d.add_options()("a", parameter<int>("n")->default_value(1)); Here, the static type returned by 'parameter' should be derived from `value_semantic`.

Alas, derived->base conversion for auto_ptr does not really work, see http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2000/n1232.pdf http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#84

So, we have to use plain old pointers. Besides, users are not expected to use the constructor directly.

The 'name' parameter is interpreted by the following rules:

- if there's no "," character in 'name', it specifies long name

- otherwise, the part before "," specifies long name and the part after -- short name.

const char *
const `value_semantic` *
const char *

Initializes the class with the passed data.

`option_description` & `const char *`

A set of option descriptions. This provides convenient interface for adding new option (the add_options) method, and facilities to search for options by name.

See here for option adding interface discussion.

See Also:

`option_description`

const unsigned
void `shared_ptr< `option_description` >`

Adds new variable description. Throws duplicate_variable_error if either short or long name matches that of already present one.

`options_description` & `const `options_description` &`

Adds a group of option description. This has the same effect as adding all option_descriptions in 'desc' individually, except that output operator will show a separate group. Returns *this.

unsigned

Find the maximum width of the option column, including options in groups.

`options_description_easy_init`

Returns an object of implementation-defined type suitable for adding options to `options_description`. The returned object will have overloaded operator() with parameter type matching '`option_description`' constructors. Calling the operator will create new `option_description` instance and add it.

const `option_description` & `const std::string &` `bool` `boolfalse` `boolfalse`
const `option_description` * `const std::string &` `bool` `boolfalse` `boolfalse`
const std::vector< shared_ptr< `option_description` > > &
void `std::ostream &` `unsigned0`

Outputs 'desc' to the specified stream, calling 'f' to output each `option_description` element.

unsigned
m_default_line_length
unsigned
m_default_line_length/2

Creates the instance.

const std::string &
unsigned
m_default_line_length
unsigned
m_default_line_length/2

Creates the instance. The 'caption' parameter gives the name of this '`options_description`' instance. Primarily useful for output. The 'description_length' specifies the number of columns that should be reserved for the description text; if the option text encroaches into this, then the description will start on the next line.

BOOST_PROGRAM_OPTIONS_DECL std::ostream & `std::ostream &` `const `options_description` &`

Produces a human readable output of 'desc', listing options, their descriptions and allowed parameters. Other `options_description` instances previously passed to add will be output separately.

Class which provides convenient creation syntax to `option_description`.

`options_description_easy_init` & `const char *` `const char *`
`options_description_easy_init` & `const char *` `const `value_semantic` *`
`options_description_easy_init` & `const char *` `const `value_semantic` *` `const char *`
options_description
*

Command line parser.

The class allows one to specify all the information needed for parsing and to parse the command line. It is primarily needed to emulate named function parameters -- a regular function with 5 parameters will be hard to use and creating overloads with a smaller number of parameters will be confusing.

For the most common case, the function parse_command_line is a better alternative.

There are two typedefs -- command_line_parser and wcommand_line_parser, for charT == char and charT == wchar_t cases.

`basic_command_line_parser` & `const `options_description` &`

Sets options descriptions to use.

`basic_command_line_parser` & `const `positional_options_description` &`

Sets positional options description to use.

`basic_command_line_parser` & `int`

Sets the command line style.

`basic_command_line_parser` & `ext_parser`

Sets the extra parsers.

`basic_parsed_options`< charT >

Parses the options and returns the result of parsing. Throws on error.

`basic_command_line_parser` &

Specifies that unregistered options are allowed and should be passed though. For each command like token that looks like an option but does not contain a recognized name, an instance of basic_option<charT> will be added to result, with 'unrecognized' field set to 'true'. It's possible to collect all unrecognized options with the 'collect_unrecognized' funciton.

`basic_command_line_parser` & `style_parser`
const std::vector< std::basic_string< charT > > &

Creates a command line parser for the specified arguments list. The 'args' parameter should not include program name.

int

Must be non-negative i.e. >= 0

const charT *const

Argv[argc] must be 0 e.g. nullptr and if argc is >0 argv[0] up to argv[argc-1] must point to null terminated strings

Creates a command line parser for the specified arguments list. The parameters should be the same as passed to 'main', meaning:

Results of parsing an input source. The primary use of this class is passing information from parsers component to value storage component. This class does not makes much sense itself.

std::vector< `basic_option`< charT > >

Options found in the source.

const `options_description` *

Options description that was used for parsing. Parsers should return pointer to the instance of `option_description` passed to them, and issues of lifetime are up to the caller. Can be NULL.

int

Mainly used for the diagnostic messages in exceptions. The canonical option prefix for the parser which generated these results, depending on the settings for basic_command_line_parser::style() or cmdline::style(). In order of precedence of command_line_style enums: allow_long allow_long_disguise allow_dash_for_short allow_slash_for_short

const `options_description` *
int
0
wchar_t

Specialization of `basic_parsed_options` which:

- provides convenient conversion from `basic_parsed_options<char>`

- stores the passed char-based options for later use.

std::vector< `basic_option`< wchar_t > >
const `options_description` *
`basic_parsed_options`< char >

Stores UTF8 encoded options that were passed to constructor, to avoid reverse conversion in some cases.

int

Mainly used for the diagnostic messages in exceptions. The canonical option prefix for the parser which generated these results, depending on the settings for basic_command_line_parser::style() or cmdline::style(). In order of precedence of command_line_style enums: allow_long allow_long_disguise allow_dash_for_short allow_slash_for_short

const `basic_parsed_options`< char > &

Constructs wrapped options from options in UTF8 encoding.

Controls if the 'collect_unregistered' function should include positional options, or not.

`basic_parsed_options`< char >
`basic_parsed_options`< wchar_t >

Augments `basic_parsed_options<wchar_t>` with conversion from 'parsed_options'

function1< std::pair< std::string, std::string >, const std::string & >
`basic_command_line_parser`< char >
`basic_command_line_parser`< wchar_t >
`basic_parsed_options`< charT > `int` `const charT *const` `const `options_description` &` `int0` `function1< std::pair< std::string, std::string >, const std::string & >ext_parser()`

Creates instance of 'command_line_parser', passes parameters to it, and returns the result of calling the 'run' method.

BOOST_PROGRAM_OPTIONS_DECL `basic_parsed_options`< charT > `std::basic_istream< charT > &` `const `options_description` &` `boolfalse`

Parse a config file.

Read from given stream.

BOOST_PROGRAM_OPTIONS_DECL `basic_parsed_options`< charT > char `const char *` `const `options_description` &` `boolfalse`

Parse a config file.

Read from file with the given name. The character type is passed to the file stream.

std::vector< std::basic_string< charT > > `const std::vector< `basic_option`< charT > > &` `enum collect_unrecognized_mode`

Collects the original tokens for all named options with 'unregistered' flag set. If 'mode' is 'include_positional' also collects all positional options. Returns the vector of origianl tokens for all collected options.

BOOST_PROGRAM_OPTIONS_DECL `parsed_options` `const `options_description` &` `const function1< std::string, std::string > &`

Parse environment.

For each environment variable, the 'name_mapper' function is called to obtain the option name. If it returns empty string, the variable is ignored.

This is done since naming of environment variables is typically different from the naming of command line options.

BOOST_PROGRAM_OPTIONS_DECL `parsed_options` `const `options_description` &` `const std::string &`

Parse environment.

Takes all environment variables which start with 'prefix'. The option name is obtained from variable name by removing the prefix and converting the remaining string into lower case.

BOOST_PROGRAM_OPTIONS_DECL `parsed_options` `const `options_description` &` `const char *`

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function exists to resolve ambiguity between the two above functions when second argument is of 'char*' type. There's implicit conversion to both function1 and string.

BOOST_PROGRAM_OPTIONS_DECL std::vector< std::string > `const std::string &` `const std::string &" \t"` `const std::string &"'\""` `const std::string &"\\"`
BOOST_PROGRAM_OPTIONS_DECL std::vector< std::wstring > `const std::wstring &` `const std::wstring &L" \t"` `const std::wstring &L"'\""` `const std::wstring &L"\\"`

Splits a given string to a collection of single strings which can be passed to command_line_parser. The second parameter is used to specify a collection of possible seperator chars used for splitting. The seperator is defaulted to space " ". Splitting is done in a unix style way, with respect to quotes '"' and escape characters '\'

Describes positional options.

The class allows to guess option names for positional options, which are specified on the command line and are identified by the position. The class uses the information provided by the user to associate a name with every positional option, or tell that no name is known.

The primary assumption is that only the relative order of the positional options themselves matters, and that any interleaving ordinary options don't affect interpretation of positional options.

The user initializes the class by specifying that first N positional options should be given the name X1, following M options should be given the name X2 and so on.

`positional_options_description` & `const char *` `int`

Species that up to 'max_count' next positional options should be given the 'name'. The value of '-1' means 'unlimited'. No calls to 'add' can be made after call with 'max_value' equal to '-1'.

unsigned

Returns the maximum number of positional options that can be present. Can return (numeric_limits<unsigned>::max)() to indicate unlimited number.

const std::string & `unsigned`

Returns the name that should be associated with positional options at 'position'. Precondition: position < max_total_count()

char
boost::program_options::value_semantic_codecvt_helper< char >
boost::program_options::typed_value_base

Class which handles value of a specific type.

`typed_value` * `const T &`

Specifies default value, which will be used if none is explicitly specified. The type 'T' should provide operator<< for ostream.

`typed_value` * `const T &` `const std::string &`

Specifies default value, which will be used if none is explicitly specified. Unlike the above overload, the type 'T' need not provide operator<< for ostream, but textual representation of default value must be provided by the user.

`typed_value` * `const T &`

Specifies an implicit value, which will be used if the option is given, but without an adjacent value. Using this implies that an explicit value is optional,

`typed_value` * `const std::string &`

Specifies the name used to to the value in help message.

`typed_value` * `const T &` `const std::string &`

Specifies an implicit value, which will be used if the option is given, but without an adjacent value. Using this implies that an explicit value is optional, but if given, must be strictly adjacent to the option, i.e.: '-ovalue' or '–option=value'. Giving '-o' or '–option' will cause the implicit value to be applied. Unlike the above overload, the type 'T' need not provide operator<< for ostream, but textual representation of default value must be provided by the user.

`typed_value` * `function1< void, const T & >`

Specifies a function to be called when the final value is determined.

`typed_value` *

Specifies that the value is composing. See the 'is_composing' method for explanation.

`typed_value` *

Specifies that the value can span multiple tokens.

`typed_value` *

Specifies that no tokens may be provided as the value of this option, which means that only presense of the option is significant. For such option to be useful, either the 'validate' function should be specialized, or the 'implicit_value' method should be also used. In most cases, you can use the 'bool_switch' function instead of using this method.

`typed_value` *

Specifies that the value must occur.

std::string
bool
unsigned
unsigned
bool
void `boost::any &` `const std::vector< std::basic_string< charT > > &`

Creates an instance of the 'validator' class and calls its operator() to perform the actual conversion.

bool `boost::any &`

If default value was specified via previous call to 'default_value', stores that value into 'value_store'. Returns true if default value was stored.

void `const boost::any &`

If an address of variable to store value was specified when creating *this, stores the value there. Otherwise, does nothing.

const std::type_info &
T *

Ctor. The 'store_to' parameter tells where to store the value when it's known. The parameter can be NULL.

Base class for all option that have a fixed type, and are willing to announce this type to the outside world. Any 'value_semantics' for which you want to find out the type can be dynamic_cast-ed to `typed_value_base`. If conversion succeeds, the 'type' method can be called.

const std::type_info &
boost::program_options::value_semantic_codecvt_helper< char >

Class which specifies a simple handling of a value: the value will have string type and only one token is allowed.

std::string

Returns the name of the option. The name is only meaningful for automatic help message.

unsigned

The minimum number of tokens for this option that should be present on the command line.

unsigned

The maximum number of tokens for this option that should be present on the command line.

bool

Returns true if values from different sources should be composed. Otherwise, value from the first source is used and values from other sources are discarded.

bool

Returns true if value must be given. Non-optional value

void `boost::any &` `const std::vector< std::string > &`

If 'value_store' is already initialized, or new_tokens has more than one elements, throws. Otherwise, assigns the first string from 'new_tokens' to 'value_store', without any modifications.

bool `boost::any &`

Does nothing.

void `const boost::any &`

Does nothing.

bool
false

Class which specifies how the option's value is to be parsed and converted into C++ types.

std::string

Returns the name of the option. The name is only meaningful for automatic help message.

unsigned

The minimum number of tokens for this option that should be present on the command line.

unsigned

The maximum number of tokens for this option that should be present on the command line.

bool

Returns true if values from different sources should be composed. Otherwise, value from the first source is used and values from other sources are discarded.

bool

Returns true if value must be given. Non-optional value

void `boost::any &` `const std::vector< std::string > &` `bool`

Parses a group of tokens that specify a value of option. Stores the result in 'value_store', using whatever representation is desired. May be be called several times if value of the same option is specified more than once.

bool `boost::any &`

Called to assign default value to 'value_store'. Returns true if default value is assigned, and false if no default value exists.

void `const boost::any &`

Called when final value of an option is determined.

Helper class which perform necessary character conversions in the 'parse' method and forwards the data further.

char
boost::program_options::value_semantic

Helper conversion class for values that accept ascii strings as input. Overrides the 'parse' method and defines new 'xparse' method taking std::string. Depending on whether input to parse is ascii or UTF8, will pass it to xparse unmodified, or with UTF8->ascii conversion.

void `boost::any &` `const std::vector< std::string > &` `bool`

Parses a group of tokens that specify a value of option. Stores the result in 'value_store', using whatever representation is desired. May be be called several times if value of the same option is specified more than once.

void `boost::any &` `const std::vector< std::string > &`
wchar_t
boost::program_options::value_semantic

Helper conversion class for values that accept ascii strings as input. Overrides the 'parse' method and defines new 'xparse' method taking std::wstring. Depending on whether input to parse is ascii or UTF8, will recode input to Unicode, or pass it unmodified.

void `boost::any &` `const std::vector< std::string > &` `bool`

Parses a group of tokens that specify a value of option. Stores the result in 'value_store', using whatever representation is desired. May be be called several times if value of the same option is specified more than once.

void `boost::any &` `const std::vector< std::wstring > &`
`typed_value`< T > *
`typed_value`< T > * `T *`

Creates a typed_value<T> instance. This function is the primary method to create `value_semantic` instance for a specific type, which can later be passed to '`option_description`' constructor. The second overload is used when it's additionally desired to store the value of option into program variable.

`typed_value`< T, wchar_t > *

Creates a typed_value<T> instance. This function is the primary method to create `value_semantic` instance for a specific type, which can later be passed to '`option_description`' constructor.

`typed_value`< T, wchar_t > * `T *`
BOOST_PROGRAM_OPTIONS_DECL `typed_value`< bool > *
BOOST_PROGRAM_OPTIONS_DECL `typed_value`< bool > * `bool *`

Works the same way as the 'value<bool>' function, but the created `value_semantic` won't accept any explicit value. So, if the option is present on the command line, the value will be 'true'.

Implements string->string mapping with convenient value casting facilities.

const `variable_value` & `const std::string &`

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

- if there's no value in *this.

  - if there's next variable map, returns value from it

  - otherwise, returns empty value

- if there's defaulted value

  - if there's next variable map, which has a non-defaulted value, return that

  - otherwise, return value from *this

- if there's a non-defaulted value, returns it.

void ``abstract_variables_map` *`

Sets next variable map, which will be used to find variables not found in *this.

const `abstract_variables_map` *
const `variable_value` & `const std::string &`

Returns value of variable 'name' stored in *this, or empty value otherwise.

Class holding value of option. Contains details about how the value is set and allows to conveniently obtain the value.

BOOST_PROGRAM_OPTIONS_DECL void `const `basic_parsed_options`< char > &` ``variables_map` &` `bool`

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.

const T &

If stored value if of type T, returns that value. Otherwise, throws boost::bad_any_cast exception.

T &

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

bool Returns true if no value is stored.
bool

Returns true if the value was not explicitly given, but has default value.

const boost::any &

Returns the contained value.

boost::any &

Returns the contained value.

const boost::any &
bool
boost::program_options::abstract_variables_map
std::map< std::string, variable_value >

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.

const `variable_value` & `const std::string &`
void
void
const `abstract_variables_map` *
const `variable_value` & `const std::string &`

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

BOOST_PROGRAM_OPTIONS_DECL void `const `basic_parsed_options`< char > &` ``variables_map` &` `bool`

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.

BOOST_PROGRAM_OPTIONS_DECL void `const `basic_parsed_options`< char > &` ``variables_map` &` `boolfalse`

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.

BOOST_PROGRAM_OPTIONS_DECL void `const `basic_parsed_options`< wchar_t > &` ``variables_map` &`

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. This is wide character variant.

BOOST_PROGRAM_OPTIONS_DECL void ``variables_map` &`

Runs all 'notify' function for options in 'm'.

The version of the source interface. The value will be incremented whenever a change is made which might cause compilation errors for existing code.