From c23087acc887289f04f927bf7ede352324f4081b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 18 Sep 2012 23:32:44 +0100 Subject: Some renaming of XML-related methods. --- src/xml.h | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/xml.h') diff --git a/src/xml.h b/src/xml.h index 9b600013..ec352716 100644 --- a/src/xml.h +++ b/src/xml.h @@ -25,14 +25,14 @@ public: XMLNode (xmlpp::Node const * node); protected: - std::string string_node (std::string); - std::string optional_string_node (std::string); - ContentKind kind_node (std::string); - Fraction fraction_node (std::string); - int64_t int64_node (std::string); - int64_t optional_int64_node (std::string); - float float_node (std::string); - void ignore_node (std::string); + std::string string_child (std::string); + std::string optional_string_child (std::string); + ContentKind kind_child (std::string); + Fraction fraction_child (std::string); + int64_t int64_child (std::string); + int64_t optional_int64_child (std::string); + float float_child (std::string); + void ignore_child (std::string); void done (); Time time_attribute (std::string); @@ -47,13 +47,13 @@ protected: std::string content (); template - boost::shared_ptr sub_node (std::string name) { - return boost::shared_ptr (new T (xml_node (name))); + boost::shared_ptr type_child (std::string name) { + return boost::shared_ptr (new T (node_child (name))); } template - boost::shared_ptr optional_sub_node (std::string name) { - std::list n = xml_nodes (name); + boost::shared_ptr optional_type_child (std::string name) { + std::list n = node_children (name); if (n.size() > 1) { throw XMLError ("duplicate XML tag"); } else if (n.empty ()) { @@ -64,8 +64,8 @@ protected: } template - std::list > sub_nodes (std::string name) { - std::list n = xml_nodes (name); + std::list > type_children (std::string name) { + std::list n = node_children (name); std::list > r; for (typename std::list::iterator i = n.begin(); i != n.end(); ++i) { r.push_back (boost::shared_ptr (new T (*i))); @@ -74,16 +74,16 @@ protected: } template - std::list > sub_nodes (std::string name, std::string sub) { - XMLNode p (xml_node (name)); - return p.sub_nodes (sub); + std::list > type_grand_children (std::string name, std::string sub) { + XMLNode p (node_child (name)); + return p.type_children (sub); } xmlpp::Node const * _node; private: - xmlpp::Node* xml_node (std::string); - std::list xml_nodes (std::string); + xmlpp::Node* node_child (std::string); + std::list node_children (std::string); std::list _taken; }; -- cgit v1.2.3