Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::GridIndexBox::iterator Struct Reference

STL compatible iterator. More...

Collaboration diagram for Burger::GridIndexBox::iterator:

Public Member Functions

 iterator (const GridIndexBox *pParent)
 Default constructor.
 
uint_t at_end (void) const
 TRUE if the iterator is at the end of the data
 
void operator++ ()
 Step to the next data entry.
 
void advance (void)
 Step to the next data entry.
 
uint_t AdvanceInCell (void)
 Step to the next data entry in the current array.
 
Entryoperator* () const
 Access the entry with a reference.
 
Entryoperator-> () const
 Access the entry with a reference.
 

Public Attributes

const GridIndexBoxm_pParent
 Pointer to parent class.
 
Entrym_pEntry
 Current object.
 
Vector4D_t m_QueryRect
 Rect of interest.
 
Rect_t m_QueryCellsRect
 Bounds rectangle in cells.
 
uint_t m_uCurrentCellX
 Last accessed cell X coordinate.
 
uint_t m_uCurrentCellY
 Last accessed cell Y coordinate.
 
uintptr_t m_uCurrentCellArrayIndex
 Index to the current entry's array.
 

Detailed Description

STL compatible iterator.


Iterator used to traverse the grid using STL or STL like code.

See also
GridIndexBox

Constructor & Destructor Documentation

◆ iterator()

Burger::GridIndexBox::iterator::iterator ( const GridIndexBox * pParent)
inline

Default constructor.


Create an iterator for GridIndexPoints

Parameters
pParentPointer to the parent GridIndexPoints class

Member Function Documentation

◆ advance()

void BURGER_API Burger::GridIndexBox::iterator::advance ( void )

Step to the next data entry.


Point at next element in the iteration. Will assert if it's called when it's already reached the end of the data.

See also
operator++() or AdvanceInCell(void)

◆ AdvanceInCell()

uint_t BURGER_API Burger::GridIndexBox::iterator::AdvanceInCell ( void )

Step to the next data entry in the current array.


Go to the next valid element in the current cell. If the end of the cell is reached, set m_uCurrentCellArrayIndex to UINTPTR_MAX and return FALSE. Otherwise point m_uCurrentCellArrayIndex at the valid element, and return TRUE.

Returns
TRUE if data was found, FALSE if the end of the array was reached.
See also
operator++() or advance(void)

◆ at_end()

uint_t Burger::GridIndexBox::iterator::at_end ( void ) const
inline

TRUE if the iterator is at the end of the data


Returns
FALSE if the is more data remaining, TRUE if data is exhausted.

◆ operator*()

Entry & Burger::GridIndexBox::iterator::operator* ( ) const
inline

Access the entry with a reference.


Allows the used of the * operator to dereference the underlying data via a reference.

Returns
Reference to the data entry.
See also
operator->() const

◆ operator++()

void Burger::GridIndexBox::iterator::operator++ ( )
inline

Step to the next data entry.


Iterate over the data until the next valid data chunk is found. If the iterator is already at the end of the data, no action is performed.

See also
advance(void)

◆ operator->()

Entry * Burger::GridIndexBox::iterator::operator-> ( ) const
inline

Access the entry with a reference.


Allows the used of the * operator to dereference the underlying data via a pointer.

Returns
Pointer to the data entry.
See also
operator*() const

Member Data Documentation

◆ m_pEntry

Entry* Burger::GridIndexBox::iterator::m_pEntry

Current object.

◆ m_pParent

const GridIndexBox* Burger::GridIndexBox::iterator::m_pParent

Pointer to parent class.

◆ m_QueryCellsRect

Rect_t Burger::GridIndexBox::iterator::m_QueryCellsRect

Bounds rectangle in cells.

◆ m_QueryRect

Vector4D_t Burger::GridIndexBox::iterator::m_QueryRect

Rect of interest.

◆ m_uCurrentCellArrayIndex

uintptr_t Burger::GridIndexBox::iterator::m_uCurrentCellArrayIndex

Index to the current entry's array.

◆ m_uCurrentCellX

uint_t Burger::GridIndexBox::iterator::m_uCurrentCellX

Last accessed cell X coordinate.

◆ m_uCurrentCellY

uint_t Burger::GridIndexBox::iterator::m_uCurrentCellY

Last accessed cell Y coordinate.