|
OpenTop 1.5 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||||
| SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD | |||||||
#include "ot/auxil/BooleanOption.h"

When the long option name is employed, the option value is set to true unless the prefix 'no' appears at the front of the name. E.g. --nocopy will set the option with the long name 'copy' to false..
BooleanOptions cannot take an argument.
| Constructor/Destructor Summary | |
BooleanOption(const String& longName, CharType shortName, bool bDefault)Constructs a BooleanOption. | |
| Method Summary | |
virtual String |
getArgument() constReturns the value of this boolean option. |
bool |
getValue() constReturns this option's value. |
virtual void |
setPresent(const String& howSpecified, OptionType optionTypeUsed, const String& argument)Called by the CommandLineParser once it has determined that this CommandLineOption has been specified on the command line being parsed. |
virtual ArgumentType |
testLongOption(const String& option) constCalled by the CommandLineParser to test if a long option contained within the command line matches the long option name accepted by this CommandLineOption. |
| Methods inherited from class ot::auxil::BasicOption |
getLongName(), getShortName(), isPresent(), testShortOption(CharType) |
| Constructor/Destructor Detail |
BooleanOption(const String& longName,
CharType shortName,
bool bDefault)
longName - shortName - bDefault - IllegalArgumentException - | Method Detail |
virtual String getArgument() const
bool getValue() const
virtual void setPresent(const String& howSpecified,
OptionType optionTypeUsed,
const String& argument)
howSpecified - optionTypeUsed - argument - CommandLineException - virtual ArgumentType testLongOption(const String& option) const
If the passed option name does match, a value from the CommandLineOption::ArgumentType enumeration is returned to indicate whether an argument is expected for this option.
option -
|
OpenTop 1.5 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | Cross-Platform C++ | ||||||
| SUMMARY: CONSTRUCTOR | METHOD | DETAIL: CONSTRUCTOR | METHOD | |||||||