In file include/csutil/inifile.h:

typedef struct

Structure to describe a single token

char CommentChar
One of '#' or ';' (used in Save ())
csIniFile(Archive *ar, const char *fName, char iCommentChar = ';')
Initialize INI file object and load it from archive
csIniFile(const char *fName, char iCommentChar = ';')
Initialize INI file object and load it from file
csIniFile(char iCommentChar = ';')
Initialize INI file object
bool Delete(const char *SectionPath, const char *KeyName)
Delete an entry
bool Dirty
Is object content syncronised to disk?
bool EnumComments(const char *SectionPath, const char *KeyName, bool (*iterator) (csSome Parm, char *Text), csSome Parm)
Enumerate comments bound to a entry; KeyName can be NULL
bool EnumData(const char *SectionPath, bool (*iterator) (csSome Parm, char *Name, size_t DataSize, csSome Data), csSome Parm)
Enumerate data entries: call iterator for each data entry
bool EnumSections(const char *SectionPath, bool (*iterator) (csSome Parm, char *Name), csSome Parm)
Enumerate sections in INI file: call iterator for each section
virtual bool Error(int LineNo, const char *Line, int Pos)
Override to type your own error messages
PrvINIbranch* FindNode(const char *SectionPath)
Find node by given path
bool GetData(const char *SectionPath, const char *KeyName, csSome &Data, size_t &DataSize)
Get data indexed by section name and key name
float GetFloat(const char *SectionPath, const char *KeyName, float def = 0.0)
Get a real value from the configuration instance.
int GetInt(const char *SectionPath, const char *KeyName, int def = 0)
Get an integer value from the configuration instance.
char* GetStr(const char *SectionPath, const char *KeyName, char *def = "")
Get a string value from the configuration instance.
bool GetYesNo(const char *SectionPath, const char *KeyName, bool def = false)
Get a boolean value from the configuration instance.
bool KeyExists(const char *SectionPath, const char *KeyName)
Query if a specific key exists
bool Load(bool (*ReadLine) (csSome Stream, void *data, size_t size), csSome Stream)
Load a file given a "read from stream" routine
bool Load(const char *Data, size_t DataSize)
Load INI from memory buffer
bool Load(const char *fName)
Load INI from file
class PrvINIbranch: public csVector
Private class
PrvINIbranch Root
The root of INI file
bool Save(const char *fName)
Save INI file
static bool SaveEnumComments(csSome struc, char *Text)
Iterator used in Save ()
static bool SaveEnumData(csSome struc, char *Name, size_t DataSize, csSome Data)
Iterator used in Save ()
static bool SaveEnumSec(csSome struc, char *Name)
Iterator used in Save ()
bool SectionExists(const char *SectionPath)
Query if a specific section exists
bool SetComment(const char *SectionPath, const char *KeyName, const char *Text)
Set comment for given section/entry
bool SetData(const char *SectionPath, const char *KeyName, csConstSome Data, size_t DataSize)
Set data: if DataSize is 0 or Data is NULL, delete entry
bool SetStr(const char *SectionPath, const char *KeyName, const char *Value)
Set an asciiz value (shortcut for SetData)
virtual ~csIniFile()
Destroy the object

Documentation

Structure to describe a single token
class PrvINIbranch: public csVector
Private class

PrvINIbranch Root
The root of INI file

char CommentChar
One of '#' or ';' (used in Save ())

bool Dirty
Is object content syncronised to disk?

csIniFile(char iCommentChar = ';')
Initialize INI file object

csIniFile(const char *fName, char iCommentChar = ';')
Initialize INI file object and load it from file

csIniFile(Archive *ar, const char *fName, char iCommentChar = ';')
Initialize INI file object and load it from archive

virtual ~csIniFile()
Destroy the object

bool Load(const char *fName)
Load INI from file

bool Load(const char *Data, size_t DataSize)
Load INI from memory buffer

virtual bool Error(int LineNo, const char *Line, int Pos)
Override to type your own error messages

bool Save(const char *fName)
Save INI file

bool EnumSections(const char *SectionPath, bool (*iterator) (csSome Parm, char *Name), csSome Parm)
Enumerate sections in INI file: call iterator for each section

bool EnumData(const char *SectionPath, bool (*iterator) (csSome Parm, char *Name, size_t DataSize, csSome Data), csSome Parm)
Enumerate data entries: call iterator for each data entry

bool EnumComments(const char *SectionPath, const char *KeyName, bool (*iterator) (csSome Parm, char *Text), csSome Parm)
Enumerate comments bound to a entry; KeyName can be NULL

bool SectionExists(const char *SectionPath)
Query if a specific section exists

bool KeyExists(const char *SectionPath, const char *KeyName)
Query if a specific key exists

bool GetData(const char *SectionPath, const char *KeyName, csSome &Data, size_t &DataSize)
Get data indexed by section name and key name

int GetInt(const char *SectionPath, const char *KeyName, int def = 0)
Get an integer value from the configuration instance.

float GetFloat(const char *SectionPath, const char *KeyName, float def = 0.0)
Get a real value from the configuration instance.

char* GetStr(const char *SectionPath, const char *KeyName, char *def = "")
Get a string value from the configuration instance.

bool GetYesNo(const char *SectionPath, const char *KeyName, bool def = false)
Get a boolean value from the configuration instance.

bool SetData(const char *SectionPath, const char *KeyName, csConstSome Data, size_t DataSize)
Set data: if DataSize is 0 or Data is NULL, delete entry

bool SetStr(const char *SectionPath, const char *KeyName, const char *Value)
Set an asciiz value (shortcut for SetData)

bool SetComment(const char *SectionPath, const char *KeyName, const char *Text)
Set comment for given section/entry

bool Delete(const char *SectionPath, const char *KeyName)
Delete an entry

bool Load(bool (*ReadLine) (csSome Stream, void *data, size_t size), csSome Stream)
Load a file given a "read from stream" routine

PrvINIbranch* FindNode(const char *SectionPath)
Find node by given path

static bool SaveEnumComments(csSome struc, char *Text)
Iterator used in Save ()

static bool SaveEnumData(csSome struc, char *Name, size_t DataSize, csSome Data)
Iterator used in Save ()

static bool SaveEnumSec(csSome struc, char *Name)
Iterator used in Save ()

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de