diff options
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; \ } |