gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
RTree< DATATYPE, ELEMTYPE, NUMDIMS, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator Class Reference

Iterator is not remove safe. More...

#include <rtree.h>

Collaboration diagram for RTree< DATATYPE, ELEMTYPE, NUMDIMS, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator:

Classes

struct  StackElement
 

Public Member Functions

 Iterator ()
 
 ~Iterator ()
 
bool IsNull ()
 Is iterator invalid. More...
 
bool IsNotNull ()
 Is iterator pointing to valid data. More...
 
DATATYPE & operator* ()
 Access the current data element. Caller must be sure iterator is not NULL first. More...
 
const DATATYPE & operator* () const
 Access the current data element. Caller must be sure iterator is not NULL first. More...
 
bool operator++ ()
 Find the next data element. More...
 
bool operator-- ()
 
void GetBounds (ELEMTYPE a_min[NUMDIMS], ELEMTYPE a_max[NUMDIMS])
 Get the bounds for this node. More...
 

Private Types

enum  { MAX_STACK = 32 }
 

Private Member Functions

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

Private Attributes

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

Friends

class RTree
 

Detailed Description

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

Iterator is not remove safe.

Definition at line 159 of file rtree.h.

Member Enumeration Documentation

◆ anonymous enum

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

Definition at line 163 of file rtree.h.

Constructor & Destructor Documentation

◆ Iterator()

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

Definition at line 173 of file rtree.h.

Here is the call graph for this function:

◆ ~Iterator()

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

Definition at line 175 of file rtree.h.

Member Function Documentation

◆ FindNextData()

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

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

Definition at line 225 of file rtree.h.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindNextData2()

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

Definition at line 267 of file rtree.h.

Referenced by RTree< DATATYPE, ELEMTYPE, NUMDIMS, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::operator--().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetBounds()

template<class DATATYPE , class ELEMTYPE , int NUMDIMS, class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
void RTree< DATATYPE, ELEMTYPE, NUMDIMS, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::GetBounds ( ELEMTYPE  a_min[NUMDIMS],
ELEMTYPE  a_max[NUMDIMS] 
)
inline

Get the bounds for this node.

Definition at line 204 of file rtree.h.

Here is the call graph for this function:

◆ Init()

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

Reset iterator.

Definition at line 222 of file rtree.h.

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

Here is the caller graph for this function:

◆ IsNotNull()

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

◆ IsNull()

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

Is iterator invalid.

Definition at line 178 of file rtree.h.

◆ operator*() [1/2]

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

Access the current data element. Caller must be sure iterator is not NULL first.

Definition at line 184 of file rtree.h.

Here is the call graph for this function:

◆ operator*() [2/2]

template<class DATATYPE , class ELEMTYPE , int NUMDIMS, class ELEMTYPEREAL = ELEMTYPE, int TMAXNODES = 8, int TMINNODES = TMAXNODES / 2>
const DATATYPE& RTree< DATATYPE, ELEMTYPE, NUMDIMS, ELEMTYPEREAL, TMAXNODES, TMINNODES >::Iterator::operator* ( ) const
inline

Access the current data element. Caller must be sure iterator is not NULL first.

Definition at line 192 of file rtree.h.

Here is the call graph for this function:

◆ operator++()

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

Find the next data element.

Definition at line 200 of file rtree.h.

Here is the call graph for this function:

◆ operator--()

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

Definition at line 201 of file rtree.h.

Here is the call graph for this function:

◆ Pop()

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

Pop element off iteration stack (For internal use only)

Definition at line 325 of file rtree.h.

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

Here is the caller graph for this function:

◆ Push()

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

Push node and branch onto iteration stack (For internal use only)

Definition at line 316 of file rtree.h.

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

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ RTree

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

Definition at line 335 of file rtree.h.

Member Data Documentation

◆ m_stack

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

◆ m_tos


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