OSB_APP::ArgsBase Class Reference

Collaboration diagram for OSB_APP::ArgsBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

Evaluate and store command line parameters: base class.

Definition at line 54 of file progargs.h.

Public Types

Public Member Functions

Protected Attributes


Member Typedef Documentation

typedef std::vector<std::string> OSB_APP::ArgsBase::Args

STL-container to store the arguments.

Definition at line 57 of file progargs.h.


Constructor & Destructor Documentation

virtual OSB_APP::ArgsBase::~ArgsBase (  )  [virtual]

Empty virtual destructor.


Member Function Documentation

const Args& OSB_APP::ArgsBase::args (  )  const

Read access to arguments.

The return value is meaningful only after evalArgs() was called.

bool OSB_APP::ArgsBase::convert ( long dest,
const char *  src 
)

Utility: convert option to long.

Parameters:
dest Value to populate.
src Option argument to convert.
Returns:
true if the conversion is successful, else false.

int OSB_APP::ArgsBase::evalArgs ( int  argc,
char *const *  argv 
)

Evaluate command line parameters.

Parameters:
argc Number of parameters.
argv Parameter array.
Returns:
The number of encountered errors: 0 in case of success.
This is a wrapper around getopt which is called with optstring(). For each encountered option evalOpt() is called.

Program arguments, i.e., non-option parameters are stored in args_.

virtual int OSB_APP::ArgsBase::evalOpt ( int  opt,
char *  optarg,
int  optopt 
) [pure virtual]

Evaluate an encountered option.

Parameters:
opt Option character that was found.
optarg Points to the argument of an option.
optopt Unrecognized option character if opt is '?'.
Returns:
0 in case of success, a non-zero value in case of an error.
See man 3 getopt for a detailed description of the parameters.

virtual std::string OSB_APP::ArgsBase::optstring (  )  [pure virtual]

String with valid option.

See man 3 getopt for a description.


Member Data Documentation

Args OSB_APP::ArgsBase::args_ [protected]

List of arguments (non-option command line parameters).

It is populated in evalArgs() after all options have been evaluated.

Definition at line 125 of file progargs.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:17:30 2006 for OSB Library by  doxygen 1.4.7