ArgumentBase Struct Reference

Abstract base class for all command line arguments. More...

#include <argumentParser.h>

Inheritance diagram for ArgumentBase:

Inheritance graph
[legend]
Collaboration diagram for ArgumentBase:

Collaboration graph
[legend]

Public Types

typedef std::string string
 character string
typedef std::string string
 character string

Public Member Functions

 ArgumentBase (char s, string l, string h, bool m)
 Constructor.
virtual ~ArgumentBase ()
 Base destructor: does nothing.
virtual bool read (std::list< std::string > &str)=0
 Read the command line.
virtual void printValue () const =0
 Print the value of the associated variable.
void print () const
 print short name, long name, help
 ArgumentBase (char s, string l, string h, bool m)
 Constructor.
virtual ~ArgumentBase ()
 Base destructor: does nothing.
virtual bool read (std::list< std::string > &str)=0
 Read the command line.
virtual void printValue () const =0
 Print the value of the associated variable.
void print () const
 print short name, long name, help

Data Fields

char shortName
 Short name.
string longName
 Long name.
string help
 Help message.
bool mandatory
 True iff the value must be set.
bool isSet
 True iff a value has bee read on the command line.

Detailed Description

Abstract base class for all command line arguments.

Definition at line 47 of file argumentParser.h.


Member Typedef Documentation

typedef std::string ArgumentBase::string

character string

Definition at line 52 of file argumentParser.h.

typedef std::string ArgumentBase::string

character string

Definition at line 50 of file argumentParser.h.


Constructor & Destructor Documentation

ArgumentBase::ArgumentBase ( char  s,
string  l,
string  h,
bool  m 
) [inline]

Constructor.

Parameters:
s short name
l long name
h help
m true iff the argument is mandatory

Definition at line 58 of file argumentParser.h.

virtual ArgumentBase::~ArgumentBase (  )  [inline, virtual]

Base destructor: does nothing.

Definition at line 67 of file argumentParser.h.

ArgumentBase::ArgumentBase ( char  s,
string  l,
string  h,
bool  m 
) [inline]

Constructor.

Parameters:
s short name
l long name
h help
m true iff the argument is mandatory

Definition at line 60 of file argumentParser.h.

virtual ArgumentBase::~ArgumentBase (  )  [inline, virtual]

Base destructor: does nothing.

Definition at line 69 of file argumentParser.h.


Member Function Documentation

void ArgumentBase::print (  )  const [inline]

print short name, long name, help

Definition at line 82 of file argumentParser.h.

References help, longName, mandatory, printValue(), and shortName.

void ArgumentBase::print (  )  const [inline]

print short name, long name, help

Definition at line 80 of file argumentParser.h.

References help, longName, mandatory, printValue(), and shortName.

virtual void ArgumentBase::printValue (  )  const [pure virtual]

Print the value of the associated variable.

Implemented in Argument< T >, Argument< T >, and Argument< T >.

virtual void ArgumentBase::printValue (  )  const [pure virtual]

Print the value of the associated variable.

Implemented in Argument< T >, Argument< T >, and Argument< T >.

Referenced by print().

virtual bool ArgumentBase::read ( std::list< std::string > &  str  )  [pure virtual]

virtual bool ArgumentBase::read ( std::list< std::string > &  str  )  [pure virtual]


Field Documentation

Help message.

Definition at line 77 of file argumentParser.h.

Referenced by print().

True iff a value has bee read on the command line.

Definition at line 92 of file argumentParser.h.

Referenced by Argument< T >::read().

Long name.

Definition at line 76 of file argumentParser.h.

Referenced by print().

True iff the value must be set.

Definition at line 89 of file argumentParser.h.

Referenced by print().

Short name.

Definition at line 75 of file argumentParser.h.

Referenced by print().


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

Generated on Sun Nov 23 04:12:51 2008 for Sofa by  doxygen 1.5.7.1