Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

peon::IniConfigReader Class Reference

This object is usefull for loading and storing any information we might need for our game contained in an .INI file. More...

#include <IniConfigReader.h>

List of all members.

Public Member Functions

 IniConfigReader (const String &strFile)
 Constructor.
 ~IniConfigReader ()
 Destructor.
DWORD getString (const String sSection, const String sKey, const String sDefault, String &sReturn)
 This method is responsible for grabbing any string data from our ini file.
UINT getInt (String sSection, String sKeyName, int)
 This method is just responsible for grabbing the UINT value from our ini file.
bool getBool (const String sSection, const String sKeyName, const String sDefault)
 This method is responsible for grabbing any boolean information stored in our ini file.
float getFloat (String sSection, String sKeyName, String sDefault)
 This method is responsible for grabbing any float information stored in our INI file.

Protected Attributes

String m_strFileName
 our ini filename


Detailed Description

This object is usefull for loading and storing any information we might need for our game contained in an .INI file.

We can store anything from our wanted renderer, to our application window size, to even some basic scripting elements.

Note that this object is completely Win32-specific. It is using the GetPrivateProfile* family of API functions which I think are only available on Windows.


Constructor & Destructor Documentation

peon::IniConfigReader::IniConfigReader const String &  strFile  ) 
 

Constructor.

Parameters:
String - path to ini file


Member Function Documentation

bool peon::IniConfigReader::getBool const String  sSection,
const String  sKeyName,
const String  sDefault
 

This method is responsible for grabbing any boolean information stored in our ini file.

Parameters:
String - section name
String - key name
String - default key value "TRUE" or "FALSE"
Returns:
bool - our actual key value

float peon::IniConfigReader::getFloat String  sSection,
String  sKeyName,
String  sDefault
 

This method is responsible for grabbing any float information stored in our INI file.

Parameters:
String sSection - section name
String sKeyName - key name
String sDefault - default value of float (ie. "1.0f")
Returns:
float - our determined float value

UINT peon::IniConfigReader::getInt String  sSection,
String  sKeyName,
int 
 

This method is just responsible for grabbing the UINT value from our ini file.

Parameters:
String - section name
String - key name
int - default key value
Returns:
UINT - our returned key value

DWORD peon::IniConfigReader::getString const String  sSection,
const String  sKey,
const String  sDefault,
String &  sReturn
 

This method is responsible for grabbing any string data from our ini file.

Parameters:
String - our ini section
String - our key name
String - our default key value
String& - a string object to contain our resulting data
Returns:
DWORD - the size of our data string


The documentation for this class was generated from the following file:
Generated on Thu Dec 1 01:55:41 2005 for Peon by  doxygen 1.4.1