Assignments
Assignments
Util::CmdLineParameter< Type > Class Template Reference

#include <cmdLineParser.h>

Inheritance diagram for Util::CmdLineParameter< Type >:
Util::CmdLineReadable

Public Member Functions

 CmdLineParameter (const std::string &name)
 
 CmdLineParameter (const std::string &name, Type v)
 
int read (char **argv, int argc)
 
- Public Member Functions inherited from Util::CmdLineReadable
 CmdLineReadable (const std::string &name)
 
virtual ~CmdLineReadable (void)
 

Public Attributes

Type value
 
- Public Attributes inherited from Util::CmdLineReadable
bool set
 
std::string name
 

Detailed Description

template<class Type>
class Util::CmdLineParameter< Type >

This templated class represents a named argument of the prescribed type

Constructor & Destructor Documentation

◆ CmdLineParameter() [1/2]

template<class Type >
Util::CmdLineParameter< Type >::CmdLineParameter ( const std::string &  name)

Constructor with the name of the argument

◆ CmdLineParameter() [2/2]

template<class Type >
Util::CmdLineParameter< Type >::CmdLineParameter ( const std::string &  name,
Type  v 
)

Constructor with the name of the argument and the default value

Member Function Documentation

◆ read()

template<class Type >
int Util::CmdLineParameter< Type >::read ( char **  argv,
int  argc 
)
virtual

Try to set the argument from the list of command line arguments. Returns thenumber of arguments ingested.

Reimplemented from Util::CmdLineReadable.

Member Data Documentation

◆ value

template<class Type >
Type Util::CmdLineParameter< Type >::value

The value the parameter has been set to


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