Walks over a container as if it were circular. The container must have the following members defined: More...
Public Member Functions | |
Circulator ()=default | |
Default construct. More... | |
Circulator (Container &obj) | |
Construct from begin/end of a container. More... | |
Circulator (const typename Container::iterator &begin, const typename Container::iterator &end) | |
Construct from two iterators. More... | |
Circulator (const Circulator< Container > &rhs)=default | |
Copy construct. More... | |
Circulator< Container > & | operator= (const Circulator< Container > &rhs)=default |
Copy assignment. More... | |
Public Member Functions inherited from CirculatorIters< Container, false > | |
CirculatorIters () | |
Default construct. More... | |
CirculatorIters (const iterator &begin, const iterator &end) | |
Construct from begin/end iterators. More... | |
CirculatorIters (const CirculatorIters< Container, Const > &rhs) | |
Copy construct. More... | |
bool | empty () const |
True if begin/end iterators are identical. More... | |
size_type | size () const |
Return the range of the iterator pair. More... | |
difference_type | nRotations () const |
The distance between the iterator and the fulcrum. More... | |
bool | circulate (const CirculatorBase::direction dir=CirculatorBase::NONE) |
Circulate around the list in the given direction. More... | |
void | setFulcrumToIterator () |
Set the fulcrum to the current position of the iterator. More... | |
void | setIteratorToFulcrum () |
Set the iterator to the current position of the fulcrum. More... | |
reference | curr () const |
Dereference the current iterator. More... | |
reference | next () const |
Dereference the next iterator. More... | |
reference | prev () const |
Dereference the previous iterator. More... | |
void | operator= (const CirculatorIters< Container, Const > &rhs) |
Assignment operator for circulators operating on the same container type. More... | |
CirculatorIters< Container, Const > & | operator++ () |
Prefix increment the iterator. More... | |
CirculatorIters< Container, Const > | operator++ (int) |
Postfix increment the iterator. More... | |
CirculatorIters< Container, Const > & | operator-- () |
Prefix decrement the iterator. More... | |
CirculatorIters< Container, Const > | operator-- (int) |
Postfix decrement the iterator. More... | |
bool | operator== (const CirculatorIters< Container, Const > &) const |
Check for equality of this iterator with another iterator that operate on the same container type. More... | |
bool | operator!= (const CirculatorIters< Container, Const > &) const |
Check for inequality of this iterator with another iterator that operate on the same container type. More... | |
reference | operator* () const |
Dereference the iterator. Same as curr() More... | |
reference | operator() () const |
Dereference the iterator. Same as curr() More... | |
difference_type | operator- (const CirculatorIters< Container, Const > &) const |
Return the difference between this iterator and another iterator that operate on the same container type. More... | |
Public Member Functions inherited from CirculatorBase | |
CirculatorBase ()=default | |
Default construct. More... | |
Additional Inherited Members | |
Public Types inherited from CirculatorIters< Container, false > | |
using | size_type = typename Container::size_type |
The type that can represent the size of Container. More... | |
using | difference_type = typename Container::difference_type |
The type that represents difference between iterator objects. More... | |
using | iterator = typename std::conditional< Const, typename Container::const_iterator, typename Container::iterator >::type |
The container iterator type (const/non-const) More... | |
using | reference = typename std::conditional< Const, typename Container::const_reference, typename Container::reference >::type |
The reference type (const/non-const) More... | |
Public Types inherited from CirculatorBase | |
enum | direction { NONE, CLOCKWISE, ANTICLOCKWISE } |
Direction type enumeration. More... | |
Protected Member Functions inherited from CirculatorIters< Container, false > | |
bool | equal (const CirculatorIters< Container, Const > &rhs) |
Compare for equality. More... | |
void | increment () |
Move iterator forward. More... | |
void | decrement () |
Move iterator backward. More... | |
Walks over a container as if it were circular. The container must have the following members defined:
Examples
Definition at line 351 of file Circulator.H.
|
default |
Default construct.
|
inlineexplicit |
Construct from begin/end of a container.
Definition at line 367 of file Circulator.H.
|
inline |
Construct from two iterators.
Definition at line 376 of file Circulator.H.
|
default |
Copy construct.
|
default |
Copy assignment.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.