MCPcopy Create free account
hub / github.com/USCiLab/cereal / document

Method document

include/cereal/external/rapidxml/rapidxml.hpp:936–942  ·  view source on GitHub ↗

Gets document of which node is a child. \return Pointer to document that contains this node, or 0 if there is no parent document.

Source from the content-addressed store, hash-verified

934 //! Gets document of which node is a child.
935 //! \return Pointer to document that contains this node, or 0 if there is no parent document.
936 xml_document<Ch> *document() const
937 {
938 xml_node<Ch> *node = const_cast<xml_node<Ch> *>(this);
939 while (node->parent())
940 node = node->parent();
941 return node->type() == node_document ? static_cast<xml_document<Ch> *>(node) : 0;
942 }
943
944 //! Gets first child node, optionally matching node name.
945 //! \param name_ Name of child to find, or 0 to return first child regardless of its name; this string doesn't have to be zero-terminated if name_size is non-zero

Callers

nothing calls this directly

Calls 2

parentMethod · 0.80
typeMethod · 0.80

Tested by

no test coverage detected