transform_iterator Class Template Reference
[Iterators Library]

#include <stlsoft/iterators/transform_iterator.hpp>

List of all members.


Detailed Description

template<typename I, typename F>
class stlsoft::transform_iterator< I, F >

An iterator adaptor that uses a predicate to filter desired values from the iterator's underlying sequence.

I The iterator to transform F The unary function that will be used to transform the values

Note:
The iterator provides the same iterator category as the base iterator type I (which is mapped to the member type iterator_type), but it always provides By-Value Temporary (BVT) element references, so its pointer and reference member types are always void.

Public Types

Member Types
typedef I iterator_type
 The iterator to transform.
typedef F transform_function_type
 The unary function that will be used to transform the values.
typedef
transform_function_type::result_type 
value_type
 The value type.
typedef std::iterator_traits< I > traits_type
typedef
traits_type::iterator_category 
iterator_category
 The iterator category.
typedef
traits_type::difference_type 
difference_type
 The difference type.
typedef transform_iterator< I, F > class_type
 The parameterisation of the type.
typedef void pointer
 The mutating (non-const) pointer type.
typedef void reference
 The mutating (non-const) reference type.
typedef value_type effective_reference
 The effective mutating (non-const) reference type.
typedef const value_type effective_const_reference
 The effective mutating (non-const) reference type.

Public Member Functions

Construction
 transform_iterator (iterator_type it, transform_function_type pr)
 transform_iterator ()
iterator_type base () const
 A copy of the base iterator.
Accessors
effective_reference operator* ()
effective_const_reference operator* () const
Forward Iterator methods
class_typeoperator++ ()
class_type operator++ (int)
Bidirectional Iterator methods
class_typeoperator-- ()
class_type operator-- (int)
Random Access Iterator methods
class_typeoperator+= (difference_type d)
class_typeoperator-= (difference_type d)
effective_reference operator[] (difference_type index)
effective_const_reference operator[] (difference_type index) const
Comparison
bool equal (class_type const &rhs) const
 Evaluates whether this and rhs are equivalent.
ss_sint_t compare (class_type const &rhs) const
 Compares this with the given string.
difference_type distance (class_type const &rhs) const
 Calculate the distance between this and rhs.

Classes

struct  transform_iterator_is_BVT_so_no_member_selection_operators

Member Typedef Documentation

typedef I iterator_type

The iterator to transform.

The unary function that will be used to transform the values.

typedef transform_function_type::result_type value_type

The value type.

typedef traits_type::iterator_category iterator_category

The iterator category.

typedef traits_type::difference_type difference_type

The difference type.

The parameterisation of the type.

typedef void pointer

The mutating (non-const) pointer type.

Note:
Since a transforming iterator must have the By-Value Temporary element reference category, the pointer member must be void.

typedef void reference

The mutating (non-const) reference type.

Note:
Since a transforming iterator must have the By-Value Temporary element reference category, the reference member must be void.

The effective mutating (non-const) reference type.

Note:
Since a transforming iterator must have the By-Value Temporary element reference category, this member must be value_type.

The effective mutating (non-const) reference type.

Note:
Since a transforming iterator must have the By-Value Temporary element reference category, this member must be const value_type.


Member Function Documentation

iterator_type base (  )  const [inline]

A copy of the base iterator.

bool equal ( class_type const &  rhs  )  const [inline]

Evaluates whether this and rhs are equivalent.

References transform_iterator::m_it.

ss_sint_t compare ( class_type const &  rhs  )  const [inline]

Compares this with the given string.

difference_type distance ( class_type const &  rhs  )  const [inline]

Calculate the distance between this and rhs.


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

Generated on Thu Jun 10 08:58:48 2010 for STLSoft by  doxygen 1.5.6