|
tclap 1.6.0
|
ArgGroup is the base class for implementing groups of arguments that are mutually exclusive (it replaces the deprecated xor handler). More...
#include <ArgGroup.h>


Public Types | |
| using | Container = std::list< Arg * > |
| using | iterator = Container::iterator |
| using | const_iterator = Container::const_iterator |
Public Member Functions | |
| ~ArgGroup () override=default | |
| ArgContainer & | add (Arg &arg) override |
| Add an argument to this arg group. | |
| ArgContainer & | add (Arg *arg) override |
| Add an argument to this arg group. | |
| virtual bool | validate ()=0 |
| Validates that the constraints of the ArgGroup are satisfied. | |
| virtual bool | isRequired () const =0 |
| Returns true if this argument group is required. | |
| virtual bool | isExclusive () const =0 |
| Returns true if this argument group is exclusive. | |
| 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 () noexcept |
| iterator | end () noexcept |
| const_iterator | begin () const noexcept |
| const_iterator | end () const noexcept |
| ArgGroup (const ArgGroup &)=delete | |
| ArgGroup & | operator= (const ArgGroup &)=delete |
Public Member Functions inherited from TCLAP::ArgContainer | |
| virtual | ~ArgContainer ()=default |
Protected Member Functions | |
| ArgGroup () | |
Protected Attributes | |
| CmdLineInterface * | _parser |
| Container | _args |
Friends | |
| class | CmdLine |
| class | CmdLineInterface |
ArgGroup is the base class for implementing groups of arguments that are mutually exclusive (it replaces the deprecated xor handler).
It is not expected to be used directly, rather one of the EitherOf or OneOf derived classes are used.
Definition at line 42 of file ArgGroup.h.
| using TCLAP::ArgGroup::const_iterator = Container::const_iterator |
Definition at line 48 of file ArgGroup.h.
| using TCLAP::ArgGroup::Container = std::list<Arg *> |
Definition at line 46 of file ArgGroup.h.
| using TCLAP::ArgGroup::iterator = Container::iterator |
Definition at line 47 of file ArgGroup.h.
|
overridedefault |
|
inlineprotected |
Definition at line 119 of file ArgGroup.h.
|
delete |
|
inlineoverridevirtual |
Add an argument to this arg group.
Implements TCLAP::ArgContainer.
Reimplemented in TCLAP::ExclusiveArgGroup.
Definition at line 53 of file ArgGroup.h.
References add().
Referenced by add(), and TCLAP::ExclusiveArgGroup::add().

|
inlineoverridevirtual |
Add an argument to this arg group.
Implements TCLAP::ArgContainer.
Reimplemented in TCLAP::ExclusiveArgGroup, and TCLAP::StandaloneArgs.
Definition at line 195 of file ArgGroup.h.
References _args, _parser, TCLAP::CmdLineInterface::addToArgList(), TCLAP::Arg::conflictsWith(), and TCLAP::Arg::longID().

|
inlinenoexcept |
Definition at line 114 of file ArgGroup.h.
References _args.
|
inlinenoexcept |
Definition at line 112 of file ArgGroup.h.
References _args.
|
inlinenoexcept |
Definition at line 115 of file ArgGroup.h.
References _args.
|
inlinenoexcept |
|
inline |
Returns the argument group's name.
Definition at line 235 of file ArgGroup.h.
References TCLAP::Arg::getName().

|
pure virtual |
Returns true if this argument group is exclusive.
Implemented in TCLAP::ExclusiveArgGroup, and TCLAP::AnyOf.
|
pure virtual |
Returns true if this argument group is required.
Implemented in TCLAP::EitherOf, TCLAP::OneOf, and TCLAP::AnyOf.
Referenced by TCLAP::DocBookOutput::printLongArg(), TCLAP::DocBookOutput::printShortGroup(), and TCLAP::ExclusiveArgGroup::validate().
|
inline |
Used by the parser to connect itself to this arg group.
Definition at line 93 of file ArgGroup.h.
References _parser, TCLAP::CmdLineInterface::addToArgList(), and TCLAP::CmdLineInterface::attachGroup().

|
inlinevirtual |
If arguments in this group should show up as grouped in help.
Reimplemented in TCLAP::StandaloneArgs.
Definition at line 107 of file ArgGroup.h.
|
pure virtual |
Validates that the constraints of the ArgGroup are satisfied.
Implemented in TCLAP::ExclusiveArgGroup, and TCLAP::AnyOf.
|
friend |
Definition at line 43 of file ArgGroup.h.
|
friend |
Definition at line 44 of file ArgGroup.h.
|
protected |
Definition at line 127 of file ArgGroup.h.
Referenced by TCLAP::CmdLine::add(), add(), TCLAP::StandaloneArgs::add(), begin(), begin(), end(), and end().
|
protected |
Definition at line 126 of file ArgGroup.h.
Referenced by add(), TCLAP::CmdLine::add(), and setParser().