Option found in input source. More...
#include <option.hpp>
Public Member Functions | |
basic_option () | |
basic_option (const std::string &xstring_key, const std::vector< std::string > &xvalue) | |
Public Attributes | |
std::string | string_key |
String key of this option. More... | |
int | position_key |
Position key of this option. More... | |
std::vector< std::basic_string < charT > > | value |
Option's value. More... | |
std::vector< std::basic_string < charT > > | original_tokens |
The original unchanged tokens this option was created from. More... | |
bool | unregistered |
True if option was not recognized. More... | |
bool | case_insensitive |
True if string_key has to be handled case insensitive. More... | |
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.
|
inline |
|
inline |
bool boost::program_options::basic_option< charT >::case_insensitive |
True if string_key has to be handled case insensitive.
std::vector< std::basic_string<charT> > boost::program_options::basic_option< charT >::original_tokens |
The original unchanged tokens this option was created from.
int boost::program_options::basic_option< charT >::position_key |
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::string boost::program_options::basic_option< charT >::string_key |
String key of this option.
Intentionally independent of the template parameter.
bool boost::program_options::basic_option< charT >::unregistered |
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.
std::vector< std::basic_string<charT> > boost::program_options::basic_option< charT >::value |
Option's value.