KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EE_RTREE::EE_TYPE Struct Reference

The EE_TYPE struct provides a type-specific auto-range iterator to the RTree. More...

#include <sch_rtree.h>

Public Types

using SearchIter = typename ee_rtree::SearchIterator
 

Public Member Functions

 EE_TYPE (const ee_rtree &aTree, KICAD_T aType)
 
 EE_TYPE (const ee_rtree &aTree, KICAD_T aType, const BOX2I &aRect)
 
SearchIter begin ()
 
SearchIter end ()
 
bool empty ()
 

Private Attributes

int m_min [3] = {}
 
int m_max [3] = {}
 
ee_rtree::SearchRange m_range { nullptr, m_min, m_max }
 

Detailed Description

The EE_TYPE struct provides a type-specific auto-range iterator to the RTree.

Using this struct, one can write lines like:

for( auto item : rtree.OfType( SCH_SYMBOL_T ) )

and iterate over the RTree items that are symbols only.

Uses a lazy SearchRange internally to avoid materializing results.

Definition at line 174 of file sch_rtree.h.

Member Typedef Documentation

◆ SearchIter

using EE_RTREE::EE_TYPE::SearchIter = typename ee_rtree::SearchIterator

Definition at line 176 of file sch_rtree.h.

Constructor & Destructor Documentation

◆ EE_TYPE() [1/2]

EE_RTREE::EE_TYPE::EE_TYPE ( const ee_rtree & aTree,
KICAD_T aType )
inline

◆ EE_TYPE() [2/2]

Member Function Documentation

◆ begin()

SearchIter EE_RTREE::EE_TYPE::begin ( )
inline

Definition at line 214 of file sch_rtree.h.

References m_range.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and SCH_SCREEN::HasItems().

◆ empty()

bool EE_RTREE::EE_TYPE::empty ( )
inline

Definition at line 217 of file sch_rtree.h.

References m_range.

◆ end()

SearchIter EE_RTREE::EE_TYPE::end ( )
inline

Definition at line 215 of file sch_rtree.h.

References m_range.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and SCH_SCREEN::HasItems().

Member Data Documentation

◆ m_max

int EE_RTREE::EE_TYPE::m_max[3] = {}
private

Definition at line 221 of file sch_rtree.h.

Referenced by EE_TYPE(), and EE_TYPE().

◆ m_min

int EE_RTREE::EE_TYPE::m_min[3] = {}
private

Definition at line 220 of file sch_rtree.h.

Referenced by EE_TYPE(), and EE_TYPE().

◆ m_range

ee_rtree::SearchRange EE_RTREE::EE_TYPE::m_range { nullptr, m_min, m_max }
private

Definition at line 222 of file sch_rtree.h.

Referenced by begin(), EE_TYPE(), EE_TYPE(), empty(), and end().


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