21 #ifndef G_OPTION_PARSER_H
22 #define G_OPTION_PARSER_H
81 bool haveSeen(
const std::string & )
const ;
82 static std::string::size_type eqPos(
const std::string & ) ;
83 static std::string eqValue(
const std::string & , std::string::size_type ) ;
84 void processOptionOn(
char c ) ;
85 void processOption(
char c ,
const std::string & value ) ;
86 void processOptionOn(
const std::string & s ) ;
87 void processOptionOff(
const std::string & s ) ;
88 void processOption(
const std::string & s ,
const std::string & value ,
bool ) ;
89 void errorNoValue(
char ) ;
90 void errorNoValue(
const std::string & ) ;
91 void errorUnknownOption(
char ) ;
92 void errorUnknownOption(
const std::string & ) ;
93 void errorDubiousValue(
const std::string & ,
const std::string & ) ;
94 void errorDuplicate(
char ) ;
95 void errorDuplicate(
const std::string & ) ;
96 void errorExtraValue(
char ) ;
97 void errorExtraValue(
const std::string & ) ;
98 void errorConflict(
const std::string & ) ;
99 bool haveSeenOn(
const std::string & name )
const ;
100 bool haveSeenOff(
const std::string & name )
const ;
101 static bool isOldOption(
const std::string & ) ;
102 static bool isNewOption(
const std::string & ) ;
103 static bool isAnOptionSet(
const std::string & ) ;
std::vector< std::string > StringArray
A std::vector of std::strings.
A parser for command-line arguments that operates according to an Options specification and returns a...
size_t parse(const StringArray &args, size_t start_position=1U)
Parses the given command-line arguments into the value map and/or error list defined by the construct...
OptionParser(const Options &spec, OptionMap &values_out, StringArray &errors_out)
Constructor.
A map-like container for command-line options and their values.
A class to represent allowed command-line options and to provide command-line usage text...