Regina 7.3.1 Calculation Engine
|
A forward iterator used for running through all normal discs in a normal surface. More...
#include <surface/disc.h>
Public Member Functions | |
DiscSpecIterator () | |
Creates a new uninitialised iterator. | |
DiscSpecIterator (const DiscSetSurfaceDataImpl< TetData > &discSet) | |
Creates a new iterator pointing to the first disc in the given disc set. | |
DiscSpecIterator (const DiscSpecIterator &)=default | |
Creates a new copy of the given iterator. | |
void | init (const DiscSetSurfaceDataImpl< TetData > &discSet) |
Points this iterator to the first disc in the given disc set. | |
DiscSpecIterator & | operator= (const DiscSpecIterator &)=default |
Sets this to be a copy of the given iterator. | |
DiscSpecIterator & | operator++ () |
Preincrement operator. | |
DiscSpecIterator | operator++ (int) |
Postincrement operator. | |
auto | __next__ () |
Returns the current DiscSpec and increments this iterator. | |
const DiscSpec & | operator* () const |
Returns a reference to the disc pointed to by this iterator. | |
bool | done () const |
Determines if this iterator is past-the-end. | |
bool | operator== (const DiscSpecIterator &other) const |
Determines if this and the given iterator are equal. | |
bool | operator!= (const DiscSpecIterator &other) const |
Determines if this and the given iterator are different. | |
Friends | |
class | DiscSetSurfaceDataImpl< TetData > |
A forward iterator used for running through all normal discs in a normal surface.
This class is designed to work alongside DiscSetSurfaceDataImpl<TetData>. Typically you would not need to specify the template argument TetData; for copy initialisation you can use the auto
type, and when constructing from a DiscSetSurfaceData<T> the template argument can be automatically deduced.
As of Regina 7.3.1, this class no longer provides the iterator type aliases value_type, iterator_category, difference_type, pointer and reference. Instead you can access these through std::iterator_traits
.
unsigned long
. See the precondition below.__iter__()
, which returns a DiscSpecIterator; then DiscSpecIterator implements next()
, which either returns the next normal disc in the set or else throws a StopException
if there are no more discs to return.
|
inline |
Creates a new uninitialised iterator.
This iterator cannot be used or queried until either init() or the assignmemnt operator is called.
|
inline |
Creates a new iterator pointing to the first disc in the given disc set.
discSet | the disc set used to initialise this iterator. |
|
default |
Creates a new copy of the given iterator.
auto regina::DiscSpecIterator< TetData >::__next__ | ( | ) |
Returns the current DiscSpec and increments this iterator.
StopIteration | The iterator is already past-the-end when this function is called. |
|
inline |
Determines if this iterator is past-the-end.
true
if and only if this iterator is past-the-end.
|
inline |
Points this iterator to the first disc in the given disc set.
discSet | the disc set used to reinitialise this iterator. |
|
inline |
Determines if this and the given iterator are different.
Two iterators are considered equal if (i) they were constructed from the same DiscSetSurface object (not two different DiscSetSurface objects with identical contents), and (ii) they point to the same disc of the same tetrahedron.
other | the iterator to compare with this. |
true
if and only if this and the given iterator are equal.
|
inline |
Returns a reference to the disc pointed to by this iterator.
|
inline |
Preincrement operator.
|
inline |
Postincrement operator.
|
default |
Sets this to be a copy of the given iterator.
|
inline |
Determines if this and the given iterator are equal.
Two iterators are considered equal if (i) they were constructed from the same DiscSetSurface object (not two different DiscSetSurface objects with identical contents), and (ii) they point to the same disc of the same tetrahedron.
other | the iterator to compare with this. |
true
if and only if this and the given iterator are equal.