util::CircIterator< ForwardIterator > Class Template Reference

Creates a circular iterator from a range of forward iterators. More...

#include <util/circ_iterator.h>

List of all members.

Public Types

typedef ForwardIterator base_type
typedef std::iterator_traits
< ForwardIterator >
::difference_type 
difference_type
typedef std::forward_iterator_tag iterator_category
typedef std::iterator_traits
< ForwardIterator >::pointer 
pointer
typedef std::iterator_traits
< ForwardIterator >::reference 
reference
typedef std::iterator_traits
< ForwardIterator >
::value_type 
value_type

Public Member Functions

base_type base () const
 CircIterator (const CircIterator &copy)
 CircIterator (const CircIterator &copy, const ForwardIterator &new_cur)
 Copy the iterator, but change the current position to somewhere else.
 CircIterator (const ForwardIterator &f, const ForwardIterator &l)
 Creates an 'end' iterator.
 CircIterator (const ForwardIterator &f, const ForwardIterator &l, const ForwardIterator &c)
 Create an iterator within a range, starting at c.
CircIterator end () const
 Create the end iterator from a current one.
bool isInitIterator (const base_type &cmp) const
 Check if the base iterator given as argument correspond to the position this circular iterator starts from.
bool operator!= (const CircIterator &other) const
bool operator!= (const ForwardIterator &other) const
reference operator* ()
CircIterator operator++ (int)
CircIteratoroperator++ ()
pointer operator-> ()
bool operator== (const CircIterator &other) const
bool operator== (const ForwardIterator &other) const

Protected Attributes

ForwardIterator cur
ForwardIterator first
ForwardIterator init
ForwardIterator last

Detailed Description

template<typename ForwardIterator>
class util::CircIterator< ForwardIterator >

Creates a circular iterator from a range of forward iterators.

Definition at line 15 of file circ_iterator.h.


Constructor & Destructor Documentation

template<typename ForwardIterator >
util::CircIterator< ForwardIterator >::CircIterator ( const ForwardIterator &  f,
const ForwardIterator &  l,
const ForwardIterator &  c 
) [inline]

Create an iterator within a range, starting at c.

Definition at line 30 of file circ_iterator.h.

00031       : first(f)
00032       , last(l)
00033       , init(c)
00034       , cur(c)
00035     {
00036     }

template<typename ForwardIterator >
util::CircIterator< ForwardIterator >::CircIterator ( const ForwardIterator &  f,
const ForwardIterator &  l 
) [inline]

Creates an 'end' iterator.

Definition at line 41 of file circ_iterator.h.

00042       : first(f)
00043       , last(l)
00044       , init(l)
00045       , cur(l)
00046     {
00047     }

template<typename ForwardIterator >
util::CircIterator< ForwardIterator >::CircIterator ( const CircIterator< ForwardIterator > &  copy,
const ForwardIterator &  new_cur 
) [inline]

Copy the iterator, but change the current position to somewhere else.

Definition at line 52 of file circ_iterator.h.

00053       : first(copy.first)
00054       , last(copy.last)
00055       , init(copy.init)
00056       , cur(new_cur)
00057     {}


Member Function Documentation

template<typename ForwardIterator >
CircIterator util::CircIterator< ForwardIterator >::end (  )  const [inline]

Create the end iterator from a current one.

Definition at line 122 of file circ_iterator.h.

Referenced by graph::VVGraph< VertexContent, EdgeContent, compact >::eraseEdge(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge().

00123     {
00124       return CircIterator(first, last);
00125     }

template<typename ForwardIterator >
bool util::CircIterator< ForwardIterator >::isInitIterator ( const base_type &  cmp  )  const [inline]

Check if the base iterator given as argument correspond to the position this circular iterator starts from.

Definition at line 114 of file circ_iterator.h.

Referenced by graph::VVGraph< VertexContent, EdgeContent, compact >::eraseEdge(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge().

00115     {
00116       return cmp == init;
00117     }


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:38:25 2013 for VVE by  doxygen 1.6.3