OBT::OtherOptionArg Class Reference

Inheritance diagram for OBT::OtherOptionArg:
[legend]
Collaboration diagram for OBT::OtherOptionArg:
[legend]

List of all members.

Public Member Functions

 OtherOptionArg ()
virtual ~OtherOptionArg ()
virtual std::string getHelp () const
 The help message given for the option.
virtual bool argMatch ()
 Returns true if the argument matches the option flag.
virtual bool parseArg ()
 The method to parse the arguments.
virtual int nbPresent () const
 Returns the number of time when the option flag is present in the command line.

Detailed Description

Definition at line 11 of file OBTOptionArg.cpp.


Constructor & Destructor Documentation

OBT::OtherOptionArg::OtherOptionArg (  )  [inline]

Definition at line 14 of file OBTOptionArg.cpp.

00014 : OptionArg( "", "" ) {}

virtual OBT::OtherOptionArg::~OtherOptionArg (  )  [inline, virtual]

Definition at line 15 of file OBTOptionArg.cpp.

00015 {}


Member Function Documentation

virtual bool OBT::OtherOptionArg::argMatch (  )  [inline, virtual]

Returns true if the argument matches the option flag.

Reimplemented from OBT::OptionArg.

Definition at line 17 of file OBTOptionArg.cpp.

00017 { return false ; }

virtual std::string OBT::OtherOptionArg::getHelp (  )  const [inline, virtual]

The help message given for the option.

Returns the option flag following by the help message.

Reimplemented from OBT::OptionArg.

Definition at line 16 of file OBTOptionArg.cpp.

00016 { return "" ; }

virtual int OBT::OtherOptionArg::nbPresent (  )  const [inline, virtual]

Returns the number of time when the option flag is present in the command line.

See _flag.

Reimplemented from OBT::OptionArg.

Definition at line 19 of file OBTOptionArg.cpp.

References OBT::OptionArgHandler::_optionList, and OBT::OptionArgHandler::get().

00020   {
00021     int nb = 0 ;
00022     const ListArg& optionList = OptionArgHandler::get()._optionList ;
00023     for( ListArg::const_iterator option = optionList.begin() ;
00024          option != optionList.end() ;
00025          option++ )
00026     {
00027       nb += ( (*option) != this ) && (*option)->isPresent() ? 1 : 0 ;
00028     }
00029     return nb ;
00030   }

virtual bool OBT::OtherOptionArg::parseArg (  )  [inline, virtual]

The method to parse the arguments.

Returns:
true if the arguments can be parsed.

Retrieves the argument which can be following the option flag. See OptionFlag::parseArg, OptionNPrm::parseArg, OptionMultiNPrm::parseArg for examples.

Implements OBT::OptionArg.

Definition at line 18 of file OBTOptionArg.cpp.

00018 { return true ; }


Generated on 1 Jan 2010 for OBT by  doxygen 1.6.1