Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
ArgvClass Class Reference

#include <argv.h>

Public Member Functions

 ArgvClass (bool case_sensitive=false, bool exact_size=false)
 
 ~ArgvClass ()
 
const char * Find (const char *arg)
 
const char * Find_Again (const char *arg=0L)
 
const char * Find_Value (const char *arg)
 
const char * Get_Cur_Value (unsigned prefixlen, bool *val_in_next=0)
 
void Update_Value (const char *attrib, const char *value)
 
void Add_Value (const char *attrib, const char *value=NULL)
 
bool Remove_Value (const char *attrib)
 
const char * First ()
 
const char * Next ()
 
void Reset ()
 
const char * Cur ()
 
void Case_Sensitive (bool on)
 
bool Is_Case_Sensitive ()
 
void Exact_Size (bool on)
 
bool Is_Exact_Size ()
 

Static Public Member Functions

static int Init (char *lpCmdLine, char *fileprefix="@")
 
static bool Load_File (const char *fname)
 
static void Free ()
 

Protected Types

enum  { MAX_ARGC = 256 }
 

Protected Attributes

int CurrentPos
 
const char * LastArg
 
union { 
 
   unsigned   Flags 
 
   struct { 
 
      unsigned   CaseSensitive:1 
 
      unsigned   ExactSize:1 
 
   }   Flag 
 
};  
 

Static Protected Attributes

static int Argc = 0
 
static char * Argv [MAX_ARGC]
 

Detailed Description

Definition at line 64 of file argv.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_ARGC 

Definition at line 161 of file argv.h.

Constructor & Destructor Documentation

◆ ArgvClass()

ArgvClass::ArgvClass ( bool case_sensitive = false,
bool exact_size = false )

Definition at line 68 of file argv.cpp.

◆ ~ArgvClass()

ArgvClass::~ArgvClass ( )
inline

Definition at line 76 of file argv.h.

Member Function Documentation

◆ Add_Value()

void ArgvClass::Add_Value ( const char * attrib,
const char * value = NULL )

Definition at line 437 of file argv.cpp.

◆ Case_Sensitive()

void ArgvClass::Case_Sensitive ( bool on)
inline

Definition at line 135 of file argv.h.

◆ Cur()

const char * ArgvClass::Cur ( )
inline

Definition at line 127 of file argv.h.

◆ Exact_Size()

void ArgvClass::Exact_Size ( bool on)
inline

Definition at line 139 of file argv.h.

◆ Find()

const char * ArgvClass::Find ( const char * arg)
inline

Definition at line 79 of file argv.h.

◆ Find_Again()

const char * ArgvClass::Find_Again ( const char * arg = 0L)

Definition at line 91 of file argv.cpp.

◆ Find_Value()

const char * ArgvClass::Find_Value ( const char * arg)

Definition at line 322 of file argv.cpp.

◆ First()

const char * ArgvClass::First ( )
inline

Definition at line 109 of file argv.h.

◆ Free()

void ArgvClass::Free ( )
static

Definition at line 300 of file argv.cpp.

◆ Get_Cur_Value()

const char * ArgvClass::Get_Cur_Value ( unsigned prefixlen,
bool * val_in_next = 0 )

Definition at line 346 of file argv.cpp.

◆ Init()

int ArgvClass::Init ( char * lpCmdLine,
char * fileprefix = "@" )
static

Definition at line 162 of file argv.cpp.

◆ Is_Case_Sensitive()

bool ArgvClass::Is_Case_Sensitive ( )
inline

Definition at line 136 of file argv.h.

◆ Is_Exact_Size()

bool ArgvClass::Is_Exact_Size ( )
inline

Definition at line 140 of file argv.h.

◆ Load_File()

bool ArgvClass::Load_File ( const char * fname)
static

Definition at line 245 of file argv.cpp.

◆ Next()

const char * ArgvClass::Next ( )
inline

Definition at line 115 of file argv.h.

◆ Remove_Value()

bool ArgvClass::Remove_Value ( const char * attrib)

Definition at line 471 of file argv.cpp.

◆ Reset()

void ArgvClass::Reset ( )
inline

Definition at line 123 of file argv.h.

◆ Update_Value()

void ArgvClass::Update_Value ( const char * attrib,
const char * value )

Definition at line 401 of file argv.cpp.

Member Data Documentation

◆ [union]

union { ... } ArgvClass

◆ Argc

int ArgvClass::Argc = 0
staticprotected

Definition at line 158 of file argv.h.

◆ Argv

char * ArgvClass::Argv
staticprotected

Definition at line 162 of file argv.h.

◆ CaseSensitive

unsigned ArgvClass::CaseSensitive

Definition at line 152 of file argv.h.

◆ CurrentPos

int ArgvClass::CurrentPos
protected

Definition at line 144 of file argv.h.

◆ ExactSize

unsigned ArgvClass::ExactSize

Definition at line 153 of file argv.h.

◆ [struct]

struct { ... } ArgvClass::Flag

◆ Flags

unsigned ArgvClass::Flags

Definition at line 150 of file argv.h.

◆ LastArg

const char* ArgvClass::LastArg
protected

Definition at line 147 of file argv.h.


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