summaryrefslogtreecommitdiffstats
path: root/src/xml_to_data/xml_to_data.h
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-05-06 18:26:24 +0900
committerMichele Calgaro <[email protected]>2024-05-06 22:36:50 +0900
commitac3f0014232619edc41865f6e42e6510bdd8acc6 (patch)
tree9f851f02238781fb9ffe7f76ac446d25e9c92668 /src/xml_to_data/xml_to_data.h
parent1c22ae157c39e2c1434e5ec43a05eda78dc86798 (diff)
downloadpiklab-ac3f0014232619edc41865f6e42e6510bdd8acc6.tar.gz
piklab-ac3f0014232619edc41865f6e42e6510bdd8acc6.zip
Allow generation of build time data files in out-of-source builds. Also fix generation of data file for devices/mem24 subfolder
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/xml_to_data/xml_to_data.h')
-rw-r--r--src/xml_to_data/xml_to_data.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/xml_to_data/xml_to_data.h b/src/xml_to_data/xml_to_data.h
index 1b45ea6..2d91640 100644
--- a/src/xml_to_data/xml_to_data.h
+++ b/src/xml_to_data/xml_to_data.h
@@ -10,13 +10,14 @@
#define XML_TO_DATA_H
#include "common/global/global.h"
-# include <tqdom.h>
+
+#include <tqdom.h>
#include <tqstringlist.h>
class XmlToData
{
public:
- XmlToData() {}
+ XmlToData(const TQString &folder) : xmlFolder(folder) {}
virtual ~XmlToData() {}
void process();
@@ -30,12 +31,19 @@ protected:
const TQString &attribute, const TQString &value) const;
void checkTagNames(TQDomElement element, const TQString &tag, const TQStringList &names) const;
TQDomDocument parseFile(const TQString &filename) const;
+
+ TQString xmlFolder;
};
#define XML_MAIN(_type) \
- int main(int, char **) \
+ int main(int argc, char **argv) \
{ \
- _type dx; \
+ TQString xmlFolder = TQString::null; \
+ if (argc > 1) \
+ { \
+ xmlFolder = argv[1]; \
+ } \
+ _type dx(xmlFolder); \
dx.process(); \
return 0; \
}