50 void used(FXival u){ ((FXival*)table)[-2]=u; }
53 void free(FXival f){ ((FXival*)table)[-3]=f; }
56 FXbool resize(FXival n);
63 FXSettings(
const FXSettings& other);
66 FXival
no()
const {
return ((FXival*)table)[-1]; }
69 FXival
used()
const {
return ((FXival*)table)[-2]; }
72 FXival
free()
const {
return ((FXival*)table)[-3]; }
75 FXbool
empty()
const {
return ((FXival*)table)[-1]<=1; }
90 FXbool parseFile(
const FXString& filename,FXbool mrk=
true);
93 FXbool unparseFile(
const FXString& filename);
96 FXbool parse(
const FXString&
string,FXbool mrk=
true);
99 FXbool unparse(
FXString&
string)
const;
102 FXival find(
const FXchar* ky)
const;
108 FXbool
has(
const FXchar* ky)
const {
return 0<=find(ky); }
138 FXbool
empty(FXival pos)
const {
return table[pos].key.
empty(); }
150 FXint readFormatEntry(
const FXchar* section,
const FXchar* name,
const FXchar* fmt,...) const FX_SCANF(4,5) ;
151 FXint readFormatEntry(const
FXString& section,const FXchar* name,const FXchar* fmt,...) const FX_SCANF(4,5) ;
152 FXint readFormatEntry(const
FXString& section,const
FXString& name,const FXchar* fmt,...) const FX_SCANF(4,5) ;
155 FXint writeFormatEntry(const FXchar* section,const FXchar* name,const FXchar* fmt,...) FX_PRINTF(4,5) ;
156 FXint writeFormatEntry(const
FXString& section,const FXchar* name,const FXchar* fmt,...) FX_PRINTF(4,5) ;
157 FXint writeFormatEntry(const
FXString& section,const
FXString& name,const FXchar* fmt,...) FX_PRINTF(4,5) ;
160 const FXchar* readStringEntry(const FXchar* section,const FXchar* name,const FXchar* def=
nullptr) const;
161 const FXchar* readStringEntry(const
FXString& section,const FXchar* name,const FXchar* def=
nullptr) const;
162 const FXchar* readStringEntry(const
FXString& section,const
FXString& name,const FXchar* def=
nullptr) const;
165 FXbool writeStringEntry(const FXchar* section,const FXchar* name,const FXchar* val);
166 FXbool writeStringEntry(const
FXString& section,const FXchar *name,const FXchar* val);
167 FXbool writeStringEntry(const
FXString& section,const
FXString& name,const FXchar* val);
170 FXint readIntEntry(const FXchar* section,const FXchar* name,FXint def=0) const;
171 FXint readIntEntry(const
FXString& section,const FXchar* name,FXint def=0) const;
172 FXint readIntEntry(const
FXString& section,const
FXString& name,FXint def=0) const;
175 FXbool writeIntEntry(const FXchar* section,const FXchar* name,FXint val);
176 FXbool writeIntEntry(const
FXString& section,const FXchar* name,FXint val);
177 FXbool writeIntEntry(const
FXString& section,const
FXString& name,FXint val);
180 FXuint readUIntEntry(const FXchar* section,const FXchar* name,FXuint def=0) const;
181 FXuint readUIntEntry(const
FXString& section,const FXchar* name,FXuint def=0) const;
182 FXuint readUIntEntry(const
FXString& section,const
FXString& name,FXuint def=0) const;
185 FXbool writeUIntEntry(const FXchar* section,const FXchar* name,FXuint val);
186 FXbool writeUIntEntry(const
FXString& section,const FXchar* name,FXuint val);
187 FXbool writeUIntEntry(const
FXString& section,const
FXString& name,FXuint val);
190 FXlong readLongEntry(const FXchar* section,const FXchar* name,FXlong def=0) const;
191 FXlong readLongEntry(const
FXString& section,const FXchar* name,FXlong def=0) const;
192 FXlong readLongEntry(const
FXString& section,const
FXString& name,FXlong def=0) const;
195 FXbool writeLongEntry(const FXchar* section,const FXchar* name,FXlong val);
196 FXbool writeLongEntry(const
FXString& section,const FXchar* name,FXlong val);
197 FXbool writeLongEntry(const
FXString& section,const
FXString& name,FXlong val);
200 FXulong readULongEntry(const FXchar* section,const FXchar* name,FXulong def=0) const;
201 FXulong readULongEntry(const
FXString& section,const FXchar* name,FXulong def=0) const;
202 FXulong readULongEntry(const
FXString& section,const
FXString& name,FXulong def=0) const;
205 FXbool writeULongEntry(const FXchar* section,const FXchar* name,FXulong val);
206 FXbool writeULongEntry(const
FXString& section,const FXchar* name,FXulong val);
207 FXbool writeULongEntry(const
FXString& section,const
FXString& name,FXulong val);
210 FXdouble readRealEntry(const FXchar* section,const FXchar* name,FXdouble def=0.0) const;
211 FXdouble readRealEntry(const
FXString& section,const FXchar* name,FXdouble def=0.0) const;
212 FXdouble readRealEntry(const
FXString& section,const
FXString& name,FXdouble def=0.0) const;
215 FXbool writeRealEntry(const FXchar* section,const FXchar* name,FXdouble val);
216 FXbool writeRealEntry(const
FXString& section,const FXchar* name,FXdouble val);
217 FXbool writeRealEntry(const
FXString& section,const
FXString& name,FXdouble val);
220 FXColor readColorEntry(const FXchar* section,const FXchar* name,FXColor def=0) const;
221 FXColor readColorEntry(const
FXString& section,const FXchar* name,FXColor def=0) const;
222 FXColor readColorEntry(const
FXString& section,const
FXString& name,FXColor def=0) const;
225 FXbool writeColorEntry(const FXchar* section,const FXchar* name,FXColor val);
226 FXbool writeColorEntry(const
FXString& section,const FXchar* name,FXColor val);
227 FXbool writeColorEntry(const
FXString& section,const
FXString& name,FXColor val);
230 FXbool readBoolEntry(const FXchar* section,const FXchar* name,FXbool def=false) const;
231 FXbool readBoolEntry(const
FXString& section,const FXchar* name,FXbool def=false) const;
232 FXbool readBoolEntry(const
FXString& section,const
FXString& name,FXbool def=false) const;
235 FXbool writeBoolEntry(const FXchar* section,const FXchar* name,FXbool val);
236 FXbool writeBoolEntry(const
FXString& section,const FXchar* name,FXbool val);
237 FXbool writeBoolEntry(const
FXString& section,const
FXString& name,FXbool val);
240 FXbool existingEntry(const FXchar* section,const FXchar* name) const;
241 FXbool existingEntry(const
FXString& section,const FXchar* name) const;
245 FXbool existingSection(const FXchar* section) const;
246 FXbool existingSection(const
FXString& section) const;
249 void deleteEntry(const FXchar* section,const FXchar* name);
250 void deleteEntry(const
FXString& section,const FXchar* name);
254 void deleteSection(const FXchar* section);
255 void deleteSection(const
FXString& section);
FXbool has(const FXchar *ky) const
Check if key is mapped.
Definition: FXSettings.h:108
FXival find(const FXString &ky) const
Find position of given key, returning -1 if not found.
Definition: FXSettings.h:105
FXStringDictionary & operator[](const FXString &ky)
Return reference to slot assocated with given key.
Definition: FXSettings.h:132
FXbool empty() const
See if map is empty.
Definition: FXSettings.h:75
const FXString & key(FXival pos) const
Return key at position pos.
Definition: FXSettings.h:141
void setModified(FXbool mdfy=true)
Mark as changed.
Definition: FXSettings.h:87
FXbool empty(FXival pos) const
Return true if slot is empty.
Definition: FXSettings.h:138
FXival no() const
Return the size of the table, including the empty slots.
Definition: FXSettings.h:66
FXbool has(const FXString &ky) const
Check if key is mapped.
Definition: FXSettings.h:111
FXchar * text()
Get text contents as pointer.
Definition: FXString.h:119
FXbool empty() const
See if string is empty.
Definition: FXString.h:125
FXival used() const
Return number of used slots in the table.
Definition: FXSettings.h:69
The Settings class manages a key-value database.
Definition: FXSettings.h:34
const FXStringDictionary & operator[](const FXchar *ky) const
Return constant reference to slot assocated with given key.
Definition: FXSettings.h:129
Definition: FX4Splitter.h:28
FXStringDictionary & operator[](const FXchar *ky)
Return reference to slot assocated with given key.
Definition: FXSettings.h:126
const FXStringDictionary & at(const FXString &ky) const
Return constant reference to slot assocated with given key.
Definition: FXSettings.h:123
FXStringDictionary & data(FXival pos)
Return reference to slot at position pos.
Definition: FXSettings.h:144
const FXStringDictionary & data(FXival pos) const
Return constant reference to slot at position pos.
Definition: FXSettings.h:147
const FXStringDictionary & operator[](const FXString &ky) const
Return constant reference to slot assocated with given key.
Definition: FXSettings.h:135
FXival free() const
Return number of free slots in the table.
Definition: FXSettings.h:72
FXStringDictionary & at(const FXString &ky)
Return reference to slot assocated with given key.
Definition: FXSettings.h:120
FXbool isModified() const
Is it modified.
Definition: FXSettings.h:84
The dictionary class maintains a fast-access hash table of entities indexed by a character string...
Definition: FXStringDictionary.h:31
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42
Definition: FXSettings.h:36