#include <options.h>
Public Member Functions | |
bool | boolValue () const |
std::string | stringValue () const |
Protected Member Functions | |
BoolOption (const std::string &name) | |
BoolOption (const std::string &name, char shortName, const std::string &longName, const std::string &usage=std::string(), const std::string &description=std::string()) | |
virtual ArgList::iterator | parse (ArgList &, ArgList::iterator begin) |
Parse the next commandline parameter after the short form of the command has been found. | |
virtual bool | parse (const std::string &) |
Parse the commandline parameter of a long commandline switch. | |
Friends | |
class | OptionGroup |
class | Engine |
wibble::commandline::BoolOption::BoolOption | ( | const std::string & | name | ) | [inline, protected] |
wibble::commandline::BoolOption::BoolOption | ( | const std::string & | name, | |
char | shortName, | |||
const std::string & | longName, | |||
const std::string & | usage = std::string() , |
|||
const std::string & | description = std::string() | |||
) | [inline, protected] |
bool wibble::commandline::BoolOption::boolValue | ( | ) | const [inline] |
Referenced by TestCommandlineEngine::clusteredShortOpts(), TestCommandlineEngine::commandsWithoutCommand(), TestCommandlineEngine::commandsWithOverlappingArgs(), TestCommandlineEngine::commandWithArg(), TestCommandlineEngine::creationShortcuts(), TestCommandlineEngine::longOptsWithArgs(), TestCommandlineEngine::longOptsWithDashes(), TestCommandlineEngine::optsAndArgs(), TestCommandlineEngine::optsOnly(), wibble::commandline::StandardParser::parse(), and withCommands().
virtual bool wibble::commandline::BoolOption::parse | ( | const std::string & | param | ) | [inline, protected, virtual] |
Parse the commandline parameter of a long commandline switch.
Implements wibble::commandline::Option.
References wibble::commandline::Option::m_isset.
virtual ArgList::iterator wibble::commandline::BoolOption::parse | ( | ArgList & | list, | |
ArgList::iterator | begin | |||
) | [inline, protected, virtual] |
Parse the next commandline parameter after the short form of the command has been found.
It may or may not remove the parameter from the list, depending on if the option wants a value or not.
Signal that the option has been found, with the given argument (or 0 if no argument).
Implements wibble::commandline::Option.
References wibble::commandline::Option::m_isset.
std::string wibble::commandline::BoolOption::stringValue | ( | ) | const [inline] |
friend class Engine [friend] |
Reimplemented from wibble::commandline::Option.
friend class OptionGroup [friend] |
Reimplemented from wibble::commandline::Option.