summaryrefslogtreecommitdiff
path: root/server/src/macro_parser.h
diff options
context:
space:
mode:
authordeva <deva>2008-03-26 13:04:30 +0000
committerdeva <deva>2008-03-26 13:04:30 +0000
commit6e76c4540e37280d0c161e7d7035e2e9022b18ce (patch)
tree97dffd6ddc732890c97ca41c7149cb1ac1afac6e /server/src/macro_parser.h
parentfdb7aadb054f233401a9f3dd882b79ac5ccd5191 (diff)
Implemented a SAXPaser class, and made the macro and xml parsers use it.
Diffstat (limited to 'server/src/macro_parser.h')
-rw-r--r--server/src/macro_parser.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/server/src/macro_parser.h b/server/src/macro_parser.h
index 9f701d4..248e586 100644
--- a/server/src/macro_parser.h
+++ b/server/src/macro_parser.h
@@ -29,8 +29,26 @@
#include <string>
+#include "sax_parser.h"
#include "macro.h"
-void parse_macro(std::string name, Macro &macro);
+class MacroParser : public SAXParser {
+public:
+ MacroParser(std::string name, Macro &macro);
+ ~MacroParser();
+
+ void startTag(std::string name, std::map< std::string, std::string> attributes);
+ void endTag(std::string name);
+
+protected:
+ int readData(char *data, size_t size);
+
+private:
+ Macro *macro;
+ std::vector< Widget* > stack;
+ bool done;
+
+ int fd;
+};
#endif/*__PRACRO_MACRO_PARSER_H__*/