CommandLine Class Reference
[Configuration]

Command parses command line arguments in a variety of formats. Command format is either:. More...

#include <CommandLine.h>

Inheritance diagram for CommandLine:
IMemoryValidate

List of all members.

Public Member Functions

 CommandLine (const CommandLine &cl)
 CommandLine (const int argc, const char **argv)
CommandLineoperator= (const CommandLine &cl)
bool Parse (const int argc, const char **argv)
void Clear ()
bool HasSwitch (const String &argNoDashOrSlash) const
StringGetSwitch (const String argNoDashOrSlash) const
StringGetSwitch (const String &argNoDashOrSlash, const String &defValue)
StringGetSwitch (const int idx) const
StringGetArg (int idx) const
int GetArgCount () const
int GetSwitchCount () const
void SetSwitch (const String &key, const String &value)
void ValidateMem () const
void CheckMem () const

Protected Member Functions

String ParseValue (const String &str, const bool unixStyle)

Protected Attributes

Vector< Stringm_switches
Hashtable< String, Stringm_switchIdx
Vector< Stringm_args

Detailed Description

Command parses command line arguments in a variety of formats. Command format is either:.

Definition at line 43 of file CommandLine.h.


Member Function Documentation

bool CommandLine::Parse ( const int  argc,
const char **  argv 
)

Parse can handle unix style -X, --name, and --name=val as well as windows /X:val. The style cannot be mixed, since "-X:/dir" wouldn't work as expected. Quoted values are supported.

NOTE: argv[0] (the program name) is also added.

Definition at line 131 of file CommandLine.cpp.

References Vector< T >::Add().


The documentation for this class was generated from the following files: