Cross-Platform C++

ot::auxil
class BooleanOption

#include "ot/auxil/BooleanOption.h"

ot::auxil::BasicOption ot::auxil::CommandLineOption




Constructor/Destructor Summary
BooleanOption(const String& longName, CharType shortName, bool bDefault)
         Constructs a BooleanOption.

Method Summary
 virtual const String getArgument() const
        
 bool getValue() const
        
 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.
 virtual bool testLongOption(const String& option) const
        

Methods inherited from class ot::auxil::BasicOption
getArgumentType, getLongName, getShortName, isPresent, setArgument, testShortOption

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 '--'

Method Detail

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



Cross-Platform C++

Found a bug or missing feature? Please email us at support@elcel.com

Copyright © 2000-2003 ElCel Technology   Trademark Acknowledgements