tclap 1.4.0
Public Member Functions | Protected Member Functions | List of all members
TCLAP::ExclusiveArgGroup Class Reference

Implements common functionality for exclusive argument groups. More...

#include <ArgGroup.h>

Inheritance diagram for TCLAP::ExclusiveArgGroup:
Inheritance graph
[legend]
Collaboration diagram for TCLAP::ExclusiveArgGroup:
Collaboration graph
[legend]

Public Member Functions

bool validate ()
 Validates that the constraints of the ArgGroup are satisfied.
 
bool isExclusive () const
 Returns true if this argument group is exclusive.
 
ArgContainer & add (Arg &arg)
 Add an argument to this arg group.
 
ArgContainer & add (Arg *arg)
 Add an argument to this arg group.
 
- Public Member Functions inherited from TCLAP::ArgGroup
virtual ~ArgGroup ()
 
virtual bool isRequired () const =0
 Returns true if this argument group is required.
 
void setParser (CmdLineInterface &parser)
 Used by the parser to connect itself to this arg group.
 
virtual bool showAsGroup () const
 If arguments in this group should show up as grouped in help.
 
const std::string getName () const
 Returns the argument group's name.
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
- Public Member Functions inherited from TCLAP::ArgContainer
virtual ~ArgContainer ()
 

Protected Member Functions

 ExclusiveArgGroup ()
 
 ExclusiveArgGroup (CmdLineInterface &parser)
 
- Protected Member Functions inherited from TCLAP::ArgGroup
 ArgGroup ()
 

Additional Inherited Members

- Public Types inherited from TCLAP::ArgGroup
typedef std::list< Arg * > Container
 
typedef Container::iterator iterator
 
typedef Container::const_iterator const_iterator
 
- Protected Attributes inherited from TCLAP::ArgGroup
CmdLineInterface * _parser
 
Container _args
 

Detailed Description

Implements common functionality for exclusive argument groups.

Definition at line 133 of file ArgGroup.h.

Constructor & Destructor Documentation

◆ ExclusiveArgGroup() [1/2]

TCLAP::ExclusiveArgGroup::ExclusiveArgGroup ( )
inlineprotected

Definition at line 150 of file ArgGroup.h.

◆ ExclusiveArgGroup() [2/2]

TCLAP::ExclusiveArgGroup::ExclusiveArgGroup ( CmdLineInterface &  parser)
inlineexplicitprotected

Definition at line 151 of file ArgGroup.h.

References TCLAP::CmdLineInterface::add().

Here is the call graph for this function:

Member Function Documentation

◆ add() [1/2]

ArgContainer & TCLAP::ExclusiveArgGroup::add ( Arg &  arg)
inlinevirtual

Add an argument to this arg group.

Reimplemented from TCLAP::ArgGroup.

Definition at line 137 of file ArgGroup.h.

References add().

Referenced by add(), and TCLAP::CmdLine::xorAdd().

Here is the call graph for this function:

◆ add() [2/2]

ArgContainer & TCLAP::ExclusiveArgGroup::add ( Arg *  arg)
inlinevirtual

Add an argument to this arg group.

Reimplemented from TCLAP::ArgGroup.

Definition at line 138 of file ArgGroup.h.

References TCLAP::ArgGroup::add(), TCLAP::Arg::isRequired(), and TCLAP::Arg::longID().

Here is the call graph for this function:

◆ isExclusive()

bool TCLAP::ExclusiveArgGroup::isExclusive ( ) const
inlinevirtual

Returns true if this argument group is exclusive.

Implements TCLAP::ArgGroup.

Definition at line 136 of file ArgGroup.h.

◆ validate()

bool TCLAP::ExclusiveArgGroup::validate ( )
inlinevirtual

Validates that the constraints of the ArgGroup are satisfied.

Implements TCLAP::ArgGroup.

Definition at line 211 of file ArgGroup.h.

References TCLAP::ArgGroup::begin(), TCLAP::ArgGroup::end(), TCLAP::ArgGroup::isRequired(), and TCLAP::Arg::setBy().

Here is the call graph for this function:

The documentation for this class was generated from the following file: