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

#include <INI.H>

Inherited by DazzleINIClass.

Public Member Functions

 INIClass (void)
 
 INIClass (FileClass &file)
 
 INIClass (const char *filename)
 
virtual ~INIClass (void)
 
int Load (FileClass &file)
 
int Load (Straw &file)
 
int Load (const char *filename)
 
int Save (FileClass &file) const
 
int Save (Pipe &file) const
 
int Save (const char *filename) const
 
const char * Get_Filename (void) const
 
bool Clear (char const *section=NULL, char const *entry=NULL)
 
bool Is_Loaded (void) const
 
int Size (void) const
 
bool Is_Present (char const *section, char const *entry=NULL) const
 
int Section_Count (void) const
 
bool Section_Present (char const *section) const
 
int Entry_Count (char const *section) const
 
char const * Get_Entry (char const *section, int index) const
 
unsigned Enumerate_Entries (const char *section, const char *entry_prefix, unsigned startnumber=0, unsigned endnumber=(unsigned) -1)
 
PKey Get_PKey (bool fast) const
 
bool Get_Bool (char const *section, char const *entry, bool defvalue=false) const
 
float Get_Float (char const *section, char const *entry, float defvalue=0.0f) const
 
double Get_Double (char const *section, char const *entry, double defvalue=0.0) const
 
int Get_Hex (char const *section, char const *entry, int defvalue=0) const
 
int Get_Int (char const *section, char const *entry, int defvalue=0) const
 
int Get_String (char const *section, char const *entry, char const *defvalue, char *buffer, int size) const
 
const StringClassGet_String (StringClass &new_string, char const *section, char const *entry, char const *defvalue="") const
 
const WideStringClassGet_Wide_String (WideStringClass &new_string, char const *section, char const *entry, wchar_t const *defvalue=L"") const
 
int Get_List_Index (char const *section, char const *entry, int const defvalue, char *list[])
 
int * Get_Alloc_Int_Array (char const *section, char const *entry, int listend)
 
int Get_Int_Bitfield (char const *section, char const *entry, int defvalue, char *list[])
 
char * Get_Alloc_String (char const *section, char const *entry, char const *defvalue) const
 
int Get_TextBlock (char const *section, char *buffer, int len) const
 
int Get_UUBlock (char const *section, void *buffer, int len) const
 
int Get_UUBlock (char const *section, char const *entry, void *block, int len) const
 
TRect< int > const Get_Rect (char const *section, char const *entry, TRect< int > const &defvalue) const
 
TPoint3D< int > const Get_Point (char const *section, char const *entry, TPoint3D< int > const &defvalue) const
 
TPoint2D< int > const Get_Point (char const *section, char const *entry, TPoint2D< int > const &defvalue) const
 
TPoint3D< float > const Get_Point (char const *section, char const *entry, TPoint3D< float > const &defvalue) const
 
TPoint2D< float > const Get_Point (char const *section, char const *entry, TPoint2D< float > const &defvalue) const
 
bool Put_Bool (char const *section, char const *entry, bool value)
 
bool Put_Float (char const *section, char const *entry, float number)
 
bool Put_Double (char const *section, char const *entry, double number)
 
bool Put_Hex (char const *section, char const *entry, int number)
 
bool Put_Int (char const *section, char const *entry, int number, int format=0)
 
bool Put_PKey (PKey const &key)
 
bool Put_String (char const *section, char const *entry, char const *string)
 
bool Put_TextBlock (char const *section, char const *text)
 
bool Put_UUBlock (char const *section, void const *block, int len)
 
bool Put_UUBlock (char const *section, char const *entry, void const *block, int len)
 
bool Put_Rect (char const *section, char const *entry, TRect< int > const &value)
 
bool Put_Point (char const *section, char const *entry, TPoint3D< int > const &value)
 
bool Put_Point (char const *section, char const *entry, TPoint3D< float > const &value)
 
bool Put_Point (char const *section, char const *entry, TPoint2D< int > const &value)
 
bool Put_Wide_String (char const *section, char const *entry, wchar_t const *string)
 
List< INISection * > & Get_Section_List ()
 
IndexClass< int, INISection * > & Get_Section_Index ()
 
INISectionFind_Section (char const *section) const
 
INIEntryFind_Entry (char const *section, char const *entry) const
 
void DuplicateCRCError (const char *message, const char *section, const char *entry)
 

Static Public Member Functions

static void Keep_Blank_Entries (bool keep_blanks)
 
static void Strip_Comments (char *buffer)
 
static int CRC (const char *string)
 

Static Public Attributes

static const int MAX_LINE_LENGTH = 4096
 

Detailed Description

Definition at line 80 of file INI.H.

Constructor & Destructor Documentation

◆ INIClass() [1/3]

INIClass::INIClass ( void )

Definition at line 172 of file ini.cpp.

◆ INIClass() [2/3]

INIClass::INIClass ( FileClass & file)

Definition at line 191 of file ini.cpp.

◆ INIClass() [3/3]

INIClass::INIClass ( const char * filename)

Definition at line 213 of file ini.cpp.

◆ ~INIClass()

INIClass::~INIClass ( void )
virtual

Definition at line 241 of file ini.cpp.

Member Function Documentation

◆ Clear()

bool INIClass::Clear ( char const * section = NULL,
char const * entry = NULL )

Definition at line 270 of file ini.cpp.

◆ CRC()

int INIClass::CRC ( const char * string)
static

Definition at line 2331 of file ini.cpp.

◆ DuplicateCRCError()

void INIClass::DuplicateCRCError ( const char * message,
const char * section,
const char * entry )

Definition at line 2354 of file ini.cpp.

◆ Entry_Count()

int INIClass::Entry_Count ( char const * section) const

Definition at line 772 of file ini.cpp.

◆ Enumerate_Entries()

unsigned INIClass::Enumerate_Entries ( const char * section,
const char * entry_prefix,
unsigned startnumber = 0,
unsigned endnumber = (unsigned) -1 )

Definition at line 862 of file ini.cpp.

◆ Find_Entry()

INIEntry * INIClass::Find_Entry ( char const * section,
char const * entry ) const

Definition at line 800 of file ini.cpp.

◆ Find_Section()

INISection * INIClass::Find_Section ( char const * section) const

Definition at line 720 of file ini.cpp.

◆ Get_Alloc_Int_Array()

int * INIClass::Get_Alloc_Int_Array ( char const * section,
char const * entry,
int listend )

Definition at line 1855 of file ini.cpp.

◆ Get_Alloc_String()

char * INIClass::Get_Alloc_String ( char const * section,
char const * entry,
char const * defvalue ) const

Definition at line 1789 of file ini.cpp.

◆ Get_Bool()

bool INIClass::Get_Bool ( char const * section,
char const * entry,
bool defvalue = false ) const

Definition at line 1948 of file ini.cpp.

◆ Get_Double()

double INIClass::Get_Double ( char const * section,
char const * entry,
double defvalue = 0.0 ) const

Definition at line 1553 of file ini.cpp.

◆ Get_Entry()

char const * INIClass::Get_Entry ( char const * section,
int index ) const

Definition at line 828 of file ini.cpp.

◆ Get_Filename()

const char * INIClass::Get_Filename ( void ) const

Definition at line 319 of file ini.cpp.

◆ Get_Float()

float INIClass::Get_Float ( char const * section,
char const * entry,
float defvalue = 0.0f ) const

Definition at line 1486 of file ini.cpp.

◆ Get_Hex()

int INIClass::Get_Hex ( char const * section,
char const * entry,
int defvalue = 0 ) const

Definition at line 1452 of file ini.cpp.

◆ Get_Int()

int INIClass::Get_Int ( char const * section,
char const * entry,
int defvalue = 0 ) const

Definition at line 1315 of file ini.cpp.

◆ Get_Int_Bitfield()

int INIClass::Get_Int_Bitfield ( char const * section,
char const * entry,
int defvalue,
char * list[] )

Definition at line 1823 of file ini.cpp.

◆ Get_List_Index()

int INIClass::Get_List_Index ( char const * section,
char const * entry,
int const defvalue,
char * list[] )

Definition at line 1806 of file ini.cpp.

◆ Get_PKey()

PKey INIClass::Get_PKey ( bool fast) const

Definition at line 2264 of file ini.cpp.

◆ Get_Point() [1/4]

TPoint2D< float > const INIClass::Get_Point ( char const * section,
char const * entry,
TPoint2D< float > const & defvalue ) const

Definition at line 2172 of file ini.cpp.

◆ Get_Point() [2/4]

TPoint2D< int > const INIClass::Get_Point ( char const * section,
char const * entry,
TPoint2D< int > const & defvalue ) const

Definition at line 2020 of file ini.cpp.

◆ Get_Point() [3/4]

TPoint3D< float > const INIClass::Get_Point ( char const * section,
char const * entry,
TPoint3D< float > const & defvalue ) const

Definition at line 2140 of file ini.cpp.

◆ Get_Point() [4/4]

TPoint3D< int > const INIClass::Get_Point ( char const * section,
char const * entry,
TPoint3D< int > const & defvalue ) const

Definition at line 2080 of file ini.cpp.

◆ Get_Rect()

Rect const INIClass::Get_Rect ( char const * section,
char const * entry,
TRect< int > const & defvalue ) const

Definition at line 1389 of file ini.cpp.

◆ Get_Section_Index()

IndexClass< int, INISection * > & INIClass::Get_Section_Index ( )
inline

Definition at line 198 of file INI.H.

◆ Get_Section_List()

List< INISection * > & INIClass::Get_Section_List ( )
inline

Definition at line 196 of file INI.H.

◆ Get_String() [1/2]

int INIClass::Get_String ( char const * section,
char const * entry,
char const * defvalue,
char * buffer,
int size ) const

Definition at line 1700 of file ini.cpp.

◆ Get_String() [2/2]

const StringClass & INIClass::Get_String ( StringClass & new_string,
char const * section,
char const * entry,
char const * defvalue = "" ) const

Definition at line 1737 of file ini.cpp.

◆ Get_TextBlock()

int INIClass::Get_TextBlock ( char const * section,
char * buffer,
int len ) const

Definition at line 1213 of file ini.cpp.

◆ Get_UUBlock() [1/2]

int INIClass::Get_UUBlock ( char const * section,
char const * entry,
void * block,
int len ) const

Definition at line 1093 of file ini.cpp.

◆ Get_UUBlock() [2/2]

int INIClass::Get_UUBlock ( char const * section,
void * buffer,
int len ) const

Definition at line 953 of file ini.cpp.

◆ Get_Wide_String()

const WideStringClass & INIClass::Get_Wide_String ( WideStringClass & new_string,
char const * section,
char const * entry,
wchar_t const * defvalue = L"" ) const

Definition at line 996 of file ini.cpp.

◆ Is_Loaded()

bool INIClass::Is_Loaded ( void ) const

Definition at line 141 of file ini.cpp.

◆ Is_Present()

bool INIClass::Is_Present ( char const * section,
char const * entry = NULL ) const
inline

Definition at line 121 of file INI.H.

◆ Keep_Blank_Entries()

void INIClass::Keep_Blank_Entries ( bool keep_blanks)
static

Definition at line 2371 of file ini.cpp.

◆ Load() [1/3]

int INIClass::Load ( const char * filename)

Definition at line 363 of file ini.cpp.

◆ Load() [2/3]

int INIClass::Load ( FileClass & file)

Definition at line 339 of file ini.cpp.

◆ Load() [3/3]

int INIClass::Load ( Straw & file)

Definition at line 393 of file ini.cpp.

◆ Put_Bool()

bool INIClass::Put_Bool ( char const * section,
char const * entry,
bool value )

Definition at line 1915 of file ini.cpp.

◆ Put_Double()

bool INIClass::Put_Double ( char const * section,
char const * entry,
double number )

Definition at line 1592 of file ini.cpp.

◆ Put_Float()

bool INIClass::Put_Float ( char const * section,
char const * entry,
float number )

Definition at line 1525 of file ini.cpp.

◆ Put_Hex()

bool INIClass::Put_Hex ( char const * section,
char const * entry,
int number )

Definition at line 1422 of file ini.cpp.

◆ Put_Int()

bool INIClass::Put_Int ( char const * section,
char const * entry,
int number,
int format = 0 )

Definition at line 1272 of file ini.cpp.

◆ Put_PKey()

bool INIClass::Put_PKey ( PKey const & key)

Definition at line 2235 of file ini.cpp.

◆ Put_Point() [1/3]

bool INIClass::Put_Point ( char const * section,
char const * entry,
TPoint2D< int > const & value )

Definition at line 1992 of file ini.cpp.

◆ Put_Point() [2/3]

bool INIClass::Put_Point ( char const * section,
char const * entry,
TPoint3D< float > const & value )

Definition at line 2111 of file ini.cpp.

◆ Put_Point() [3/3]

bool INIClass::Put_Point ( char const * section,
char const * entry,
TPoint3D< int > const & value )

Definition at line 2051 of file ini.cpp.

◆ Put_Rect()

bool INIClass::Put_Rect ( char const * section,
char const * entry,
TRect< int > const & value )

Definition at line 1359 of file ini.cpp.

◆ Put_String()

bool INIClass::Put_String ( char const * section,
char const * entry,
char const * string )

Definition at line 1623 of file ini.cpp.

◆ Put_TextBlock()

bool INIClass::Put_TextBlock ( char const * section,
char const * text )

Definition at line 1141 of file ini.cpp.

◆ Put_UUBlock() [1/2]

bool INIClass::Put_UUBlock ( char const * section,
char const * entry,
void const * block,
int len )

Definition at line 1071 of file ini.cpp.

◆ Put_UUBlock() [2/2]

bool INIClass::Put_UUBlock ( char const * section,
void const * block,
int len )

Definition at line 901 of file ini.cpp.

◆ Put_Wide_String()

bool INIClass::Put_Wide_String ( char const * section,
char const * entry,
wchar_t const * string )

Definition at line 1035 of file ini.cpp.

◆ Save() [1/3]

int INIClass::Save ( const char * filename) const

Definition at line 621 of file ini.cpp.

◆ Save() [2/3]

int INIClass::Save ( FileClass & file) const

Definition at line 597 of file ini.cpp.

◆ Save() [3/3]

int INIClass::Save ( Pipe & file) const

Definition at line 653 of file ini.cpp.

◆ Section_Count()

int INIClass::Section_Count ( void ) const

Definition at line 750 of file ini.cpp.

◆ Section_Present()

bool INIClass::Section_Present ( char const * section) const
inline

Definition at line 128 of file INI.H.

◆ Size()

int INIClass::Size ( void ) const

◆ Strip_Comments()

void INIClass::Strip_Comments ( char * buffer)
static

Definition at line 2304 of file ini.cpp.

Member Data Documentation

◆ MAX_LINE_LENGTH

const int INIClass::MAX_LINE_LENGTH = 4096
static

Definition at line 191 of file INI.H.


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