8 typedef unsigned long long int UIntT
;
9 typedef signed long long int SIntT
;
10 typedef long double FloatT
;
11 typedef const char *StringT
;
13 class OptionsFile
: private fstream
{
14 OptionsFile(const OptionsFile
&);
15 OptionsFile
&operator=(const OptionsFile
&);
18 OptionsFile(const char *file
, bool load
= true, bool saveOnDel
= false);
23 inline bool IsSaved() const;
28 void SetUInt(const char *sect
, const char *key
, UIntT val
);
29 void SetUIntHex(const char *sect
, const char *key
, UIntT val
);
30 void SetSInt(const char *sect
, const char *key
, SIntT val
);
31 void SetFloat(const char *sect
, const char *key
, FloatT val
);
32 void SetString(const char *sect
, const char *key
, StringT ptr
);
34 UIntT
GetUInt(const char *sect
, const char *key
) const;
35 SIntT
GetSInt(const char *sect
, const char *key
) const;
36 FloatT
GetFloat(const char *sect
, const char *key
) const;
37 StringT
GetString(const char *sect
, const char *key
) const;
39 void Unset(const char *sect
, const char *key
);
40 bool Has(const char *sect
, const char *key
) const { return (GetString(sect
, key
) != NULL
); }
44 StrList(const StrList
&);
45 StrList
&operator=(const StrList
&);
54 void Set(const char *key
, const char *val
);
55 char *Get(const char *key
) const;
56 void Unset(const char *key
);
59 int PollNext(char **, char **);
69 bool autoSave
, isSaved
;
71 void Set(const char *sect
, const char *key
, const char *val
);
72 char *Get(const char *sect
, const char *key
) const;
73 char *CreateKeyword(const char *sect
, const char *key
) const;
74 void SeparateKeyword(const char *keyword
, char **sect
, char **key
) const;
75 int NextSignificant();
76 void AddChar(char *, char, size_t);
77 void ParseString(char *, size_t);
80 bool OptionsFile::IsSaved() const {
84 #endif // OPTIONSFILE_H