non_mutating_operator_adaptor Class Template Reference

#include <rangelib/operator_adaptors.hpp>

Inheritance diagram for non_mutating_operator_adaptor:

cstring_range filtered_range indexed_range

List of all members.


Detailed Description

template<typename R, typename T>
class rangelib::non_mutating_operator_adaptor< R, T >

This class is a reverse bolt-in, which provides non-mutating Range operators based on the method forms of its parameterising (and deriving) class.

Note:
Because this is a reverse bolt-in, R is an incomplete type at the time of the template parsing. Hence, we cannot deduce reference and const_reference from R. This is why the traits type is required in the form of the T parameter.

Range operators

 operator boolean_type () const
 Indicates whether the range is open.
const_reference operator* () const
 Returns the current value in the range.
adapted_range_typeoperator++ ()
 Advances the current position in the range.
adapted_range_type operator++ (int)
 Advances the current position in the range, returning a copy of the range prior to its being advanced.

Public Types

typedef R adapted_range_type
 The range type.
typedef T traits_type
 The traits type.
typedef
non_mutating_operator_adaptor
< R, T > 
class_type
 The type of this instantiation.
typedef
traits_type::const_reference 
const_reference
 The non-mutating (const) reference type.

Protected Member Functions

 non_mutating_operator_adaptor ()
 Default constructor.

Member Typedef Documentation

typedef R adapted_range_type

The range type.

Reimplemented in indexed_range.

typedef T traits_type

The traits type.

The type of this instantiation.

Reimplemented in cstring_range, filtered_range, and indexed_range.

typedef traits_type::const_reference const_reference

The non-mutating (const) reference type.

Reimplemented in cstring_range, filtered_range, and indexed_range.


Constructor & Destructor Documentation

non_mutating_operator_adaptor (  )  [inline, protected]

Default constructor.

This is defined protected to ensure that the adaptor may only be used as a base class, and not instantiated directly


Member Function Documentation

operator boolean_type (  )  const [inline]

Indicates whether the range is open.

const_reference operator* (  )  const [inline]

Returns the current value in the range.

adapted_range_type& operator++ (  )  [inline]

Advances the current position in the range.

adapted_range_type operator++ ( int   )  [inline]

Advances the current position in the range, returning a copy of the range prior to its being advanced.


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

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