MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
MAKLogger::ReplacedUnlabeledMultiArg< T > Class Template Reference

Just like a MultiArg, except that the DtCmdLine::Arguments are unlabeled. More...

+ Inheritance diagram for MAKLogger::ReplacedUnlabeledMultiArg< T >:
+ Collaboration diagram for MAKLogger::ReplacedUnlabeledMultiArg< T >:

Public Member Functions

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

Detailed Description

template<class T>
class MAKLogger::ReplacedUnlabeledMultiArg< T >

Just like a MultiArg, except that the DtCmdLine::Arguments are unlabeled.

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

Constructor & Destructor Documentation

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

Constructor.

Parameters
name- The name of the DtCmdLine::Arg. Note that this is used for identification, not as a long flag.
desc- A description of what the DtCmdLine::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 DtCmdLine::Argument can be ignored using the "--" flag.
v- An optional visitor. You probably should not use this unless you have a very good reason.
template<class T >
MAKLogger::ReplacedUnlabeledMultiArg< T >::ReplacedUnlabeledMultiArg ( const std::string &  name,
const std::string &  desc,
const std::string &  typeDesc,
DtCmdLine::CmdLineInterface &  parser,
bool  ignoreable = false,
DtCmdLine::Visitor *  v = NULL 
)

Constructor.

Parameters
name- The name of the DtCmdLine::Arg. Note that this is used for identification, not as a long flag.
desc- A description of what the DtCmdLine::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 DtCmdLine::Arg to
ignoreable- Whether or not this DtCmdLine::Argument can be ignored using the "--" flag.
v- An optional visitor. You probably should not use this unless you have a very good reason.
template<class T>
MAKLogger::ReplacedUnlabeledMultiArg< T >::ReplacedUnlabeledMultiArg ( const std::string &  name,
const std::string &  desc,
const std::vector< T > &  allowed,
bool  ignoreable = false,
DtCmdLine::Visitor *  v = NULL 
)

Constructor.

Parameters
name- The name of the DtCmdLine::Arg. Note that this is used for identification, not as a long flag.
desc- A description of what the DtCmdLine::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 DtCmdLine::Arg.
ignoreable- Whether or not this DtCmdLine::Argument can be ignored using the "--" flag.
v- An optional visitor. You probably should not use this unless you have a very good reason.
template<class T>
MAKLogger::ReplacedUnlabeledMultiArg< T >::ReplacedUnlabeledMultiArg ( const std::string &  name,
const std::string &  desc,
const std::vector< T > &  allowed,
DtCmdLine::CmdLineInterface &  parser,
bool  ignoreable = false,
DtCmdLine::Visitor *  v = NULL 
)

Constructor.

Parameters
name- The name of the DtCmdLine::Arg. Note that this is used for identification, not as a long flag.
desc- A description of what the DtCmdLine::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 DtCmdLine::Arg.
parser- A CmdLine parser object to add this DtCmdLine::Arg to
ignoreable- Whether or not this DtCmdLine::Argument can be ignored using the "--" flag.
v- An optional visitor. You probably should not use this unless you have a very good reason.

Member Function Documentation

template<class T >
void MAKLogger::ReplacedUnlabeledMultiArg< T >::addToList ( std::list< DtCmdLine::Arg * > &  argList) const
virtual

Pushes this to back of list rather than front.

template<class T> bool ReplacedUnlabeledMultiArg<T>::operator==(const DtCmdLine::Arg& a) const { if ( _name == a.getName() || _description == a.getDescription() ) return true; else return false; }

Parameters
argList- The list this should be added to.
template<class T >
std::string MAKLogger::ReplacedUnlabeledMultiArg< T >::longID ( const std::string &  val) const
virtual

Returns the a long id string.

Used in the usage.

Parameters
val- value to be used.
template<class T >
bool MAKLogger::ReplacedUnlabeledMultiArg< T >::processArg ( int *  i,
std::vector< std::string > &  args 
)
virtual

Handles the processing of the DtCmdLine::Argument.

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

Parameters
i- Pointer the the current DtCmdLine::Argument in the list.
args- Mutable list of strings. Passed from main().
template<class T >
std::string MAKLogger::ReplacedUnlabeledMultiArg< T >::shortID ( const std::string &  val) const
virtual

Returns the a short id string.

Used in the usage.

Parameters
val- value to be used.

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

Document ID: Generated on Thu Dec 18 15:35:09 EST 2025 from SVN revision 282494
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)