OBT::Imply Class Reference

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

List of all members.

Private Member Functions

virtual std::string msg () const
virtual bool test (int nb) const
virtual void testValidity () const

Detailed Description

Definition at line 61 of file OBTOptionArgHandler.cpp.


Member Function Documentation

virtual std::string OBT::Imply::msg (  )  const [inline, private, virtual]

Implements OBT::ArgsOp.

Definition at line 63 of file OBTOptionArgHandler.cpp.

00063 { return "The next option cannot be used if the previous one is not present:  " ; }

virtual bool OBT::Imply::test ( int  nb  )  const [inline, private, virtual]

Implements OBT::ArgsOp.

Definition at line 64 of file OBTOptionArgHandler.cpp.

00064 { return true ; /* not used */ } 

virtual void OBT::Imply::testValidity (  )  const [inline, private, virtual]

Reimplemented from OBT::ArgsOp.

Definition at line 65 of file OBTOptionArgHandler.cpp.

References OBT::ArgsOp::_optionsList, and OBT::ArgsOp::throwErrorMsg().

00066   {
00067     bool ok = true ;
00068     bool mustBePresent = ( *_optionsList.begin() )->isPresent() ;
00069     for( ListArg::const_iterator option = _optionsList.begin() ;
00070          option != _optionsList.end() && ok ;
00071          option++ )
00072     {
00073       ok = ok && mustBePresent == ( *option )->isPresent() ;
00074       mustBePresent = ( *option )->isPresent() ;
00075     }
00076     if( !ok ) throwErrorMsg() ;
00077   }


Generated on 1 Jan 2010 for OBT by  doxygen 1.6.1