class Ini : public IniFileAnalyser

Initialisation class

Inheritance:


Public Fields

KeyboardLanguage::Language language

Public Methods

Ini(const String& name) throw(Exception)
~Ini() throw()
bool isPresentSection(const String& s, int numero) throw()
const String* get(const String& s, int numero, const String& id, int idNumero=0) throw(Exception)
Throw Exception if not found
const String* getWithoutException(const String& s, int numero, const String& id, int idNumero=0) throw(Exception)
Returns 0 if not found
const String* getWithDefault(const String& s, int numero, const String& id, int idNumero, const String& stringDefault) throw(Exception)
Set the id to stringDefault value and returns it if not found
int getWithDefault(const String& s, int numero, const String& id, int idNumero, int intDefault) throw(Exception)
idem with int
int getWithDefault(const String& s, int numero, const String& id, int idNumero, int intDefault, bool& withStar) throw(Exception)
Sets withStar if star(*) found, used for more complicated int
void set(const String& s, int numero, const String& id, int idNumero, const String& val) throw(Exception)
void setWithMaximumNumber(const String& s, int numero, const String& id, const String& val) throw(Exception)
Add an id after all the identical ids
void setInAllSection(const String& s, const String& id, int idNumero, const String& val) throw(Exception)
List < const String* > * Ini::getListWithoutException(const String& s, int numero, const String& id) throw(Exception)
See getLis, but returns 0 if defaultSection not found, or list empty
Pixel getWithDefaultColor(const String& s, int numero, const String& id, int idNumero, Pixel pixelDefault) throw(Exception)
See getWithDefault, but with Pixel (list of 3 int - example : 120,252,0)
List < int > * getWithDefaultIntList(const String& s, int numero, const String& id, int idNumero, const String& intListDefault) throw(Exception)
Return an int list (form 12,2,0,5,1, etc)
char getListSeparator() const throw()
Usually ","

Protected Fields

List < SectionAssoc * > section
ValueString* currentValueString
const String* tmpId
List < ValueString * > * currentListValueString
bool continueValue
char listSeparator

Protected Methods

virtual void putSection(const String& s) throw(Exception)
virtual void putId(const String& s) throw(Exception)
virtual void putValue(const String& s) throw(Exception)
virtual void putComment(const String& s) throw(Exception)
virtual void initForSave() throw(Exception)
virtual const String* getSection() throw(Exception)
virtual bool isSectionUsed() throw()
virtual bool walkSection() throw(Exception)
virtual const String* getId() throw(Exception)
virtual bool isIdUsed() throw()
virtual bool walkId() throw(Exception)
virtual const String* getValue() throw(Exception)
virtual bool walkValue() throw(Exception)
virtual const String* getComment() throw(Exception)
const String* auxGet(const String& s, int numero, const String& id, int idNumero, bool ex) throw(Exception)

Inherited from IniFileAnalyser:

Public Methods

virtual void save() throw(Exception)
virtual void saveCleaned() throw(Exception)

Protected Fields

String nameFile
List < const String * > sectionList
List < const String * > list

Protected Methods

int getFirstNonBlank(const String& s) throw()
bool isSection(const String& s, bool inSection) throw()
bool isCloseSection(const String& s, bool inSection) throw()
bool isIdValue(const String& s, bool inSection) throw()
String* extractSection(const String& s) throw()
String* extractId(const String& s) throw()
String* extractValue(const String& s) throw()
String* supprStringLimiter(const String& s) throw()
String* completeStringLimiter(const String& s) throw()
void analyse() throw(Exception)

Documentation

Initialisation class. Used by a lot of classes. It reads a text file with structure [Section]= ... id:value Very useful to change the game without recompile it !!
List < SectionAssoc * > section

ValueString* currentValueString

const String* tmpId

List < ValueString * > * currentListValueString

bool continueValue

char listSeparator

virtual void putSection(const String& s) throw(Exception)

virtual void putId(const String& s) throw(Exception)

virtual void putValue(const String& s) throw(Exception)

virtual void putComment(const String& s) throw(Exception)

virtual void initForSave() throw(Exception)

virtual const String* getSection() throw(Exception)

virtual bool isSectionUsed() throw()

virtual bool walkSection() throw(Exception)

virtual const String* getId() throw(Exception)

virtual bool isIdUsed() throw()

virtual bool walkId() throw(Exception)

virtual const String* getValue() throw(Exception)

virtual bool walkValue() throw(Exception)

virtual const String* getComment() throw(Exception)

const String* auxGet(const String& s, int numero, const String& id, int idNumero, bool ex) throw(Exception)

KeyboardLanguage::Language language

Ini(const String& name) throw(Exception)

~Ini() throw()

bool isPresentSection(const String& s, int numero) throw()

const String* get(const String& s, int numero, const String& id, int idNumero=0) throw(Exception)
Throw Exception if not found

const String* getWithoutException(const String& s, int numero, const String& id, int idNumero=0) throw(Exception)
Returns 0 if not found

const String* getWithDefault(const String& s, int numero, const String& id, int idNumero, const String& stringDefault) throw(Exception)
Set the id to stringDefault value and returns it if not found

int getWithDefault(const String& s, int numero, const String& id, int idNumero, int intDefault) throw(Exception)
idem with int

int getWithDefault(const String& s, int numero, const String& id, int idNumero, int intDefault, bool& withStar) throw(Exception)
Sets withStar if star(*) found, used for more complicated int
See Also:
Grille

void set(const String& s, int numero, const String& id, int idNumero, const String& val) throw(Exception)

void setWithMaximumNumber(const String& s, int numero, const String& id, const String& val) throw(Exception)
Add an id after all the identical ids

void setInAllSection(const String& s, const String& id, int idNumero, const String& val) throw(Exception)

List < const String* > * Ini::getListWithoutException(const String& s, int numero, const String& id) throw(Exception)
See getLis, but returns 0 if defaultSection not found, or list empty

Pixel getWithDefaultColor(const String& s, int numero, const String& id, int idNumero, Pixel pixelDefault) throw(Exception)
See getWithDefault, but with Pixel (list of 3 int - example : 120,252,0)

List < int > * getWithDefaultIntList(const String& s, int numero, const String& id, int idNumero, const String& intListDefault) throw(Exception)
Return an int list (form 12,2,0,5,1, etc)

char getListSeparator() const throw()
Usually ","


This class has no child classes.
Author:
David FAUTHOUX

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