Logo Search packages:      
Sourcecode: passwordmaker-cli version File versions  Download package

template<class T >
TCLAP::ValueArg< T >::ValueArg ( const std::string &  flag,
const std::string &  name,
const std::string &  desc,
bool  req,
const std::vector< T > &  allowed,
CmdLineInterface parser,
Visitor v = NULL 

Labeled ValueArg constructor. You could conceivably call this constructor with a blank flag, but that would make you a bad person. It would also cause an exception to be thrown. If you want an unlabeled argument, use the other constructor.

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.
req- Whether the argument is required on the command line.
value- The default value assigned to this argument if it is not present on the command line.
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.
v- An optional visitor. You probably should not use this unless you have a very good reason.

Definition at line 451 of file ValueArg.h.

References TCLAP::CmdLineInterface::add(), and TCLAP::ValueArg< T >::allowedInit().

: Arg(flag, name, desc, req, true, v),
_value( val ),
_allowed( allowed )
    parser.add( this );

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index