Speculative fix for assertion failure (DoM #2839).
[libdcp.git] / src / xml.h
index 154ec2105e3865250067b49a4fa68f3b78bd189b..6fec7f1bc9613515f8ee9cda2ddd4d8667506c1a 100644 (file)
--- a/src/xml.h
+++ b/src/xml.h
     files in the program, then also delete it here.
 */
 
+
+/** @file  src/xml.h
+ *  @brief Helpers for XML reading with libcxml
+ */
+
+
 #ifndef LIBDCP_XML_H
 #define LIBDCP_XML_H
 
+
 #include "exceptions.h"
 #include <libcxml/cxml.h>
 
+
 namespace dcp
 {
 
+
 template <class T>
 std::shared_ptr<T>
 optional_type_child (cxml::Node const & node, std::string name)
@@ -54,11 +63,13 @@ optional_type_child (cxml::Node const & node, std::string name)
        return std::make_shared<T>(n.front());
 }
 
+
 template <class T>
 std::shared_ptr<T> type_child (std::shared_ptr<const cxml::Node> node, std::string name) {
        return std::make_shared<T>(node->node_child(name));
 }
 
+
 template <class T>
 std::shared_ptr<T>
 optional_type_child (std::shared_ptr<const cxml::Node> node, std::string name)
@@ -66,6 +77,7 @@ optional_type_child (std::shared_ptr<const cxml::Node> node, std::string name)
        return optional_type_child<T> (*node.get(), name);
 }
 
+
 template <class T>
 std::vector<std::shared_ptr<T>>
 type_children (cxml::Node const & node, std::string name)
@@ -77,6 +89,7 @@ type_children (cxml::Node const & node, std::string name)
        return r;
 }
 
+
 template <class T>
 std::vector<std::shared_ptr<T>>
 type_children (std::shared_ptr<const cxml::Node> node, std::string name)
@@ -84,6 +97,7 @@ type_children (std::shared_ptr<const cxml::Node> node, std::string name)
        return type_children<T> (*node.get(), name);
 }
 
+
 template <class T>
 std::vector<std::shared_ptr<T>>
 type_grand_children (cxml::Node const & node, std::string name, std::string sub)
@@ -91,6 +105,7 @@ type_grand_children (cxml::Node const & node, std::string name, std::string sub)
        return type_children<T> (node.node_child(name), sub);
 }
 
+
 template <class T>
 std::vector<std::shared_ptr<T>>
 type_grand_children (std::shared_ptr<const cxml::Node> node, std::string name, std::string sub)
@@ -100,4 +115,5 @@ type_grand_children (std::shared_ptr<const cxml::Node> node, std::string name, s
 
 }
 
+
 #endif