ot::auxil
class BooleanOption
#include "ot/auxil/BooleanOption.h"
| Constructor/Destructor Detail |
BooleanOption
BooleanOption(const String& longName,
CharType shortName,
bool bDefault)
-
Constructs a BooleanOption.
- Parameters:
longName -
the long name of this option
shortName -
the short name of this option. Specify 0 to indicate there is no short option name
bDefault -
default value to report if the option is not specified on the command line
- Exceptions:
IllegalArgumentException -
if longName starts with '--'
getArgument
virtual const String getArgument() const
-
getValue
bool getValue() const
-
setPresent
virtual void setPresent(const String& howSpecified,
OptionType optionTypeUsed)
-
Called by the CommandLineParser to indicate to the option that is has been specified on the command line.
- Parameters:
option -
how the option was specified on the command line
optionTypeUsed -
indicates whether the long or short option was used
- Exceptions:
CommandLineException -
if the option is a duplicate
testLongOption
virtual bool testLongOption(const String& option) const
-
Found a bug or missing feature? Please email us at support@elcel.com