Regina 7.0 Calculation Engine
|
A forward iterator used for running through all normal discs in a normal surface. More...
#include <surface/disc.h>
Public Types | |
using | iterator_category = std::forward_iterator_tag |
Declares this to be a forward iterator type. More... | |
using | value_type = regina::DiscSpec |
Indicates what type the iterator points to. More... | |
using | difference_type = long |
The type obtained by subtracting iterators. More... | |
using | pointer = const regina::DiscSpec * |
A pointer to value_type. More... | |
using | reference = const regina::DiscSpec & |
The type obtained when dereferencing iterators. More... | |
Public Member Functions | |
DiscSpecIterator () | |
Creates a new uninitialised iterator. More... | |
DiscSpecIterator (const DiscSetSurfaceDataImpl< TetData > &discSet) | |
Creates a new iterator pointing to the first disc in the given disc set. More... | |
DiscSpecIterator (const DiscSpecIterator &)=default | |
Default copy constructor. More... | |
void | init (const DiscSetSurfaceDataImpl< TetData > &discSet) |
Points this iterator to the first disc in the given disc set. More... | |
DiscSpecIterator & | operator= (const DiscSpecIterator &)=default |
Default copy assignment operator. More... | |
DiscSpecIterator & | operator++ () |
Preincrement operator. More... | |
DiscSpecIterator | operator++ (int) |
Postincrement operator. More... | |
const DiscSpec & | operator* () const |
Returns a reference to the disc pointed to by this iterator. More... | |
bool | done () const |
Determines if this iterator is past-the-end. More... | |
bool | operator== (const DiscSpecIterator &other) const |
Determines if this and the given iterator are equal. More... | |
bool | operator!= (const DiscSpecIterator &other) const |
Determines if this and the given iterator are different. More... | |
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.
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. using regina::DiscSpecIterator< TetData >::difference_type = long |
The type obtained by subtracting iterators.
using regina::DiscSpecIterator< TetData >::iterator_category = std::forward_iterator_tag |
Declares this to be a forward iterator type.
using regina::DiscSpecIterator< TetData >::pointer = const regina::DiscSpec* |
A pointer to value_type.
using regina::DiscSpecIterator< TetData >::reference = const regina::DiscSpec& |
The type obtained when dereferencing iterators.
using regina::DiscSpecIterator< TetData >::value_type = regina::DiscSpec |
Indicates what type the iterator points to.
|
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 |
Default copy constructor.
|
inline |
Determines if this iterator is past-the-end.
next()
, which either returns the current DiscSpec and increments the iterator, or else throws a StopIteration
exception if the 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.
next()
, which either returns the current DiscSpec and increments the iterator, or else throws a StopIteration
exception if the iterator is past-the-end.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.
next()
, which either returns the current DiscSpec and increments the iterator, or else throws a StopIteration
exception if the iterator is past-the-end.
|
inline |
Preincrement operator.
next()
, which either returns the current DiscSpec and increments the iterator, or else throws a StopIteration
exception if the iterator is past-the-end.
|
inline |
Postincrement operator.
next()
, which either returns the current DiscSpec and increments the iterator, or else throws a StopIteration
exception if the iterator is past-the-end.
|
default |
Default copy assignment operator.
|
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.