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