Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

CIniFile Class Reference

#include <Ini.h>

List of all members.

Public Member Functions

 CIniFile (void)
 CIniFile (const char *iniFilename)
 ~CIniFile (void)
int Load (const char *iniFilename)
int Merge (const char *iniFilename)
int Save (const char *iniFilename)
void Set (const char *section, const char *key, float f)
void Set (const char *section, const char *key, int i)
void Set (const char *section, const char *key, const char *s)
void Get (const char *section, const char *key, float *f)
void Get (const char *section, const char *key, int *i)
void Get (const char *section, const char *key, char *s, int maxLength)
void Remove (const char *section, const char *key)
int GetNumSections (void)
char * GetSectionName (int i)

Protected Member Functions

CIniSectionFindSection (const char *sectname)
void Clear (void)

Protected Attributes

std::map< std::string, CIniSection * > section


Detailed Description

Definition at line 105 of file Ini.h.


Constructor & Destructor Documentation

CIniFile::CIniFile void   ) 
 

Definition at line 302 of file Ini.cpp.

CIniFile::CIniFile const char *  iniFilename  ) 
 

Definition at line 307 of file Ini.cpp.

References Load().

CIniFile::~CIniFile void   ) 
 

Definition at line 313 of file Ini.cpp.

References Clear().


Member Function Documentation

void CIniFile::Clear void   )  [protected]
 

Definition at line 322 of file Ini.cpp.

References section.

Referenced by Load(), and ~CIniFile().

CIniSection * CIniFile::FindSection const char *  sectname  )  [protected]
 

Definition at line 341 of file Ini.cpp.

References gtfo, and section.

Referenced by Get(), Remove(), and Set().

void CIniFile::Get const char *  section,
const char *  key,
char *  s,
int  maxLength
 

Definition at line 614 of file Ini.cpp.

References FindSection(), and CIniSection::Get().

void CIniFile::Get const char *  section,
const char *  key,
int *  i
 

Definition at line 600 of file Ini.cpp.

References FindSection(), and CIniSection::Get().

void CIniFile::Get const char *  section,
const char *  key,
float *  f
 

Definition at line 586 of file Ini.cpp.

References FindSection(), and CIniSection::Get().

Referenced by GetIniFloat(), GetIniString(), GetIniVar(), and InitPerezParameters().

int CIniFile::GetNumSections void   ) 
 

Definition at line 638 of file Ini.cpp.

References section.

Referenced by CSkyDomeImage::CSkyDomeImage().

char * CIniFile::GetSectionName int  i  ) 
 

Todo:
This should be restructured as GetFirst/GetNext to align better with STL map<> implementation rather than flat array implementation

Definition at line 647 of file Ini.cpp.

References CIniSection::section, and section.

Referenced by CSkyDomeImage::CSkyDomeImage().

int CIniFile::Load const char *  iniFilename  ) 
 

Definition at line 454 of file Ini.cpp.

References Clear(), ParseKeyValue(), ParseSection(), section, and Set().

Referenced by CIniFile(), CSkyDomeImage::CSkyDomeImage(), and LoadIniSettings().

int CIniFile::Merge const char *  iniFilename  ) 
 

Definition at line 506 of file Ini.cpp.

void CIniFile::Remove const char *  section,
const char *  key
 

Definition at line 628 of file Ini.cpp.

References FindSection(), and CIniSection::Remove().

int CIniFile::Save const char *  iniFilename  ) 
 

Definition at line 517 of file Ini.cpp.

References globals, SGlobals::logWarning, section, and CLogFile::Write().

Referenced by SaveIniSettings().

void CIniFile::Set const char *  section,
const char *  key,
const char *  s
 

Definition at line 572 of file Ini.cpp.

References FindSection(), and CIniSection::Set().

void CIniFile::Set const char *  section,
const char *  key,
int  i
 

Definition at line 558 of file Ini.cpp.

References FindSection(), and CIniSection::Set().

void CIniFile::Set const char *  section,
const char *  key,
float  f
 

Definition at line 544 of file Ini.cpp.

References FindSection(), and CIniSection::Set().

Referenced by Load(), SetIniFloat(), SetIniString(), and SetIniVar().


Member Data Documentation

std::map<std::string,CIniSection*> CIniFile::section [protected]
 

Definition at line 132 of file Ini.h.

Referenced by Clear(), FindSection(), GetNumSections(), GetSectionName(), Load(), and Save().


The documentation for this class was generated from the following files:
SourceForge.net Logo Documentation generated by doxygen