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

BOSS::CommandLine Class Reference

A class for parsing and storing command line options. More...

#include <commandline.h>

List of all members.

Public Member Functions

 CommandLine ()
void print (ostream &s) const
 CommandLine (int argc, char **argv, const t_OptItemVector &v, const string &s, const int fmin=-1, const int fmax=-1)
CommandLineoperator= (const CommandLine &C)
BOSS::t_OptItem operator() (const string &opt) const
string operator[] (const unsigned i) const
unsigned size () const

Private Member Functions

void error (const string &s)

Private Attributes

t_StringVector farg
t_OptItemMap barg
string usage


Detailed Description

A class for parsing and storing command line options.

The class CommandLine takes the command line arguments and parses them. Which options are recognized is defined in the t_OptItem vector v. This vector determines the behavior of this class. There are two choices to recall the options. Options without a flag are stored as an array and can be recalled with the operator []. Options with a flag are stored in a map. They are recalled by the operator ().

Author:
Karlheinz Stoeber


Constructor & Destructor Documentation

BOSS::CommandLine::CommandLine  )  [inline]
 

BOSS::CommandLine::CommandLine int  argc,
char **  argv,
const t_OptItemVector v,
const string &  s,
const int  fmin = -1,
const int  fmax = -1
 


Member Function Documentation

void BOSS::CommandLine::error const string &  s  )  [private]
 

BOSS::t_OptItem BOSS::CommandLine::operator() const string &  opt  )  const
 

BOSS::CommandLine & BOSS::CommandLine::operator= const CommandLine C  ) 
 

string BOSS::CommandLine::operator[] const unsigned  i  )  const
 

void BOSS::CommandLine::print ostream &  s  )  const
 

unsigned BOSS::CommandLine::size  )  const [inline]
 


Member Data Documentation

t_OptItemMap BOSS::CommandLine::barg [private]
 

The options which are bound by an option string

t_StringVector BOSS::CommandLine::farg [private]
 

The options which are not bound by an option string

string BOSS::CommandLine::usage [private]
 

The usage message which is printed if an error occurred


The documentation for this class was generated from the following files:
Generated on Tue Dec 20 23:14:41 2005 for BOSS by doxygen 1.3.6