Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

ps.GameSetup
Class CmdLineArgs

   in CmdLineArgs.h
   in CmdLineArgs.cpp

class CmdLineArgs


Inner Classes, Typedefs, and Enums
typedef CmdLineArgs::ArgsT
          
 
Field Summary
private CStr m_Arg0
          
private CmdLineArgs::ArgsT m_Args
          
 
Constructor Summary
CmdLineArgs()
          
CmdLineArgs( int argc, char* argv[] )
          Parse the command-line options, for future processing.
 
Method Summary
 CStr Get( const char* name ) const
          Get the value of the named parameter.
 CStr GetArg0() const
          Get the value of argv[0], which is typically meant to be the name/path of the program (but the actual value is up to whoever executed the program).
 std::vector< CStr > GetMultiple( const char* name ) const
          Get all the values given to the named parameter.
 bool Has( const char* name ) const
          Test whether the given name was specified, as either -name or -name=value
 

Field Detail

m_Arg0

private CStr m_Arg0;

m_Args

private CmdLineArgs::ArgsT m_Args;


Constructor Detail

CmdLineArgs

public CmdLineArgs();

CmdLineArgs

public CmdLineArgs( int argc, char* argv[] );
Parse the command-line options, for future processing. All arguments are required to be of the form -name or -name=value - anything else is ignored.
Parameters:
argc - size of argv array
argv - array of arguments; argv[0] should be the program's name


Method Detail

Get

public CStr Get( const char* name ) const;
Get the value of the named parameter. If it was not specified, returns the empty string. If it was specified multiple times, returns the value from the first occurrence.

GetArg0

public CStr GetArg0() const;
Get the value of argv[0], which is typically meant to be the name/path of the program (but the actual value is up to whoever executed the program).

GetMultiple

public std::vector< CStr > GetMultiple( const char* name ) const;
Get all the values given to the named parameter. Returns values in the same order as they were given in argv.

Has

public bool Has( const char* name ) const;
Test whether the given name was specified, as either -name or -name=value

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD