diff gen/configfile.h @ 1103:b30fe7e1dbb9

- Updated to DMD frontend 1.041. - Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Thu, 12 Mar 2009 20:37:27 +0100
parents
children 7d3b47852a7a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gen/configfile.h	Thu Mar 12 20:37:27 2009 +0100
@@ -0,0 +1,32 @@
+#ifndef LDC_CONF_CONFIGFILE_H
+#define LDC_CONF_CONFIGFILE_H
+
+#include <vector>
+
+namespace libconfig
+{
+    class Config;
+}
+
+class ConfigFile
+{
+public:
+    typedef std::vector<const char*>    s_vector;
+    typedef s_vector::iterator          s_iterator;
+
+public:
+    ConfigFile();
+    ~ConfigFile();
+
+    bool read(const char* argv0, void* mainAddr, const char* filename);
+
+    s_iterator switches_begin()   { return switches.begin(); }
+    s_iterator switches_end()     { return switches.end(); }
+
+private:
+    libconfig::Config* cfg;
+
+    s_vector switches;
+};
+
+#endif // LDC_CONF_CONFIGFILE_H