Documentation


animal::ArgumentBase Struct Reference

#include <argumentParser.h>

Inheritance diagram for animal::ArgumentBase:

animal::Argument< T > List of all members.

Detailed Description

Abstract base class for all comand line arguments.

Definition at line 24 of file argumentParser.h.

Public Types

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::istream &)=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


Public Attributes

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.


Member Typedef Documentation

typedef std::string animal::ArgumentBase::string
 

character string

Definition at line 27 of file argumentParser.h.

Referenced by ArgumentBase().


Constructor & Destructor Documentation

animal::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 35 of file argumentParser.h.

References help, isSet, longName, mandatory, shortName, and string.

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

Base destructor: does nothing.

Definition at line 44 of file argumentParser.h.


Member Function Documentation

void animal::ArgumentBase::print  )  const [inline]
 

print short name, long name, help

Definition at line 57 of file argumentParser.h.

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

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

Print the value of the associated variable.

Implemented in animal::Argument< T >.

Referenced by print().

virtual bool animal::ArgumentBase::read std::istream &   )  [pure virtual]
 

Read the command line.

Implemented in animal::Argument< T >.


Member Data Documentation

string animal::ArgumentBase::help
 

Help message.

Definition at line 54 of file argumentParser.h.

Referenced by ArgumentBase(), and print().

bool animal::ArgumentBase::isSet
 

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

Definition at line 69 of file argumentParser.h.

Referenced by ArgumentBase().

string animal::ArgumentBase::longName
 

Long name.

Definition at line 53 of file argumentParser.h.

Referenced by ArgumentBase(), and print().

bool animal::ArgumentBase::mandatory
 

True iff the value must be set.

Definition at line 66 of file argumentParser.h.

Referenced by ArgumentBase(), and print().

char animal::ArgumentBase::shortName
 

Short name.

Definition at line 52 of file argumentParser.h.

Referenced by ArgumentBase(), and print().


The documentation for this struct was generated from the following file:
Generated on Thu Dec 23 13:52:29 2004 by doxygen 1.3.6