Walks over a container as if it were circular. The container must have the following members defined: More...
#include <Circulator.H>


Public Member Functions | |
| Circulator ()=default | |
| Default construct. | |
| Circulator (Container &obj) | |
| Construct from begin/end of a container. | |
| Circulator (const typename Container::iterator &begin, const typename Container::iterator &end) | |
| Construct from two iterators. | |
| Circulator (const Circulator< Container > &rhs)=default | |
| Copy construct. | |
| Circulator< Container > & | operator= (const Circulator< Container > &rhs)=default |
| Copy assignment. | |
| Public Member Functions inherited from CirculatorIters< Container, false > | |
| CirculatorIters () | |
| Default construct. | |
| bool | empty () const |
| True if begin/end iterators are identical. | |
| size_type | size () const |
| Return the range of the iterator pair. | |
| difference_type | nRotations () const |
| The distance between the iterator and the fulcrum. | |
| bool | circulate (const CirculatorBase::direction dir=CirculatorBase::NONE) |
| Circulate around the list in the given direction. | |
| void | setFulcrumToIterator () |
| Set the fulcrum to the current position of the iterator. | |
| void | setIteratorToFulcrum () |
| Set the iterator to the current position of the fulcrum. | |
| reference | curr () const |
| Dereference the current iterator. | |
| reference | next () const |
| Dereference the next iterator. | |
| reference | prev () const |
| Dereference the previous iterator. | |
| void | operator= (const CirculatorIters< Container, Const > &rhs) |
| Assignment operator for circulators operating on the same container type. | |
| CirculatorIters< Container, Const > & | operator++ () |
| Prefix increment the iterator. | |
| CirculatorIters< Container, Const > & | operator-- () |
| Prefix decrement the iterator. | |
| bool | operator== (const CirculatorIters< Container, Const > &) const |
| Check for equality of this iterator with another iterator that operate on the same container type. | |
| bool | operator!= (const CirculatorIters< Container, Const > &) const |
| Check for inequality of this iterator with another iterator that operate on the same container type. | |
| reference | operator* () const |
| Dereference the iterator. Same as curr(). | |
| reference | operator() () const |
| Dereference the iterator. Same as curr(). | |
| difference_type | operator- (const CirculatorIters< Container, Const > &) const |
| Return the difference between this iterator and another iterator that operate on the same container type. | |
| Public Member Functions inherited from CirculatorBase | |
| CirculatorBase ()=default | |
| Default construct. | |
Additional Inherited Members | |
| Public Types inherited from CirculatorIters< Container, false > | |
| using | size_type |
| The type that can represent the size of Container. | |
| using | difference_type |
| The type that represents difference between iterator objects. | |
| using | iterator |
| The container iterator type (const/non-const). | |
| using | reference |
| The reference type (const/non-const). | |
| 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. | |
| void | increment () |
| Move iterator forward. | |
| void | decrement () |
| Move iterator backward. | |
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.
Referenced by Circulator(), and operator=().

|
inlineexplicit |
Construct from begin/end of a container.
Definition at line 367 of file Circulator.H.
References CirculatorIters< Container, false >::CirculatorIters().

|
inline |
Construct from two iterators.
Definition at line 375 of file Circulator.H.
References CirculatorIters< Container, false >::CirculatorIters().

|
default |
|
default |
Copy assignment.
References Circulator(), and Foam::rhs().
