Regina Calculation Engine
|
A forward iterator used for running through all normal discs in a normal surface.
More...
#include <surfaces/disc.h>
Public Member Functions | |
DiscSpecIterator () | |
Creates a new uninitialised iterator. More... | |
DiscSpecIterator (const DiscSetSurface &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 DiscSetSurface &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... | |
Protected Attributes | |
const DiscSetSurface * | internalDiscSet |
The disc set through which we are iterating. More... | |
DiscSpec | current |
The disc currently pointed to. More... | |
Friends | |
class | DiscSetSurface |
A forward iterator used for running through all normal discs in a normal surface.
This header also specialises std::iterator_traits for this iterator class.
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.