Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::MutablePolygon::const_iterator Class Reference

#include <src/libslic3r/MutablePolygon.hpp>

+ Collaboration diagram for Slic3r::MutablePolygon::const_iterator:

Public Member Functions

bool operator== (const const_iterator &rhs) const
 
bool operator!= (const const_iterator &rhs) const
 
const_iteratoroperator-- ()
 
const_iterator operator-- (int)
 
const_iteratoroperator++ ()
 
const_iterator operator++ (int)
 
const_iterator prev () const
 
const_iterator next () const
 
bool valid () const
 
const PointTypeoperator* () const
 
const PointTypeoperator-> () const
 
const MutablePolygonpolygon () const
 
IndexType size () const
 

Private Member Functions

 const_iterator (const MutablePolygon *data, IndexType idx)
 

Private Attributes

const MutablePolygonm_data
 
IndexType m_idx
 

Friends

class MutablePolygon
 

Detailed Description

Constructor & Destructor Documentation

◆ const_iterator()

Slic3r::MutablePolygon::const_iterator::const_iterator ( const MutablePolygon data,
IndexType  idx 
)
inlineprivate
35: m_data(data), m_idx(idx) {}
IndexType m_idx
Definition MutablePolygon.hpp:38
const MutablePolygon * m_data
Definition MutablePolygon.hpp:37

Member Function Documentation

◆ next()

const_iterator Slic3r::MutablePolygon::const_iterator::next ( ) const
inline
28{ assert(this->valid()); return { m_data, m_data->at(m_idx).next }; }
bool valid() const
Definition MutablePolygon.hpp:29
IndexType next
Definition MutablePolygon.hpp:194
LinkedPoint & at(IndexType i)
Definition MutablePolygon.hpp:203

References Slic3r::MutablePolygon::at(), m_data, m_idx, Slic3r::MutablePolygon::LinkedPoint::next, and valid().

+ Here is the call graph for this function:

◆ operator!=()

bool Slic3r::MutablePolygon::const_iterator::operator!= ( const const_iterator rhs) const
inline
22{ return ! (*this == rhs); }

◆ operator*()

const PointType & Slic3r::MutablePolygon::const_iterator::operator* ( ) const
inline
30{ return m_data->at(m_idx).point; }
PointType point
Definition MutablePolygon.hpp:190

References Slic3r::MutablePolygon::at(), m_data, m_idx, and Slic3r::MutablePolygon::LinkedPoint::point.

+ Here is the call graph for this function:

◆ operator++() [1/2]

const_iterator & Slic3r::MutablePolygon::const_iterator::operator++ ( )
inline
25{ assert(this->valid()); m_idx = m_data->at(m_idx).next; return *this; }

References Slic3r::MutablePolygon::at(), m_data, m_idx, Slic3r::MutablePolygon::LinkedPoint::next, and valid().

+ Here is the call graph for this function:

◆ operator++() [2/2]

const_iterator Slic3r::MutablePolygon::const_iterator::operator++ ( int  )
inline
26{ const_iterator result(*this); ++(*this); return result; }
const_iterator(const MutablePolygon *data, IndexType idx)
Definition MutablePolygon.hpp:35

◆ operator--() [1/2]

const_iterator & Slic3r::MutablePolygon::const_iterator::operator-- ( )
inline
23{ assert(this->valid()); m_idx = m_data->at(m_idx).prev; return *this; }
IndexType prev
Definition MutablePolygon.hpp:192

References Slic3r::MutablePolygon::at(), m_data, m_idx, Slic3r::MutablePolygon::LinkedPoint::prev, and valid().

+ Here is the call graph for this function:

◆ operator--() [2/2]

const_iterator Slic3r::MutablePolygon::const_iterator::operator-- ( int  )
inline
24{ const_iterator result(*this); --(*this); return result; }

◆ operator->()

const PointType * Slic3r::MutablePolygon::const_iterator::operator-> ( ) const
inline
31{ return &m_data->at(m_idx).point; }

References Slic3r::MutablePolygon::at(), m_data, m_idx, and Slic3r::MutablePolygon::LinkedPoint::point.

+ Here is the call graph for this function:

◆ operator==()

bool Slic3r::MutablePolygon::const_iterator::operator== ( const const_iterator rhs) const
inline
21{ assert(m_data == rhs.m_data); assert(this->valid()); return m_idx == rhs.m_idx; }
std::vector< LinkedPoint > m_data
Definition MutablePolygon.hpp:196

References m_data, m_idx, and valid().

+ Here is the call graph for this function:

◆ polygon()

const MutablePolygon & Slic3r::MutablePolygon::const_iterator::polygon ( ) const
inline
32{ assert(this->valid()); return *m_data; }

References m_data, and valid().

+ Here is the call graph for this function:

◆ prev()

const_iterator Slic3r::MutablePolygon::const_iterator::prev ( ) const
inline
27{ assert(this->valid()); return { m_data, m_data->at(m_idx).prev }; }

References Slic3r::MutablePolygon::at(), m_data, m_idx, Slic3r::MutablePolygon::LinkedPoint::prev, and valid().

+ Here is the call graph for this function:

◆ size()

IndexType Slic3r::MutablePolygon::const_iterator::size ( ) const
inline
33{ assert(this->valid()); return m_data->size(); }
size_t size() const
Definition MutablePolygon.hpp:167

References m_data, Slic3r::MutablePolygon::size(), and valid().

+ Here is the call graph for this function:

◆ valid()

bool Slic3r::MutablePolygon::const_iterator::valid ( ) const
inline
29{ return m_idx >= 0; }

References m_idx.

Referenced by next(), operator++(), operator--(), operator==(), polygon(), prev(), and size().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ MutablePolygon

friend class MutablePolygon
friend

Member Data Documentation

◆ m_data

const MutablePolygon* Slic3r::MutablePolygon::const_iterator::m_data
private

◆ m_idx

IndexType Slic3r::MutablePolygon::const_iterator::m_idx
private

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