arsa  2.7
Public Member Functions | List of all members
irr::core::map< KeyType, ValueType >::ParentFirstIterator Class Reference

Parent First Iterator. More...

#include <irrMap.h>

Public Member Functions

 ParentFirstIterator ()
 
 ParentFirstIterator (Node *root)
 
void reset ()
 
bool atEnd () const
 
NodegetNode ()
 
ParentFirstIteratoroperator= (const ParentFirstIterator &src)
 
void operator++ (int)
 
Nodeoperator -> ()
 
Nodeoperator * ()
 

Detailed Description

template<class KeyType, class ValueType>
class irr::core::map< KeyType, ValueType >::ParentFirstIterator

Parent First Iterator.

Traverses the tree from top to bottom. Typical usage is when storing the tree structure, because when reading it later (and inserting elements) the tree structure will be the same.

Definition at line 430 of file irrMap.h.

Constructor & Destructor Documentation

◆ ParentFirstIterator() [1/2]

template<class KeyType, class ValueType>
irr::core::map< KeyType, ValueType >::ParentFirstIterator::ParentFirstIterator ( )
inline

Definition at line 434 of file irrMap.h.

434 : Root(0), Cur(0) {}

◆ ParentFirstIterator() [2/2]

template<class KeyType, class ValueType>
irr::core::map< KeyType, ValueType >::ParentFirstIterator::ParentFirstIterator ( Node root)
inlineexplicit

Definition at line 436 of file irrMap.h.

436  : Root(root), Cur(0)
437  {
438  reset();
439  }

Member Function Documentation

◆ atEnd()

template<class KeyType, class ValueType>
bool irr::core::map< KeyType, ValueType >::ParentFirstIterator::atEnd ( ) const
inline

Definition at line 446 of file irrMap.h.

447  {
448  return Cur==0;
449  }

◆ getNode()

template<class KeyType, class ValueType>
Node* irr::core::map< KeyType, ValueType >::ParentFirstIterator::getNode ( )
inline

Definition at line 451 of file irrMap.h.

452  {
453  return Cur;
454  }

◆ operator *()

template<class KeyType, class ValueType>
Node& irr::core::map< KeyType, ValueType >::ParentFirstIterator::operator * ( )
inline

Definition at line 473 of file irrMap.h.

474  {
475  _IRR_DEBUG_BREAK_IF(atEnd()) // access violation
476 
477  return *getNode();
478  }
#define _IRR_DEBUG_BREAK_IF(_CONDITION_)
define a break macro for debugging.
Definition: irrTypes.h:185

◆ operator ->()

template<class KeyType, class ValueType>
Node* irr::core::map< KeyType, ValueType >::ParentFirstIterator::operator -> ( )
inline

Definition at line 468 of file irrMap.h.

469  {
470  return getNode();
471  }

◆ operator++()

template<class KeyType, class ValueType>
void irr::core::map< KeyType, ValueType >::ParentFirstIterator::operator++ ( int  )
inline

Definition at line 463 of file irrMap.h.

464  {
465  inc();
466  }

◆ operator=()

template<class KeyType, class ValueType>
ParentFirstIterator& irr::core::map< KeyType, ValueType >::ParentFirstIterator::operator= ( const ParentFirstIterator src)
inline

Definition at line 456 of file irrMap.h.

457  {
458  Root = src.Root;
459  Cur = src.Cur;
460  return (*this);
461  }
GLenum src

◆ reset()

template<class KeyType, class ValueType>
void irr::core::map< KeyType, ValueType >::ParentFirstIterator::reset ( )
inline

Definition at line 441 of file irrMap.h.

442  {
443  Cur = Root;
444  }

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