Public Member Functions | Protected Attributes | List of all members
TCLAP::MultiSwitchArg Class Reference

#include <MultiSwitchArg.h>

Inheritance diagram for TCLAP::MultiSwitchArg:
Inheritance graph
[legend]

Public Member Functions

int getValue ()
 
std::string longID (const std::string &val) const
 
 MultiSwitchArg (const std::string &flag, const std::string &name, const std::string &desc, int init=0, Visitor *v=NULL)
 
 MultiSwitchArg (const std::string &flag, const std::string &name, const std::string &desc, CmdLineInterface &parser, int init=0, Visitor *v=NULL)
 
virtual bool processArg (int *i, std::vector< std::string > &args)
 
void reset ()
 
std::string shortID (const std::string &val) const
 
- Public Member Functions inherited from TCLAP::SwitchArg
bool combinedSwitchesMatch (std::string &combined)
 
bool getValue ()
 
 SwitchArg (const std::string &flag, const std::string &name, const std::string &desc, bool def=false, Visitor *v=NULL)
 
 SwitchArg (const std::string &flag, const std::string &name, const std::string &desc, CmdLineInterface &parser, bool def=false, Visitor *v=NULL)
 
- Public Member Functions inherited from TCLAP::Arg
bool _hasBlanks (const std::string &s) const
 
virtual bool acceptsMultipleValues ()
 
virtual void addToList (std::list< Arg * > &argList) const
 
virtual bool allowMore ()
 
virtual bool argMatches (const std::string &s) const
 
void forceRequired ()
 
std::string getDescription () const
 
const std::stringgetFlag () const
 
const std::stringgetName () const
 
bool isIgnoreable () const
 
virtual bool isRequired () const
 
bool isSet () const
 
bool isValueRequired () const
 
virtual bool operator== (const Arg &a) const
 
void setRequireLabel (const std::string &s)
 
virtual std::string toString () const
 
virtual void trimFlag (std::string &flag, std::string &value) const
 
void xorSet ()
 
virtual ~Arg ()
 

Protected Attributes

int _default
 
int _value
 
- Protected Attributes inherited from TCLAP::SwitchArg
bool _default
 
bool _value
 
- Protected Attributes inherited from TCLAP::Arg
bool _acceptsMultipleValues
 
bool _alreadySet
 
std::string _description
 
std::string _flag
 
bool _ignoreable
 
std::string _name
 
bool _required
 
std::string _requireLabel
 
bool _valueRequired
 
Visitor_visitor
 
bool _xorSet
 

Additional Inherited Members

- Static Public Member Functions inherited from TCLAP::Arg
static void beginIgnoring ()
 
static char blankChar ()
 
static char delimiter ()
 
static char flagStartChar ()
 
static const std::string flagStartString ()
 
static const std::string ignoreNameString ()
 
static bool ignoreRest ()
 
static const std::string nameStartString ()
 
static void setDelimiter (char c)
 
- Protected Member Functions inherited from TCLAP::Arg
void _checkWithVisitor () const
 
 Arg (const std::string &flag, const std::string &name, const std::string &desc, bool req, bool valreq, Visitor *v=NULL)
 

Detailed Description

A multiple switch argument. If the switch is set on the command line, then the getValue method will return the number of times the switch appears.

Definition at line 39 of file MultiSwitchArg.h.

Constructor & Destructor Documentation

TCLAP::MultiSwitchArg::MultiSwitchArg ( const std::string flag,
const std::string name,
const std::string desc,
int  init = 0,
Visitor v = NULL 
)
inline

MultiSwitchArg constructor.

Parameters
flag- The one character flag that identifies this argument on the command line.
name- A one word name for the argument. Can be used as a long flag on the command line.
desc- A description of what the argument is for or does.
init- Optional. The initial/default value of this Arg. Defaults to 0.
v- An optional visitor. You probably should not use this unless you have a very good reason.

Definition at line 130 of file MultiSwitchArg.h.

TCLAP::MultiSwitchArg::MultiSwitchArg ( const std::string flag,
const std::string name,
const std::string desc,
CmdLineInterface parser,
int  init = 0,
Visitor v = NULL 
)
inline

MultiSwitchArg constructor.

Parameters
flag- The one character flag that identifies this argument on the command line.
name- A one word name for the argument. Can be used as a long flag on the command line.
desc- A description of what the argument is for or does.
parser- A CmdLine parser object to add this Arg to
init- Optional. The initial/default value of this Arg. Defaults to 0.
v- An optional visitor. You probably should not use this unless you have a very good reason.

Definition at line 140 of file MultiSwitchArg.h.

Member Function Documentation

int TCLAP::MultiSwitchArg::getValue ( )
inline

Returns int, the number of times the switch has been set.

Definition at line 153 of file MultiSwitchArg.h.

std::string TCLAP::MultiSwitchArg::longID ( const std::string val) const
inlinevirtual

Returns the longID for this Arg.

Reimplemented from TCLAP::Arg.

Definition at line 199 of file MultiSwitchArg.h.

bool TCLAP::MultiSwitchArg::processArg ( int *  i,
std::vector< std::string > &  args 
)
inlinevirtual

Handles the processing of the argument. This re-implements the SwitchArg version of this method to set the _value of the argument appropriately.

Parameters
i- Pointer the the current argument in the list.
args- Mutable list of strings. Passed in from main().

Reimplemented from TCLAP::SwitchArg.

Definition at line 155 of file MultiSwitchArg.h.

void TCLAP::MultiSwitchArg::reset ( void  )
inlinevirtual

Clears the Arg object and allows it to be reused by new command lines.

Reimplemented from TCLAP::SwitchArg.

Definition at line 205 of file MultiSwitchArg.h.

std::string TCLAP::MultiSwitchArg::shortID ( const std::string val) const
inlinevirtual

Returns the shortID for this Arg.

Reimplemented from TCLAP::Arg.

Definition at line 193 of file MultiSwitchArg.h.

Member Data Documentation

int TCLAP::MultiSwitchArg::_default
protected

Used to support the reset() method so that ValueArg can be reset to their constructed value.

Definition at line 52 of file MultiSwitchArg.h.

int TCLAP::MultiSwitchArg::_value
protected

The value of the switch.

Definition at line 46 of file MultiSwitchArg.h.


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


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:43