NDDEM
Public Member Functions | Public Attributes | List of all members
cereal::XMLInputArchive::NodeInfo Struct Reference

A struct that contains metadata about a node. More...

#include <xml.hpp>

Public Member Functions

 NodeInfo (rapidxml::xml_node<> *n=nullptr)
 
void advance ()
 Advances to the next sibling node of the child. More...
 
rapidxml::xml_nodesearch (const char *searchName)
 Searches for a child with the given name in this node. More...
 
const char * getChildName () const
 Returns the actual name of the next child node, if it exists. More...
 

Public Attributes

rapidxml::xml_nodenode
 A pointer to this node. More...
 
rapidxml::xml_nodechild
 A pointer to its current child. More...
 
size_t size
 The remaining number of children for this node. More...
 
const char * name
 The NVP name for next child node. More...
 

Detailed Description

A struct that contains metadata about a node.

Keeps track of some top level node, its number of remaining children, and the current active child node

Constructor & Destructor Documentation

◆ NodeInfo()

cereal::XMLInputArchive::NodeInfo::NodeInfo ( rapidxml::xml_node<> *  n = nullptr)
inline

Member Function Documentation

◆ advance()

void cereal::XMLInputArchive::NodeInfo::advance ( )
inline

Advances to the next sibling node of the child.

If this is the last sibling child will be null after calling

◆ getChildName()

const char* cereal::XMLInputArchive::NodeInfo::getChildName ( ) const
inline

Returns the actual name of the next child node, if it exists.

◆ search()

rapidxml::xml_node* cereal::XMLInputArchive::NodeInfo::search ( const char *  searchName)
inline

Searches for a child with the given name in this node.

Parameters
searchNameThe name to search for (must be null terminated)
Returns
The node if found, nullptr otherwise

Member Data Documentation

◆ child

rapidxml::xml_node* cereal::XMLInputArchive::NodeInfo::child

A pointer to its current child.

◆ name

const char* cereal::XMLInputArchive::NodeInfo::name

The NVP name for next child node.

◆ node

rapidxml::xml_node* cereal::XMLInputArchive::NodeInfo::node

A pointer to this node.

◆ size

size_t cereal::XMLInputArchive::NodeInfo::size

The remaining number of children for this node.


The documentation for this struct was generated from the following file: