Set of options holding a parsed value. More...
#include <program_options.h>
Public Member Functions | |
void | add (const std::string &name) |
bool | assign (const ParsedValues &p, const ParsedOptions *exclude=0) |
Assigns the parsed values in p to their options. | |
std::size_t | count (const std::string &name) const |
bool | empty () const |
ParsedOptions () | |
std::size_t | size () const |
~ParsedOptions () | |
Private Member Functions | |
int | assign (const Option &o, const std::string &value) |
Private Attributes | |
std::set< std::string > | parsed_ |
Set of options holding a parsed value.
Definition at line 286 of file program_options.h.
Definition at line 494 of file program_options.cpp.
Definition at line 495 of file program_options.cpp.
void ProgramOptions::ParsedOptions::add | ( | const std::string & | name | ) | [inline] |
Definition at line 293 of file program_options.h.
bool ProgramOptions::ParsedOptions::assign | ( | const ParsedValues & | p, |
const ParsedOptions * | exclude = 0 |
||
) |
Assigns the parsed values in p to their options.
Parsed values for options that already have a value (and are not composing) are ignored. On the other hand, parsed values overwrite any existing default values.
p | parsed values to assign |
ValueError | if p contains more than one value for a non-composing option or if p contains a value that is invalid for its option. |
Definition at line 496 of file program_options.cpp.
int ProgramOptions::ParsedOptions::assign | ( | const Option & | o, |
const std::string & | value | ||
) | [private] |
Definition at line 531 of file program_options.cpp.
std::size_t ProgramOptions::ParsedOptions::count | ( | const std::string & | name | ) | const [inline] |
Definition at line 292 of file program_options.h.
bool ProgramOptions::ParsedOptions::empty | ( | ) | const [inline] |
Definition at line 290 of file program_options.h.
std::size_t ProgramOptions::ParsedOptions::size | ( | ) | const [inline] |
Definition at line 291 of file program_options.h.
std::set<std::string> ProgramOptions::ParsedOptions::parsed_ [private] |
Definition at line 309 of file program_options.h.