KiCad PCB EDA Suite
SHAPE_INDEX_LIST< T, >::query_iterator Class Reference

#include <shape_index_list.h>

Public Member Functions

 query_iterator ()
 
 query_iterator (SHAPE_VEC_ITER aCurrent, SHAPE_VEC_ITER aEnd, SHAPE *aShape, int aMinDistance, bool aExact)
 
 query_iterator (const query_iterator &aB)
 
operator* () const
 
query_iteratoroperator++ ()
 
query_iteratoroperator++ (int aDummy)
 
bool operator== (const query_iterator &aRhs) const
 
bool operator!= (const query_iterator &aRhs) const
 
const query_iteratoroperator= (const query_iterator &aRhs)
 

Private Member Functions

void next ()
 

Private Attributes

SHAPE_VEC_ITER m_end
 
SHAPE_VEC_ITER m_current
 
BOX2I m_refBBox
 
bool m_exact
 
SHAPEm_shape
 
int m_minDistance
 

Detailed Description

template<class T, const SHAPE * = defaultShapeFunctor<T>>
class SHAPE_INDEX_LIST< T, >::query_iterator

Definition at line 111 of file shape_index_list.h.

Constructor & Destructor Documentation

template<class T, const SHAPE * = defaultShapeFunctor<T>>
SHAPE_INDEX_LIST< T, >::query_iterator::query_iterator ( )
inline

Definition at line 114 of file shape_index_list.h.

115  {
116  }
template<class T, const SHAPE * = defaultShapeFunctor<T>>
SHAPE_INDEX_LIST< T, >::query_iterator::query_iterator ( SHAPE_VEC_ITER  aCurrent,
SHAPE_VEC_ITER  aEnd,
SHAPE aShape,
int  aMinDistance,
bool  aExact 
)
inline

Definition at line 118 of file shape_index_list.h.

References SHAPE::BBox(), SHAPE_INDEX_LIST< T, >::query_iterator::m_refBBox, and SHAPE_INDEX_LIST< T, >::query_iterator::next().

119  :
120  m_end( aEnd ),
121  m_current( aCurrent ),
122  m_shape( aShape ),
123  m_minDistance( aMinDistance ),
124  m_exact( aExact )
125  {
126  if( aShape )
127  {
128  m_refBBox = aShape->BBox();
129  next();
130  }
131  }
virtual const BOX2I BBox(int aClearance=0) const =0
Function BBox()
template<class T, const SHAPE * = defaultShapeFunctor<T>>
SHAPE_INDEX_LIST< T, >::query_iterator::query_iterator ( const query_iterator aB)
inline

Definition at line 133 of file shape_index_list.h.

133  :
134  m_end( aB.m_end ),
135  m_current( aB.m_current ),
136  m_shape( aB.m_shape ),
137  m_minDistance( aB.m_minDistance ),
138  m_exact( aB.m_exact ),
139  m_refBBox( aB.m_refBBox )
140  {
141  }

Member Function Documentation

template<class T, const SHAPE * = defaultShapeFunctor<T>>
void SHAPE_INDEX_LIST< T, >::query_iterator::next ( )
inlineprivate
template<class T, const SHAPE * = defaultShapeFunctor<T>>
bool SHAPE_INDEX_LIST< T, >::query_iterator::operator!= ( const query_iterator aRhs) const
inline

Definition at line 167 of file shape_index_list.h.

References SHAPE_INDEX_LIST< T, >::query_iterator::m_current.

168  {
169  return m_current != aRhs.m_current;
170  }
template<class T, const SHAPE * = defaultShapeFunctor<T>>
T SHAPE_INDEX_LIST< T, >::query_iterator::operator* ( ) const
inline

Definition at line 143 of file shape_index_list.h.

144  {
145  return (*m_current).parent;
146  }
template<class T, const SHAPE * = defaultShapeFunctor<T>>
query_iterator& SHAPE_INDEX_LIST< T, >::query_iterator::operator++ ( )
inline
template<class T, const SHAPE * = defaultShapeFunctor<T>>
query_iterator& SHAPE_INDEX_LIST< T, >::query_iterator::operator++ ( int  aDummy)
inline
template<class T, const SHAPE * = defaultShapeFunctor<T>>
const query_iterator& SHAPE_INDEX_LIST< T, >::query_iterator::operator= ( const query_iterator aRhs)
inline
template<class T, const SHAPE * = defaultShapeFunctor<T>>
bool SHAPE_INDEX_LIST< T, >::query_iterator::operator== ( const query_iterator aRhs) const
inline

Definition at line 162 of file shape_index_list.h.

References SHAPE_INDEX_LIST< T, >::query_iterator::m_current.

163  {
164  return m_current == aRhs.m_current;
165  }

Member Data Documentation

template<class T, const SHAPE * = defaultShapeFunctor<T>>
SHAPE_VEC_ITER SHAPE_INDEX_LIST< T, >::query_iterator::m_end
private
template<class T, const SHAPE * = defaultShapeFunctor<T>>
bool SHAPE_INDEX_LIST< T, >::query_iterator::m_exact
private
template<class T, const SHAPE * = defaultShapeFunctor<T>>
int SHAPE_INDEX_LIST< T, >::query_iterator::m_minDistance
private
template<class T, const SHAPE * = defaultShapeFunctor<T>>
BOX2I SHAPE_INDEX_LIST< T, >::query_iterator::m_refBBox
private
template<class T, const SHAPE * = defaultShapeFunctor<T>>
SHAPE* SHAPE_INDEX_LIST< T, >::query_iterator::m_shape
private

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