diff --git a/alib2data/src/FromXMLParser.hpp b/alib2data/src/FromXMLParser.hpp index 0e6d22260ecab005ed534c2fe69e44a0221e83f1..4533e52bf1b6175ba448f8c265efed19dc03e4e8 100644 --- a/alib2data/src/FromXMLParser.hpp +++ b/alib2data/src/FromXMLParser.hpp @@ -13,6 +13,9 @@ #include <set> #include "sax/Token.h" +#include "exception/AlibException.h" +#include "exception/ExceptionFeatures.h" + namespace alib { /** @@ -26,14 +29,6 @@ class FromXMLParser : public sax::FromXMLParserHelper { public: virtual bool first(std::list<sax::Token>& input) const = 0; - /** - * Parses the XML tokens and returns symbol. The input is destroyed in the process. - * @param input XML tokens represented as list of tokens - * @return Symbol* the parsed symbol or NULL when by first token it is not a symbol - * @throws ParserException when tokens do not represent Symbol but first token seemd as a symbol - */ - T* parsePointer(std::list<sax::Token>& input) const; - /** * Parses the XML tokens and returns symbol. The input is destroyed in the process. * @param input XML tokens represented as list of tokens @@ -46,22 +41,6 @@ public: void tryParseAndThrowException(std::list<sax::Token>& input); -} /* namespace alib */ - -#include "exception/AlibException.h" -#include "exception/ExceptionFeatures.h" - -namespace alib { - -template<class T, class F> -T* FromXMLParser<T, F>::parsePointer(std::list<sax::Token>& input) const { - if(first(input)) { - return new T(parse(input)); - } else { - return NULL; - } -} - template<class T, class F> T FromXMLParser<T, F>::parseValue(std::list<sax::Token>& input) const { tryParseAndThrowException(input);