claw::graph< S, A, Comp >::graph_vertex_iterator Class Reference

Iterator on the graph's vertices. More...

#include <graph.hpp>

List of all members.

Public Types

typedef const vertex_type value_type
typedef const vertex_typereference
typedef const vertex_type *const pointer
typedef ptrdiff_t difference_type
typedef
std::bidirectional_iterator_tag 
iterator_category

Public Member Functions

 graph_vertex_iterator ()
 Constructor of the graph_vertex_iterator class.
graph_vertex_iteratoroperator++ ()
 Preincrement.
graph_vertex_iterator operator++ (int)
 Postincrement.
graph_vertex_iteratoroperator-- ()
 Predecrement.
graph_vertex_iterator operator-- (int)
 Postdecrement.
reference operator* () const
 Dereference.
pointer operator-> () const
 Reference.
bool operator== (const graph_vertex_iterator &it) const
 Equality.
bool operator!= (const graph_vertex_iterator &it) const
 Difference.

Private Member Functions

 graph_vertex_iterator (typename graph_content::const_iterator it)
 Constructor with an iterator on graph class data.

Private Attributes

graph_content::const_iterator m_iterator
 Iterator on the list of vertex.

Friends

class graph< vertex_type, edge_type, vertex_compare >

Detailed Description

template<class S, class A = meta::no_type, class Comp = std::less<S>>
class claw::graph< S, A, Comp >::graph_vertex_iterator

Iterator on the graph's vertices.

Definition at line 104 of file graph.hpp.


Member Typedef Documentation

template<class S, class A = meta::no_type, class Comp = std::less<S>>
typedef ptrdiff_t claw::graph< S, A, Comp >::graph_vertex_iterator::difference_type

Definition at line 112 of file graph.hpp.

template<class S, class A = meta::no_type, class Comp = std::less<S>>
typedef std::bidirectional_iterator_tag claw::graph< S, A, Comp >::graph_vertex_iterator::iterator_category

Definition at line 114 of file graph.hpp.

template<class S, class A = meta::no_type, class Comp = std::less<S>>
typedef const vertex_type* const claw::graph< S, A, Comp >::graph_vertex_iterator::pointer

Definition at line 111 of file graph.hpp.

template<class S, class A = meta::no_type, class Comp = std::less<S>>
typedef const vertex_type& claw::graph< S, A, Comp >::graph_vertex_iterator::reference

Definition at line 110 of file graph.hpp.

template<class S, class A = meta::no_type, class Comp = std::less<S>>
typedef const vertex_type claw::graph< S, A, Comp >::graph_vertex_iterator::value_type

Definition at line 109 of file graph.hpp.


Constructor & Destructor Documentation

template<class S , class A , class Comp >
claw::graph< S, A, Comp >::graph_vertex_iterator::graph_vertex_iterator (  )  [inline]

Constructor of the graph_vertex_iterator class.

Definition at line 82 of file graph.tpp.

00083 {
00084 
00085 } // graph_vertex_iterator() [constructor]

template<class S , class A , class Comp >
claw::graph< S, A, Comp >::graph_vertex_iterator::graph_vertex_iterator ( typename graph_content::const_iterator  it  )  [inline, explicit, private]

Constructor with an iterator on graph class data.

Parameters:
it Iterator where scan starts.

Definition at line 198 of file graph.tpp.

00199   : m_iterator(it)
00200 {
00201   
00202 } // graph_vertex_iterator() [constructor on an iterator]


Member Function Documentation

template<class S , class A , class Comp >
bool claw::graph< S, A, Comp >::graph_vertex_iterator::operator!= ( const graph_vertex_iterator it  )  const [inline]

Difference.

Parameters:
it Iterator to compare to.
Precondition:
Iterator and it are not at the end of their respective containers.

Definition at line 186 of file graph.tpp.

00187 {
00188   return m_iterator != it.m_iterator;
00189 } // operator!=()

template<class S , class A , class Comp >
claw::graph< S, A, Comp >::graph_vertex_iterator::reference claw::graph< S, A, Comp >::graph_vertex_iterator::operator* (  )  const [inline]

Dereference.

Precondition:
Iterator is not at the end of the container.

Definition at line 148 of file graph.tpp.

References claw::graph< S, A, Comp >::graph_vertex_iterator::m_iterator.

00149 {
00150   return m_iterator->first;
00151 } // operator*()

template<class S , class A , class Comp >
claw::graph< S, A, Comp >::graph_vertex_iterator claw::graph< S, A, Comp >::graph_vertex_iterator::operator++ ( int   )  [inline]

Postincrement.

Precondition:
Iterator is not at the end of the container.

Definition at line 107 of file graph.tpp.

References claw::graph< S, A, Comp >::graph_vertex_iterator::m_iterator.

00108 {
00109   graph_vertex_iterator it_tmp(*this);
00110   m_iterator++;
00111   return *this;
00112 } // operator++() [postincrement]

template<class S , class A , class Comp >
claw::graph< S, A, Comp >::graph_vertex_iterator & claw::graph< S, A, Comp >::graph_vertex_iterator::operator++ (  )  [inline]

Preincrement.

Precondition:
Iterator is not at the end of the container.

Definition at line 94 of file graph.tpp.

References claw::graph< S, A, Comp >::graph_vertex_iterator::m_iterator.

00095 {
00096   ++m_iterator;
00097   return *this;
00098 } // operator++() [preincrement]

template<class S , class A , class Comp >
claw::graph< S, A, Comp >::graph_vertex_iterator claw::graph< S, A, Comp >::graph_vertex_iterator::operator-- ( int   )  [inline]

Postdecrement.

Precondition:
Iterator is not at the begining of the container.

Definition at line 134 of file graph.tpp.

References claw::graph< S, A, Comp >::graph_vertex_iterator::m_iterator.

00135 {
00136   graph_vertex_iterator it_tmp(*this);
00137   m_iterator--;
00138   return it_tmp;
00139 } // operator--() [postdecrement]

template<class S , class A , class Comp >
claw::graph< S, A, Comp >::graph_vertex_iterator & claw::graph< S, A, Comp >::graph_vertex_iterator::operator-- (  )  [inline]

Predecrement.

Precondition:
Iterator is not at the begining of the container.

Definition at line 121 of file graph.tpp.

References claw::graph< S, A, Comp >::graph_vertex_iterator::m_iterator.

00122 {
00123   --m_iterator;
00124   return *this;
00125 } // operator--() [predecrement]

template<class S , class A , class Comp >
claw::graph< S, A, Comp >::graph_vertex_iterator::pointer claw::graph< S, A, Comp >::graph_vertex_iterator::operator-> (  )  const [inline]

Reference.

Precondition:
Iterator is not at the end of the container.

Definition at line 160 of file graph.tpp.

References claw::graph< S, A, Comp >::graph_vertex_iterator::m_iterator.

00161 {
00162   return &(m_iterator->first);
00163 } // operator->()

template<class S , class A , class Comp >
bool claw::graph< S, A, Comp >::graph_vertex_iterator::operator== ( const graph_vertex_iterator it  )  const [inline]

Equality.

Parameters:
it Iterator to compare to.
Precondition:
Iterator and it are not at the end of their respective containers.

Definition at line 173 of file graph.tpp.

00174 {
00175   return m_iterator == it.m_iterator;
00176 } // operator==()


Friends And Related Function Documentation

template<class S, class A = meta::no_type, class Comp = std::less<S>>
friend class graph< vertex_type, edge_type, vertex_compare > [friend]

Definition at line 106 of file graph.hpp.


Member Data Documentation

template<class S, class A = meta::no_type, class Comp = std::less<S>>
graph_content::const_iterator claw::graph< S, A, Comp >::graph_vertex_iterator::m_iterator [private]

The documentation for this class was generated from the following files:

Generated on 9 Nov 2009 for CLAW Library (a C++ Library Absolutely Wonderful) by  doxygen 1.6.1