From 177cea995d02fd14dd82fa010957ebfbc1c5e760 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 17 Jul 2009 13:02:45 +0000 Subject: More work on the macrotool. Now fieldnames can be added and deleted, and a filehandler is able to add new macros assuring no conflicts in macro names/version/filenames happen. Error messages in MacroParser has been made more elaborate. --- server/src/macroparser.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'server/src/macroparser.h') diff --git a/server/src/macroparser.h b/server/src/macroparser.h index 843cb55..3867ca1 100644 --- a/server/src/macroparser.h +++ b/server/src/macroparser.h @@ -45,7 +45,7 @@ class MacroParser : public SAXParser { } ParserState; public: - MacroParser(std::string course); + MacroParser(std::string macro, bool abspath = false); ~MacroParser(); void characterData(std::string &data); @@ -53,6 +53,12 @@ public: void endTag(std::string name); void parseError(char *buf, size_t len, std::string error, int lineno); + /** + * Get a pointer to the parsed macro. + * NOTE: The allocated memory for the macro is owned by the parser, and will be + * freed upon parser deletion. + * @return A pointer to the macro or NULL on error. + */ Macro *getMacro(); protected: -- cgit v1.2.3