KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SHAPE_POLY_SET::ITERATOR_TEMPLATE< T > Class Template Reference

Base class for iterating over all vertices in a given SHAPE_POLY_SET. More...

#include <shape_poly_set.h>

Public Member Functions

bool IsEndContour () const
 
bool IsLastPolygon () const
 
 operator bool () const
 
void Advance ()
 Advance the indices of the current vertex/outline/contour, checking whether the vertices in the holes have to be iterated through.
 
void operator++ (int dummy)
 
void operator++ ()
 
const TGet ()
 
const Toperator* ()
 
const Toperator-> ()
 
VERTEX_INDEX GetIndex ()
 

Private Attributes

SHAPE_POLY_SETm_poly
 
int m_currentPolygon
 
int m_currentContour
 
int m_currentVertex
 
int m_lastPolygon
 
bool m_iterateHoles
 

Friends

class SHAPE_POLY_SET
 

Detailed Description

template<class T>
class SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >

Base class for iterating over all vertices in a given SHAPE_POLY_SET.

Definition at line 249 of file shape_poly_set.h.

Member Function Documentation

◆ Advance()

template<class T>
void SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::Advance ( )
inline

Advance the indices of the current vertex/outline/contour, checking whether the vertices in the holes have to be iterated through.

Definition at line 288 of file shape_poly_set.h.

Referenced by SHAPE_POLY_SET::ITERATOR_TEMPLATE< VECTOR2I >::operator++(), and SHAPE_POLY_SET::ITERATOR_TEMPLATE< VECTOR2I >::operator++().

◆ Get()

◆ GetIndex()

template<class T>
VERTEX_INDEX SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::GetIndex ( )
inline
Returns
the indices of the current polygon, contour and vertex.

Definition at line 353 of file shape_poly_set.h.

Referenced by SHAPE_POLY_SET::RemoveNullSegments().

◆ IsEndContour()

template<class T>
bool SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::IsEndContour ( ) const
inline
Returns
true if the current vertex is the last one of the current contour (outline or hole); false otherwise.

Definition at line 257 of file shape_poly_set.h.

Referenced by PCB_POINT_EDITOR::addCorner(), DSN::SPECCTRA_DB::FromBOARD(), DSN::SPECCTRA_DB::makeIMAGE(), and SHAPE_POLY_SET::RemoveNullSegments().

◆ IsLastPolygon()

template<class T>
bool SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::IsLastPolygon ( ) const
inline
Returns
true if the current outline is the last one; false otherwise.

Definition at line 265 of file shape_poly_set.h.

◆ operator bool()

template<class T>
SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::operator bool ( ) const
inline

Definition at line 270 of file shape_poly_set.h.

◆ operator*()

template<class T>
const T & SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::operator* ( )
inline

Definition at line 340 of file shape_poly_set.h.

◆ operator++() [1/2]

template<class T>
void SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::operator++ ( )
inline

Definition at line 330 of file shape_poly_set.h.

◆ operator++() [2/2]

template<class T>
void SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::operator++ ( int dummy)
inline

Definition at line 325 of file shape_poly_set.h.

◆ operator->()

template<class T>
const T * SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::operator-> ( )
inline

Definition at line 345 of file shape_poly_set.h.

Friends And Related Symbol Documentation

◆ SHAPE_POLY_SET

template<class T>
friend class SHAPE_POLY_SET
friend

Definition at line 365 of file shape_poly_set.h.

Member Data Documentation

◆ m_currentContour

template<class T>
int SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentContour
private

◆ m_currentPolygon

template<class T>
int SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentPolygon
private

◆ m_currentVertex

template<class T>
int SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_currentVertex
private

◆ m_iterateHoles

template<class T>
bool SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_iterateHoles
private

Definition at line 372 of file shape_poly_set.h.

Referenced by SHAPE_POLY_SET::CIterate(), and SHAPE_POLY_SET::Iterate().

◆ m_lastPolygon

template<class T>
int SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_lastPolygon
private

Definition at line 371 of file shape_poly_set.h.

Referenced by SHAPE_POLY_SET::CIterate(), and SHAPE_POLY_SET::Iterate().

◆ m_poly

template<class T>
SHAPE_POLY_SET* SHAPE_POLY_SET::ITERATOR_TEMPLATE< T >::m_poly
private

Definition at line 367 of file shape_poly_set.h.

Referenced by SHAPE_POLY_SET::CIterate(), and SHAPE_POLY_SET::Iterate().


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