diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-05-06 18:26:24 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-05-07 11:02:46 +0900 |
| commit | 014e4b95648f2b8e7deb57acb0cdd8cefc363477 (patch) | |
| tree | 02ced501daff512fed5126427f57eca6c2ef3630 /src/xml_to_data/xml_to_data.h | |
| parent | f2e2d9a5271aa9cfd966592d50f60d5b5bf550f4 (diff) | |
| download | piklab-014e4b95.tar.gz piklab-014e4b95.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 <michele.calgaro@yahoo.it>
(cherry picked from commit ac3f0014232619edc41865f6e42e6510bdd8acc6)
Diffstat (limited to 'src/xml_to_data/xml_to_data.h')
| -rw-r--r-- | src/xml_to_data/xml_to_data.h | 16 |
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; \ } |
