From e486e70da8c3c65294e27c18ad9cb0e4a5fe8aaf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 24 Sep 2013 18:52:59 +0100 Subject: [PATCH] Provide node pointer accessor. --- src/cxml.cc | 2 +- src/cxml.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cxml.cc b/src/cxml.cc index 95b963b..2ca46ed 100644 --- a/src/cxml.cc +++ b/src/cxml.cc @@ -15,7 +15,7 @@ cxml::Node::Node () } -cxml::Node::Node (xmlpp::Node const * node) +cxml::Node::Node (xmlpp::Node* node) : _node (node) { diff --git a/src/cxml.h b/src/cxml.h index 5bccfb0..2c4ff24 100644 --- a/src/cxml.h +++ b/src/cxml.h @@ -52,7 +52,7 @@ public: * not destroy the xmlpp::Node. * @param node xmlpp::Node. */ - Node (xmlpp::Node const * node); + Node (xmlpp::Node* node); std::string name () const; @@ -157,9 +157,13 @@ public: boost::shared_ptr optional_node_child (std::string) const; std::list > node_children (std::string) const; + + xmlpp::Node* node () const { + return _node; + } protected: - xmlpp::Node const * _node; + xmlpp::Node* _node; private: mutable std::list _taken; -- 2.30.2