Go to the documentation of this file.
75 template<
class ContainerType>
86 typename ContainerType::iterator
begin_;
89 typename ContainerType::iterator
end_;
92 typename ContainerType::iterator
iter_;
97 typename ContainerType::iterator
fulcrum_;
105 typedef typename ContainerType::value_type
value_type;
115 typedef typename ContainerType::iterator
iterator;
119 typedef typename ContainerType::reference
reference;
128 inline explicit Circulator(ContainerType& container);
bool operator==(const Circulator< ContainerType > &c) const
Check for equality of this iterator with another iterator that.
reference operator*() const
Dereference the iterator and return.
bool circulate(const CirculatorBase::direction dir=NONE)
Circulate around the list in the given direction.
ContainerType::size_type size_type
The type that can represent the size of ContainerType.
ContainerType::iterator fulcrum_
Iterator holding the location of the fulcrum (start and end) of.
void setFulcrumToIterator()
Set the fulcrum to the current position of the iterator.
Walks over a container as if it were circular. The container must have the following members defined:
Circulator< ContainerType > & operator++()
Prefix increment. Increments the iterator.
bool operator!=(const Circulator< ContainerType > &c) const
Check for inequality of this iterator with another iterator that.
ContainerType::difference_type difference_type
The type that can represent the difference between any two.
ContainerType::iterator iterator
Random access iterator for traversing ContainerType.
reference prev() const
Dereference the previous iterator and return.
void operator=(const Circulator< ContainerType > &)
Assignment operator for Circulators that operate on the same.
reference operator()() const
Dereference the iterator and return.
Circulator()
Construct null.
ContainerType::reference reference
Type that can be used for storing into.
graph_traits< Graph >::vertices_size_type size_type
ContainerType::iterator iter_
Random access iterator for traversing ContainerType.
reference next() const
Dereference the next iterator and return.
direction
Direction type enumeration.
difference_type nRotations() const
Return the distance between the iterator and the fulcrum. This is.
ContainerType::value_type value_type
Type of values ContainerType contains.
size_type size() const
Return the range of the iterator.
const dimensionedScalar c
Speed of light in a vacuum.
ContainerType::iterator end_
Iterator pointing to the end of the container.
Base class for circulators.
ContainerType::iterator begin_
Iterator pointing to the beginning of the container.
void setIteratorToFulcrum()
Set the iterator to the current position of the fulcrum.
Circulator< ContainerType > & operator--()
Prefix decrement. Decrements the iterator.