Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBargv Class Reference

Argument list handler ****. More...

#include "CTBargv.hxx"

List of all members.

Public Methods

 CTBargv ()
 CTBargv (int argc, char *argv[])
 ~CTBargv ()
int Argc () const
const char * Argv (int i_ind) const
bool Locate (const char *c_opt, int i_npar=0)
const char * NextArg ()
void CheckUnused ()
bool CheckErrors ()
bool CheckErrors (ostream &os)
void SetupStream (istrstream &istr)
void CheckStream (istrstream &istr)
void ToStream (ostream &os=cout) const
const char * operator[] (int i_ind) const

Private Attributes

int mi_argc
char * mc_args
argdscm_argv
int mi_curarg

Static Private Attributes

const int mi_error_conv = 0x0001
const int mi_error_npar = 0x0002
const int mi_error_unused = 0x0004

Related Functions

(Note that these are not member functions.)

ostream & operator<< (ostream &os, const CTBargv &av)


Detailed Description

Argument list handler ****.

This class allows to process the C/C++ standart main program argument list as a stream.

Definition at line 18 of file CTBargv.hxx.


Constructor & Destructor Documentation

CTBargv::CTBargv
 

Default constructor.

Definition at line 32 of file CTBargv.cxx.

CTBargv::CTBargv int argc,
char * argv[]
 

Constructor from argument list.

Definition at line 44 of file CTBargv.cxx.

CTBargv::~CTBargv
 

Destructor.

Definition at line 79 of file CTBargv.cxx.


Member Function Documentation

int CTBargv::Argc const [inline]
 

Returns argument count.

Definition at line 18 of file CTBargv.icc.

const char * CTBargv::Argv int i_ind const [inline]
 

Access argument i_ind.

Definition at line 26 of file CTBargv.icc.

Referenced by operator[]().

bool CTBargv::Locate const char * c_opt,
int i_npar = 0
 

Locate an option.

Locates the first remaining argument matching c_opt and returns true if at least i_npar additional parameters are available.

Definition at line 94 of file CTBargv.cxx.

const char * CTBargv::NextArg
 

Returns next argument.

Definition at line 137 of file CTBargv.cxx.

Referenced by operator>>().

void CTBargv::CheckUnused
 

Ccheck for unused arguments.

Definition at line 154 of file CTBargv.cxx.

bool CTBargv::CheckErrors
 

Check for errors (returns false if none found).

Definition at line 171 of file CTBargv.cxx.

Referenced by CheckErrors().

bool CTBargv::CheckErrors ostream & os
 

Check for errors and print error messages to stream os.

Definition at line 184 of file CTBargv.cxx.

void CTBargv::SetupStream istrstream & istr
 

Setup temporary stream.

Definition at line 210 of file CTBargv.cxx.

Referenced by operator>>().

void CTBargv::CheckStream istrstream & istr
 

Check temporary stream.

Definition at line 221 of file CTBargv.cxx.

Referenced by operator>>().

void CTBargv::ToStream ostream & os = cout const
 

ostream insertion.

Definition at line 247 of file CTBargv.cxx.

Referenced by operator<<().

const char * CTBargv::operator[] int i_ind const [inline]
 

Access argument i_ind.

Definition at line 34 of file CTBargv.icc.


Friends And Related Function Documentation

ostream & operator<< ostream & os,
const CTBargv & av
[related]
 

ostream insertion operator.

Definition at line 45 of file CTBargv.icc.


Member Data Documentation

const int CTBargv::mi_error_conv = 0x0001 [static, private]
 

Definition at line 56 of file CTBargv.hxx.

const int CTBargv::mi_error_npar = 0x0002 [static, private]
 

Definition at line 57 of file CTBargv.hxx.

const int CTBargv::mi_error_unused = 0x0004 [static, private]
 

Definition at line 58 of file CTBargv.hxx.

int CTBargv::mi_argc [private]
 

Definition at line 60 of file CTBargv.hxx.

char* CTBargv::mc_args [private]
 

Definition at line 61 of file CTBargv.hxx.

argdsc* CTBargv::m_argv [private]
 

Definition at line 62 of file CTBargv.hxx.

int CTBargv::mi_curarg [private]
 

Definition at line 63 of file CTBargv.hxx.


The documentation for this class was generated from the following files:
Generated at Fri Oct 24 18:13:08 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001