Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator Class Reference

Iterator is not remove safe. More...

#include <RTree.h>

Collaboration diagram for RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator:
[legend]

Data Structures

struct  StackElement
 

Public Member Functions

bool IsNotNull ()
 Is iterator pointing to valid data.
 
bool IsNull ()
 Is iterator invalid.
 
 Iterator ()
 
DATATYPE & operator* ()
 Access the current data element. Caller must be sure iterator is not NULL first.
 
const DATATYPE & operator* () const
 Access the current data element. Caller must be sure iterator is not NULL first.
 
bool operator++ ()
 Find the next data element.
 
 ~Iterator ()
 

Private Types

enum  { MAX_STACK = 32 }
 

Private Member Functions

bool FindNextData ()
 Find the next data element in the tree (For internal use only)
 
void Init ()
 Reset iterator.
 
StackElementPop ()
 Pop element off iteration stack (For internal use only)
 
void Push (Node *a_node, int a_branchIndex)
 Push node and branch onto iteration stack (For internal use only)
 

Private Attributes

StackElement m_stack [MAX_STACK]
 Stack as we are doing iteration instead of recursion.
 
int m_tos
 Top Of Stack index.
 

Friends

class RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >
 

Detailed Description

template<class DATATYPE, class DATATYPENP, class ELEMTYPE, int NUMDIMS, class CONTEXT, class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
class RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator

Iterator is not remove safe.

Definition at line 131 of file RTree.h.

Member Enumeration Documentation

◆ anonymous enum

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
anonymous enum
private
Enumerator
MAX_STACK 

Definition at line 135 of file RTree.h.

Constructor & Destructor Documentation

◆ Iterator()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::Iterator ( )
inline

◆ ~Iterator()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::~Iterator ( )
inline

Definition at line 147 of file RTree.h.

Member Function Documentation

◆ FindNextData()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::FindNextData ( )
inlineprivate

Find the next data element in the tree (For internal use only)

Definition at line 180 of file RTree.h.

References RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Node::IsLeaf(), RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Node::m_branch, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::StackElement::m_branchIndex, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Branch::m_child, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Node::m_count, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::StackElement::m_node, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::m_tos, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::Pop(), and RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::Push().

Referenced by RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::GetFirst(), and RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::operator++().

Here is the caller graph for this function:

◆ Init()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::Init ( )
inlineprivate

◆ IsNotNull()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::IsNotNull ( )
inline

Is iterator pointing to valid data.

Definition at line 153 of file RTree.h.

References RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::m_tos.

Referenced by RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::operator*(), and RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::operator*().

Here is the caller graph for this function:

◆ IsNull()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::IsNull ( )
inline

Is iterator invalid.

Definition at line 150 of file RTree.h.

References RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::m_tos.

Referenced by RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::IsNull().

Here is the caller graph for this function:

◆ operator*() [1/2]

◆ operator*() [2/2]

◆ operator++()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
bool RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::operator++ ( )
inline

◆ Pop()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
StackElement & RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::Pop ( )
inlineprivate

Pop element off iteration stack (For internal use only)

Definition at line 232 of file RTree.h.

References ASSERT, RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::m_stack, and RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::m_tos.

Referenced by RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::FindNextData().

Here is the caller graph for this function:

◆ Push()

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::Push ( Node a_node,
int  a_branchIndex 
)
inlineprivate

Friends And Related Symbol Documentation

◆ RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
friend class RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >
friend

Definition at line 240 of file RTree.h.

Field Documentation

◆ m_stack

template<class DATATYPE , class DATATYPENP , class ELEMTYPE , int NUMDIMS, class CONTEXT , class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
StackElement RTree< DATATYPE, DATATYPENP, ELEMTYPE, NUMDIMS, CONTEXT, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::m_stack[MAX_STACK]
private

◆ m_tos


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