claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function > Class Template Reference

Base class for wrapped iterators, specialized for bidirectional iterators. More...

#include <iterator.hpp>

List of all members.

Public Types

typedef std::iterator_traits
< Iterator >::difference_type 
difference_type
typedef Value value_type
typedef value_typepointer
typedef value_typereference
typedef std::iterator_traits
< Iterator >
::iterator_category 
iterator_category
typedef
wrapped_iterator_by_category
< std::bidirectional_iterator_tag,
Value, Iterator, Function > 
self_type

Public Member Functions

 wrapped_iterator_by_category ()
 wrapped_iterator_by_category (const Iterator &it)
 wrapped_iterator_by_category (const Iterator &it, const Function &f)
self_typeoperator++ ()
self_type operator++ (int)
self_typeoperator-- ()
self_type operator-- (int)
reference operator* ()
pointer operator-> ()
bool operator== (const self_type &that) const
bool operator!= (const self_type &that) const
bool operator== (const Iterator &it) const
bool operator!= (const Iterator &it) const

Private Attributes

Iterator m_it
 The effective iterator.
Function m_fun
 The function applied to the pointed items.

Detailed Description

template<typename Value, typename Iterator, typename Function>
class claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >

Base class for wrapped iterators, specialized for bidirectional iterators.

Author:
Julien Jorge

Definition at line 119 of file iterator.hpp.


Member Typedef Documentation

template<typename Value , typename Iterator , typename Function >
typedef std::iterator_traits<Iterator>::difference_type claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::difference_type

Definition at line 124 of file iterator.hpp.

template<typename Value , typename Iterator , typename Function >
typedef std::iterator_traits<Iterator>::iterator_category claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::iterator_category

Definition at line 129 of file iterator.hpp.

template<typename Value , typename Iterator , typename Function >
typedef value_type* claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::pointer

Definition at line 126 of file iterator.hpp.

template<typename Value , typename Iterator , typename Function >
typedef value_type& claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::reference

Definition at line 127 of file iterator.hpp.

template<typename Value , typename Iterator , typename Function >
typedef wrapped_iterator_by_category<std::bidirectional_iterator_tag, Value, Iterator, Function> claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::self_type

Definition at line 133 of file iterator.hpp.

template<typename Value , typename Iterator , typename Function >
typedef Value claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::value_type

Definition at line 125 of file iterator.hpp.


Constructor & Destructor Documentation

template<typename Value , typename Iterator , typename Function >
claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::wrapped_iterator_by_category (  )  [inline]

Definition at line 136 of file iterator.hpp.

00136 {}

template<typename Value , typename Iterator , typename Function >
claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::wrapped_iterator_by_category ( const Iterator &  it  )  [inline]

Definition at line 137 of file iterator.hpp.

00138       : m_it(it)
00139     { }

template<typename Value , typename Iterator , typename Function >
claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::wrapped_iterator_by_category ( const Iterator &  it,
const Function &  f 
) [inline]

Definition at line 140 of file iterator.hpp.

00141       : m_it(it), m_fun(f)
00142     { }


Member Function Documentation

template<typename Value , typename Iterator , typename Function >
bool claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator!= ( const Iterator &  it  )  const [inline]

Definition at line 176 of file iterator.hpp.

00176 { return m_it != it; }

template<typename Value , typename Iterator , typename Function >
bool claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator!= ( const self_type that  )  const [inline]

Definition at line 174 of file iterator.hpp.

References m_it.

00174 { return m_it != that.m_it; }

template<typename Value , typename Iterator , typename Function >
reference claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator* (  )  [inline]

Definition at line 170 of file iterator.hpp.

00170 { return m_fun(*m_it); }

template<typename Value , typename Iterator , typename Function >
self_type claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator++ ( int   )  [inline]

Definition at line 150 of file iterator.hpp.

00151     {
00152       self_type tmp(*this);
00153       ++m_it;
00154       return tmp;
00155     }

template<typename Value , typename Iterator , typename Function >
self_type& claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator++ (  )  [inline]

Definition at line 144 of file iterator.hpp.

00145     {
00146       ++m_it;
00147       return *this;
00148     }

template<typename Value , typename Iterator , typename Function >
self_type claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator-- ( int   )  [inline]

Definition at line 163 of file iterator.hpp.

00164     {
00165       self_type tmp(*this);
00166       --m_it;
00167       return tmp;
00168     }

template<typename Value , typename Iterator , typename Function >
self_type& claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator-- (  )  [inline]

Definition at line 157 of file iterator.hpp.

00158     {
00159       --m_it;
00160       return *this;
00161     }

template<typename Value , typename Iterator , typename Function >
pointer claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator-> (  )  [inline]

Definition at line 171 of file iterator.hpp.

00171 { return &m_fun(*m_it); }

template<typename Value , typename Iterator , typename Function >
bool claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator== ( const Iterator &  it  )  const [inline]

Definition at line 175 of file iterator.hpp.

00175 { return m_it == it; }

template<typename Value , typename Iterator , typename Function >
bool claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::operator== ( const self_type that  )  const [inline]

Definition at line 173 of file iterator.hpp.

References m_it.

00173 { return m_it == that.m_it; }


Member Data Documentation

template<typename Value , typename Iterator , typename Function >
Function claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::m_fun [private]

The function applied to the pointed items.

Definition at line 183 of file iterator.hpp.

template<typename Value , typename Iterator , typename Function >
Iterator claw::wrapped_iterator_by_category< std::bidirectional_iterator_tag, Value, Iterator, Function >::m_it [private]

The effective iterator.

Definition at line 180 of file iterator.hpp.

Referenced by operator!=(), and operator==().


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

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