C API Documentation
Public Member Functions | Public Attributes | Protected Attributes | List of all members
rr::IniFile Class Reference

Public Member Functions

 IniFile (const string &fName="", bool autoLoad=false, bool autoSave=false)
 
size_t GetNumberOfSections ()
 
IniSectionGetSection (int i)
 
IniSectionGetSection (size_t i)
 
string GetFilePath ()
 
string GetFileName ()
 
string GetFullFileName ()
 
bool SetFilePath (const string &path)
 
bool Load (const string &fName="")
 
IniSectionLoadSection (const string &theSection)
 
bool Save (ios_base::openmode openMode=ios::out|ios::trunc)
 
bool UnLoad ()
 
bool WasItFound ()
 
bool SectionExists (const string &section)
 Boolean indicating if the last key was found in the ini file.
 
string ReadValue (const string &Key, const string &Section="")
 
string ReadString (const string &Key, const string &Section="", const string &def_val="")
 
double ReadDouble (const string &Key, const string &Section="", double def_value=0)
 
float ReadFloat (const string &Key, const string &Section="", double def_value=0)
 
int ReadInteger (const string &Key, const string &Section="", int def_value=0)
 
bool ReadBool (const string &Key, const string &Section="", bool def_value=false)
 
bool WriteValue (const string &Key, const string &Value, const string &Comment="", const string &Section="")
 
bool WriteFloat (const string &Key, double value, const string &Comment="", const string &Section="")
 
bool WriteInteger (const string &Key, int nValue, const string &Comment="", const string &Section="")
 
bool WriteBool (const string &Key, bool bValue, const string &Comment="", const string &Section="")
 
bool WriteString (const string &Key, const string &Value, const string &Comment="", const string &Section="")
 
bool WriteNonKey (const string &nonKey, const string &Section="")
 
bool SetKeyComment (const string &Key, const string &Comment, const string &Section="")
 
bool SetSectionComment (const string &Section, const string &Comment)
 
bool DeleteKey (const string &Key, const string &FromSection="")
 
bool DeleteSection (const string &Section)
 
bool DeleteSectionsWithKeyValue (const string &key, const string &value)
 
bool CreateKey (const string &Key, const string &Value, const string &Comment="", const string &Section="")
 
bool CreateSection (const string &Section, const string &Comment="")
 
bool CreateSection (const string &Section, const string &Comment, KeyList Keys)
 
size_t SectionCount ()
 
size_t KeyCount ()
 
size_t KeyCount (const string &section)
 
void Clear ()
 
void SetFileName (const string &fName)
 
string CommentStr (string &Comment)
 
IniKeyGetKey (const string &Key, const string &Section)
 
IniSectionGetSection (const string &Section, bool create=false)
 
IniSectionGetSection (const unsigned int secNr)
 
bool ClearSection (const string &section)
 
bool IsModified ()
 

Public Attributes

int mFlags
 

Protected Attributes

SectionList mSections
 
FileName mIniFileName
 
bool mIsDirty
 
bool mWasFound
 
bool mAutoSave
 

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