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

Parent Last Iterator. More...

#include <irrMap.h>

Public Member Functions

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

Detailed Description

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

Parent Last Iterator.

Traverse the tree from bottom to top. Typical usage is when deleting all elements in the tree because you must delete the children before you delete their parent.

Definition at line 529 of file irrMap.h.

Constructor & Destructor Documentation

◆ ParentLastIterator() [1/2]

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

Definition at line 533 of file irrMap.h.

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

◆ ParentLastIterator() [2/2]

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

Definition at line 535 of file irrMap.h.

535  : Root(root), Cur(0)
536  {
537  reset();
538  }

Member Function Documentation

◆ atEnd()

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

Definition at line 545 of file irrMap.h.

546  {
547  return Cur==0;
548  }

◆ getNode()

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

Definition at line 550 of file irrMap.h.

551  {
552  return Cur;
553  }

◆ operator *()

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

Definition at line 572 of file irrMap.h.

573  {
574  _IRR_DEBUG_BREAK_IF(atEnd()) // access violation
575 
576  return *getNode();
577  }
#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 >::ParentLastIterator::operator -> ( )
inline

Definition at line 567 of file irrMap.h.

568  {
569  return getNode();
570  }

◆ operator++()

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

Definition at line 562 of file irrMap.h.

563  {
564  inc();
565  }

◆ operator=()

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

Definition at line 555 of file irrMap.h.

556  {
557  Root = src.Root;
558  Cur = src.Cur;
559  return (*this);
560  }
GLenum src

◆ reset()

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

Definition at line 540 of file irrMap.h.

541  {
542  Cur = getMin(Root);
543  }

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