summaryrefslogtreecommitdiff
path: root/server/src/macro_parser.h
diff options
context:
space:
mode:
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__*/