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