Main Page   Namespace List   Class Hierarchy   Compound List   File List   Header Files   Namespace Members   Compound Members   File Members  

arg::forward_iterator Class Reference

Proxy template class for wrapping forward iterators. More...

#include <arg_iterator.h>

Class diagram for arg::forward_iterator:

std::forward_iterator_tag

List of all members.


Public Members

template<typename iterator>  forward_iterator<iterator> (const iterator& it)
Construct a forward_iterator proxy onto a container of value_type from any iterator (onto a container of value_type) that meets the forward iterator requirements.

 forward_iterator (const bidirectional_iterator<value_type>& rhs)
value_type& operator * () const
value_type* operator-> () const
forward_iterator& operator++ ()
forward_iterator operator++ (int)
bool equals (const forward_iterator& rhs) const
Used to implement equivalance operators.


Detailed Description

template<typename value_type> class arg::forward_iterator

Proxy template class for wrapping forward iterators.

These allow a class interface to be defined without either:

Note that MSVC5 has some serious problems compiling and using this class (see number of _MSC_VER == 1100 frigs in the test harness).

All methods support the strong exception safety guarantee with the proviso that the wrapped iterator must have a non-throwing destructor.

Author(s):
alan@octopull.co.uk

Member Function Documentation

template<typename value_type>
template<typename iterator>
arg::forward_iterator<value_type>::forward_iterator<value_type> (const iterator & it)

Construct a forward_iterator proxy onto a container of value_type from any iterator (onto a container of value_type) that meets the forward iterator requirements.

template<typename value_type>
arg::forward_iterator<value_type>::forward_iterator<value_type> (const bidirectional_iterator<value_type>& rhs)

template<typename value_type>
value_type & arg::forward_iterator<value_type>::operator * () const [inline]

template<typename value_type>
value_type * arg::forward_iterator<value_type>::operator-> () const [inline]

template<typename value_type>
forward_iterator<value_type> & arg::forward_iterator<value_type>::operator++ () [inline]

template<typename value_type>
forward_iterator<value_type> arg::forward_iterator<value_type>::operator++ (int) [inline]

template<typename value_type>
bool arg::forward_iterator<value_type>::equals (const forward_iterator<value_type> & rhs) const [inline]

Used to implement equivalance operators.


The documentation for this class was generated from the following file:
Copyright 1999-2000 Alan Griffiths