summaryrefslogtreecommitdiff
path: root/src/configfile.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 08:30:24 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 08:30:24 +0200
commit6e3b53cd1b0fc6dcd721fac3beb699cb722e1e23 (patch)
tree567ca7e5d3e4df0ccda74768967f5f8434a19666 /src/configfile.h
parentd7e31edc42e075567059c2ddcda6bb19b4c7bd69 (diff)
Add error handling in ConfigFile parser.
Diffstat (limited to 'src/configfile.h')
-rw-r--r--src/configfile.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/configfile.h b/src/configfile.h
index a3fd588..a6c50bd 100644
--- a/src/configfile.h
+++ b/src/configfile.h
@@ -36,8 +36,8 @@ public:
ConfigFile(std::string filename);
virtual ~ConfigFile();
- virtual void load();
- virtual void save();
+ virtual bool load();
+ virtual bool save();
virtual std::string getValue(const std::string& key);
virtual void setValue(const std::string& key, const std::string& value);
@@ -49,6 +49,7 @@ protected:
virtual bool open(std::string mode);
void close();
std::string readLine();
+ bool parseLine(const std::string& line);
FILE* fp;
};