summaryrefslogtreecommitdiff
path: root/src/miav_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/miav_config.h')
-rw-r--r--src/miav_config.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/miav_config.h b/src/miav_config.h
index 1ca6e04..45eab0c 100644
--- a/src/miav_config.h
+++ b/src/miav_config.h
@@ -30,6 +30,8 @@
#include <string>
using namespace std;
+#include "error.h"
+
typedef struct __cfg {
string *name;
bool boolval;
@@ -41,7 +43,7 @@ typedef struct __cfg {
class MiavConfig {
public:
- MiavConfig(char *file);
+ MiavConfig(char *file, Error* err = NULL);
~MiavConfig();
int readInt(char *node);
@@ -50,9 +52,13 @@ public:
float readFloat(char *node);
private:
+ string emptyString;
+ Error* error;
+ string filename;
_cfg *addConfig(_cfg *parent, char* conf);
int parse(char* conf);
char *strip(char* conf);
+ _cfg *parseError(char* msg, char* line);
_cfg *findNode(char* node);
_cfg *configs;
};