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

Method getNumChildren

include/cereal/archives/xml.hpp:681–693  ·  view source on GitHub ↗

Gets the number of children (usually interpreted as size) for the specified node

Source from the content-addressed store, hash-verified

679 protected:
680 //! Gets the number of children (usually interpreted as size) for the specified node
681 static size_t getNumChildren( rapidxml::xml_node<> * node )
682 {
683 size_t size = 0;
684 node = node->first_node(); // get first child
685
686 while( node != nullptr )
687 {
688 ++size;
689 node = node->next_sibling();
690 }
691
692 return size;
693 }
694
695 //! A struct that contains metadata about a node
696 /*! Keeps track of some top level node, its number of

Callers

nothing calls this directly

Calls 2

first_nodeMethod · 0.80
next_siblingMethod · 0.80

Tested by

no test coverage detected