[libxml++] Replace xmlpp::NodeSet by xmlpp::Node::NodeSet



commit a640bf9548ccb67d59cc168fd651145169e55414
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Thu Sep 17 11:15:52 2015 +0200

    Replace xmlpp::NodeSet by xmlpp::Node::NodeSet
    
    * libxml++/nodes/node.[h|cc]: Declare the NodeSet and const_NodeSet typedefs
    inside class Node. That's consistent with how Node::NodeList, Node::PrefixNsMap
    and Element::AttributeList are declared.

 libxml++/nodes/node.cc |    8 ++++----
 libxml++/nodes/node.h  |    7 +++----
 2 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/libxml++/nodes/node.cc b/libxml++/nodes/node.cc
index 2b494ec..d9ba465 100644
--- a/libxml++/nodes/node.cc
+++ b/libxml++/nodes/node.cc
@@ -526,22 +526,22 @@ Glib::ustring Node::get_path() const
   return retn;
 }
 
-NodeSet Node::find(const Glib::ustring& xpath)
+Node::NodeSet Node::find(const Glib::ustring& xpath)
 {
   return find_common<NodeSet>(xpath, 0, impl_);
 }
 
-const_NodeSet Node::find(const Glib::ustring& xpath) const
+Node::const_NodeSet Node::find(const Glib::ustring& xpath) const
 {
   return find_common<const_NodeSet>(xpath, 0, impl_);
 }
 
-NodeSet Node::find(const Glib::ustring& xpath, const PrefixNsMap& namespaces)
+Node::NodeSet Node::find(const Glib::ustring& xpath, const PrefixNsMap& namespaces)
 {
   return find_common<NodeSet>(xpath, &namespaces, impl_);
 }
 
-const_NodeSet Node::find(const Glib::ustring& xpath, const PrefixNsMap& namespaces) const
+Node::const_NodeSet Node::find(const Glib::ustring& xpath, const PrefixNsMap& namespaces) const
 {
   return find_common<const_NodeSet>(xpath, &namespaces, impl_);
 }
diff --git a/libxml++/nodes/node.h b/libxml++/nodes/node.h
index fe70152..f5b6e55 100644
--- a/libxml++/nodes/node.h
+++ b/libxml++/nodes/node.h
@@ -27,10 +27,6 @@ class TextNode;
 class Element;
 class Attribute;
 
-class Node;
-typedef std::vector<Node*> NodeSet;
-typedef std::vector<const Node*> const_NodeSet;
-
 // xmlpp::XPathResultType is similar to xmlXPathObjectType in libxml2.
 /** An XPath expression is evaluated to yield a result, which
  * has one of the following four basic types:
@@ -57,6 +53,9 @@ public:
   typedef std::list<Node*> NodeList;
   typedef std::list<const Node*> const_NodeList;
 
+  typedef std::vector<Node*> NodeSet;
+  typedef std::vector<const Node*> const_NodeSet;
+
   /** @throws xmlpp::internal_error If @a node is <tt>0</tt>.
    */
   explicit Node(_xmlNode* node);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]