Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
Assimp::XmlNodeIterator Class Reference

This class declares an iterator to loop through all children of the root node. More...

#include <XmlParser.h>

Public Types

enum  IterationMode { PreOrderMode , PostOrderMode }
 The iteration mode. More...
 

Public Member Functions

void clear ()
 Will clear all collected nodes. More...
 
void collectChildrenPostOrder (XmlNode &node)
 Will iterate through all children in post-order iteration. More...
 
void collectChildrenPreOrder (XmlNode &node)
 Will iterate through all children in pre-order iteration. More...
 
bool getNext (XmlNode &next)
 Will iterate through all collected nodes. More...
 
bool isEmpty () const
 Returns true, if the node is empty. More...
 
size_t size () const
 Will return the number of collected nodes. More...
 
 XmlNodeIterator (XmlNode &parent, IterationMode mode)
 The class constructor. More...
 
 ~XmlNodeIterator ()=default
 The class destructor, default implementation. More...
 

Detailed Description

This class declares an iterator to loop through all children of the root node.

Member Enumeration Documentation

◆ IterationMode

The iteration mode.

Enumerator
PreOrderMode 

Pre-ordering, get the values, continue the iteration.

PostOrderMode 

Post-ordering, continue the iteration, get the values.

Constructor & Destructor Documentation

◆ XmlNodeIterator()

Assimp::XmlNodeIterator::XmlNodeIterator ( XmlNode parent,
IterationMode  mode 
)
inlineexplicit

The class constructor.

Parameters
parent[in] The xml parent to to iterate through.
mode[in] The iteration mode.

◆ ~XmlNodeIterator()

Assimp::XmlNodeIterator::~XmlNodeIterator ( )
default

The class destructor, default implementation.

Member Function Documentation

◆ clear()

void Assimp::XmlNodeIterator::clear ( )
inline

Will clear all collected nodes.

◆ collectChildrenPostOrder()

void Assimp::XmlNodeIterator::collectChildrenPostOrder ( XmlNode node)
inline

Will iterate through all children in post-order iteration.

Parameters
node[in] The nod to iterate through.

◆ collectChildrenPreOrder()

void Assimp::XmlNodeIterator::collectChildrenPreOrder ( XmlNode node)
inline

Will iterate through all children in pre-order iteration.

Parameters
node[in] The nod to iterate through.

◆ getNext()

bool Assimp::XmlNodeIterator::getNext ( XmlNode next)
inline

Will iterate through all collected nodes.

Parameters
nextThe next node, if there is any.
Returns
true, if there is a node left.

◆ isEmpty()

bool Assimp::XmlNodeIterator::isEmpty ( ) const
inline

Returns true, if the node is empty.

Returns
true, if the node is empty, false if not.

◆ size()

size_t Assimp::XmlNodeIterator::size ( ) const
inline

Will return the number of collected nodes.

Returns
The number of collected nodes.

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