VR-Link API Documentation for HLA Evolved
Public Member Functions
DtCmdLine::UnlabeledMultiArg< T > Class Template Reference

Just like a MultiArg, except that the arguments are unlabeled. More...

+ Inheritance diagram for DtCmdLine::UnlabeledMultiArg< T >:
+ Collaboration diagram for DtCmdLine::UnlabeledMultiArg< T >:

List of all members.

Public Member Functions

 UnlabeledMultiArg (const std::string &name, const std::string &desc, const std::string &typeDesc, bool ignoreable=false, Visitor *v=NULL)
 Constructor.
 UnlabeledMultiArg (const std::string &name, const std::string &desc, const std::string &typeDesc, CmdLineInterface &parser, bool ignoreable=false, Visitor *v=NULL)
 Constructor.
 UnlabeledMultiArg (const std::string &name, const std::string &desc, const std::vector< T > &allowed, bool ignoreable=false, Visitor *v=NULL)
 Constructor.
 UnlabeledMultiArg (const std::string &name, const std::string &desc, const std::vector< T > &allowed, CmdLineInterface &parser, bool ignoreable=false, Visitor *v=NULL)
 Constructor.
virtual bool processArg (int *i, std::vector< std::string > &args)
 Handles the processing of the argument.
virtual std::string shortID (const std::string &val="val") const
 Returns the a short id string.
virtual std::string longID (const std::string &val="val") const
 Returns the a long id string.
virtual bool operator== (const Arg &a) const
 Opertor ==.
virtual void addToList (std::list< Arg * > &argList) const
 Pushes this to back of list rather than front.

Detailed Description

template<class T>
class DtCmdLine::UnlabeledMultiArg< T >

Just like a MultiArg, except that the arguments are unlabeled.

Basically, this Arg will slurp up everything that hasn't been matched to another Arg.


Constructor & Destructor Documentation

template<class T >
DtCmdLine::UnlabeledMultiArg< T >::UnlabeledMultiArg ( const std::string &  name,
const std::string &  desc,
const std::string &  typeDesc,
bool  ignoreable = false,
Visitor v = NULL 
)

Constructor.

Parameters:
name- The name of the Arg. Note that this is used for identification, not as a long flag.
desc- A description of what the argument is for or does.
typeDesc- A short, human readable description of the type that this object expects. This is used in the generation of the USAGE statement. The goal is to be helpful to the end user of the program.
ignoreable- Whether or not this argument can be ignored using the "--" flag.
v- An optional visitor. You probably should not use this unless you have a very good reason.

References DtCmdLine::Arg::_ignoreable.

template<class T >
DtCmdLine::UnlabeledMultiArg< T >::UnlabeledMultiArg ( const std::string &  name,
const std::string &  desc,
const std::string &  typeDesc,
CmdLineInterface parser,
bool  ignoreable = false,
Visitor v = NULL 
)

Constructor.

Parameters:
name- The name of the Arg. Note that this is used for identification, not as a long flag.
desc- A description of what the argument is for or does.
typeDesc- A short, human readable description of the type that this object expects. This is used in the generation of the USAGE statement. The goal is to be helpful to the end user of the program.
parser- A CmdLine parser object to add this Arg to
ignoreable- Whether or not this argument can be ignored using the "--" flag.
v- An optional visitor. You probably should not use this unless you have a very good reason.

References DtCmdLine::Arg::_ignoreable, and DtCmdLine::CmdLineInterface::add().

template<class T >
DtCmdLine::UnlabeledMultiArg< T >::UnlabeledMultiArg ( const std::string &  name,
const std::string &  desc,
const std::vector< T > &  allowed,
bool  ignoreable = false,
Visitor v = NULL 
)

Constructor.

Parameters:
name- The name of the Arg. Note that this is used for identification, not as a long flag.
desc- A description of what the argument is for or does.
allowed- A vector of type T that where the values in the vector are the only values allowed for the arg.
ignoreable- Whether or not this argument can be ignored using the "--" flag.
v- An optional visitor. You probably should not use this unless you have a very good reason.

References DtCmdLine::Arg::_ignoreable.

template<class T >
DtCmdLine::UnlabeledMultiArg< T >::UnlabeledMultiArg ( const std::string &  name,
const std::string &  desc,
const std::vector< T > &  allowed,
CmdLineInterface parser,
bool  ignoreable = false,
Visitor v = NULL 
)

Constructor.

Parameters:
name- The name of the Arg. Note that this is used for identification, not as a long flag.
desc- A description of what the argument is for or does.
allowed- A vector of type T that where the values in the vector are the only values allowed for the arg.
parser- A CmdLine parser object to add this Arg to
ignoreable- Whether or not this argument can be ignored using the "--" flag.
v- An optional visitor. You probably should not use this unless you have a very good reason.

References DtCmdLine::Arg::_ignoreable, and DtCmdLine::CmdLineInterface::add().


Member Function Documentation

template<class T >
void DtCmdLine::UnlabeledMultiArg< T >::addToList ( std::list< Arg * > &  argList) const [virtual]

Pushes this to back of list rather than front.

Parameters:
argList- The list this should be added to.

Reimplemented from DtCmdLine::Arg.

template<class T >
std::string DtCmdLine::UnlabeledMultiArg< T >::longID ( const std::string &  val = "val") const [virtual]

Returns the a long id string.

Used in the usage.

Parameters:
val- value to be used.

Reimplemented from DtCmdLine::MultiArg< T >.

template<class T >
bool DtCmdLine::UnlabeledMultiArg< T >::operator== ( const Arg a) const [virtual]

Opertor ==.

Parameters:
a- The Arg to be compared to this.

References DtCmdLine::Arg::getDescription(), and DtCmdLine::Arg::getName().

template<class T >
bool DtCmdLine::UnlabeledMultiArg< T >::processArg ( int *  i,
std::vector< std::string > &  args 
) [virtual]

Handles the processing of the argument.

This re-implements the Arg version of this method to set the _value of the argument appropriately. It knows the difference between labeled and unlabeled.

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

Reimplemented from DtCmdLine::MultiArg< T >.

template<class T >
std::string DtCmdLine::UnlabeledMultiArg< T >::shortID ( const std::string &  val = "val") const [virtual]

Returns the a short id string.

Used in the usage.

Parameters:
val- value to be used.

Reimplemented from DtCmdLine::MultiArg< T >.


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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)