Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Arak::Util::CommandLine::MultiParameter< T > Class Template Reference

#include <parsecl.hpp>

Inheritance diagram for Arak::Util::CommandLine::MultiParameter< T >:

Inheritance graph
[legend]
Collaboration diagram for Arak::Util::CommandLine::MultiParameter< T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class Arak::Util::CommandLine::MultiParameter< T >

A parameter that has can be specified multiple times on the command line.

Definition at line 227 of file parsecl.hpp.

Public Member Functions

 MultiParameter (const char *sflag, const char *lflag, const char *desc)
 Constructor.

virtual ~MultiParameter ()
 Destructor.

const std::vector< T > & values () const
 Returns the value of this parameter.

virtual bool hasArg ()
 Returns true if this option takes an argument.


Protected Member Functions

virtual bool read (const char *str)
 Reads the value of this parameter from the supplied string.


Private Member Functions

virtual void printUsage (std::ostream &out) const
 Prints the usage of this parameter to the supplied output stream.


Private Attributes

std::vector< T > vals
 The value of this parameter.


Friends

class CommandLine


Constructor & Destructor Documentation

template<class T>
Arak::Util::CommandLine::MultiParameter< T >::MultiParameter const char *  sflag,
const char *  lflag,
const char *  desc
[inline]
 

Constructor.

Parameters:
sflag The short form of the option. This is usually preceded by a single dash and consists of a single letter, as in "-h".
lflag The long form of the option. This is usually preceded by a double dash, as in "--help".
desc A description of the option. This should be a string with no formatting (e.g., no newlines).

Definition at line 283 of file parsecl.hpp.

References Arak::Util::CommandLine::MultiParameter< T >::vals.

template<class T>
virtual Arak::Util::CommandLine::MultiParameter< T >::~MultiParameter  )  [inline, virtual]
 

Destructor.

Definition at line 291 of file parsecl.hpp.


Member Function Documentation

template<class T>
virtual bool Arak::Util::CommandLine::MultiParameter< T >::hasArg  )  [inline, virtual]
 

Returns true if this option takes an argument.

Reimplemented from Arak::Util::CommandLine::Option.

Definition at line 301 of file parsecl.hpp.

template<class T>
virtual void Arak::Util::CommandLine::MultiParameter< T >::printUsage std::ostream &  out  )  const [inline, private, virtual]
 

Prints the usage of this parameter to the supplied output stream.

Reimplemented from Arak::Util::CommandLine::Option.

Definition at line 242 of file parsecl.hpp.

template<class T>
virtual bool Arak::Util::CommandLine::MultiParameter< T >::read const char *  str  )  [inline, protected, virtual]
 

Reads the value of this parameter from the supplied string.

Parameters:
str a string representation of this parameter's value
Returns:
true if the read was successful

Reimplemented from Arak::Util::CommandLine::Option.

Definition at line 259 of file parsecl.hpp.

References Arak::Util::CommandLine::MultiParameter< T >::vals.

template<class T>
const std::vector<T>& Arak::Util::CommandLine::MultiParameter< T >::values  )  const [inline]
 

Returns the value of this parameter.

Definition at line 296 of file parsecl.hpp.

References Arak::Util::CommandLine::MultiParameter< T >::vals.


Friends And Related Function Documentation

template<class T>
friend class CommandLine [friend]
 

Reimplemented from Arak::Util::CommandLine::Option.

Definition at line 229 of file parsecl.hpp.


Member Data Documentation

template<class T>
std::vector<T> Arak::Util::CommandLine::MultiParameter< T >::vals [private]
 

The value of this parameter.

Definition at line 236 of file parsecl.hpp.

Referenced by Arak::Util::CommandLine::MultiParameter< T >::MultiParameter(), Arak::Util::CommandLine::MultiParameter< T >::read(), and Arak::Util::CommandLine::MultiParameter< T >::values().


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:41:42 2005 for Arak by doxygen 1.3.6