diff options
Diffstat (limited to 'cpp/src/IceXML/Parser.cpp')
-rw-r--r-- | cpp/src/IceXML/Parser.cpp | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/cpp/src/IceXML/Parser.cpp b/cpp/src/IceXML/Parser.cpp index 0097ed0a352..60eb73e3c58 100644 --- a/cpp/src/IceXML/Parser.cpp +++ b/cpp/src/IceXML/Parser.cpp @@ -28,16 +28,14 @@ IceXML::ParserException::ParserException(const char* file, int line, const strin { } -IceXML::ParserException::~ParserException() throw() +IceXML::ParserException::~ParserException() ICE_NOEXCEPT { } -const char* IceXML::ParserException::_name = "IceXML::ParserException"; - string -IceXML::ParserException::ice_name() const +IceXML::ParserException::ice_id() const { - return _name; + return "::IceXML::ParserException"; } void @@ -54,11 +52,13 @@ IceXML::ParserException::ice_print(std::ostream& out) const } } +#ifndef ICE_CPP11_MAPPING IceXML::ParserException* IceXML::ParserException::ice_clone() const { return new ParserException(*this); } +#endif void IceXML::ParserException::ice_throw() const @@ -126,6 +126,12 @@ IceXML::Node::addChild(const NodePtr&) return false; } +void +IceXML::Node::destroy() +{ + _parent = 0; +} + int IceXML::Node::getLine() const { @@ -181,6 +187,16 @@ IceXML::Element::addChild(const NodePtr& child) return true; } +void +IceXML::Element::destroy() +{ + Node::destroy(); + for(NodeList::iterator p = _children.begin(); p != _children.end(); ++p) + { + (*p)->destroy(); + } +} + // // Text // @@ -218,6 +234,16 @@ IceXML::Document::addChild(const NodePtr& child) return true; } +void +IceXML::Document::destroy() +{ + Node::destroy(); + for(NodeList::iterator p = _children.begin(); p != _children.end(); ++p) + { + (*p)->destroy(); + } +} + // // Handler // @@ -242,6 +268,7 @@ namespace IceXML class DocumentBuilder : public Handler { public: + DocumentBuilder(); virtual void startElement(const string&, const Attributes&, int, int); @@ -251,6 +278,7 @@ public: DocumentPtr getDocument() const; private: + list<NodePtr> _nodeStack; DocumentPtr _document; }; |