diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-06 18:20:06 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-06 18:20:06 +0000 |
commit | d13118f006f0249577c5a829c2c22a33fe12d8ac (patch) | |
tree | d6ed21994e4433de06eedd6bb1bc1223d7d2ca1a /src/filesystem/inifile.h | |
parent | 094221dae7b094bf0d61128634a00d52b265b0d5 (diff) |
updated inifile API
Diffstat (limited to 'src/filesystem/inifile.h')
-rw-r--r-- | src/filesystem/inifile.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/filesystem/inifile.h b/src/filesystem/inifile.h index 3efcfc4..765f1af 100644 --- a/src/filesystem/inifile.h +++ b/src/filesystem/inifile.h @@ -52,13 +52,14 @@ public: /// true if the last read statement was a section header bool got_section() const; + /// true if the current section matches + bool in_section(const char *sectionlabel) const; + /// true if the last read statement was a certain section header bool got_section(const char * sectionlabel) const; /// true if the last read statement was a key=value pair - inline bool got_key() const { - return last_read_was_key; - } + bool got_key() const; bool got_key(const char * keylabel); @@ -80,6 +81,12 @@ public: return line_number; } + /// print a default unkown key error + void unkown_key() const; + + /// print a default unkown section error + void unknown_section() const; + /// return true of the ini file is open for reading inline bool is_open() { return inifile_ifs.is_open(); } |