summaryrefslogtreecommitdiff
path: root/src/miav_config.h
diff options
context:
space:
mode:
authordeva <deva>2005-04-05 11:22:05 +0000
committerdeva <deva>2005-04-05 11:22:05 +0000
commit55a7afdedc7cee2df9012f600dd51aff92ad1af3 (patch)
treedb6568a6aab7cfdec0d0afcb9bd7566939a4a318 /src/miav_config.h
parent6f03a23e7876516d3ba011d23acf454138432654 (diff)
Added validity checking on the conf parser.
Added error object to conf parser. Cleaned up the configure.in script
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;
};