Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members  

csCommandLineParser Class Reference

A utility class that makes it easier to parse the command line. More...

#include <cmdline.h>

Inheritance diagram for csCommandLineParser:

iCommandLineParser iBase List of all members.

Public Methods

 csCommandLineParser (iBase *Parent=NULL)
 Constructor.

 csCommandLineParser (int argc, const char *const argv[])
 Construct with a given command line.

virtual ~csCommandLineParser ()
 Destructor.

virtual void Initialize (int argc, const char *const argv[])
 Initialize for the given command line. More...

virtual void Reset ()
 Clear all options and names.

virtual const char* GetOption (const char *iName, int iIndex=0) const
 Query specific commandline option (you can query second etc. such option).

virtual const char* GetName (int iIndex=0) const
 Query filename specified on commandline (that is, without leading '-').

virtual void AddOption (const char *iName, const char *iValue)
 Add a command-line option to the command-line option array.

virtual void AddName (const char *iName)
 Add a command-line name to the command-line names array.

virtual bool ReplaceOption (const char *iName, const char *iValue, int iIndex=0)
 Replace the Nth command-line option with a new value.

virtual bool ReplaceName (const char *iValue, int iIndex=0)
 Replace the Nth command-line name with a new value.


Public Attributes

 SCF_DECLARE_IBASE

Detailed Description

A utility class that makes it easier to parse the command line.


Member Function Documentation

void csCommandLineParser::Initialize ( int argc,
const char *const argv[] ) [virtual]
 

Initialize for the given command line.

Options from command line are added to any options already present --- i.e. those added via AddName() or AddOption().

Reimplemented from iCommandLineParser.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000