indexed_range Class Template Reference

#include <rangelib/indexed_range.hpp>

Inheritance diagram for indexed_range:

non_mutating_operator_adaptor

List of all members.


Detailed Description

template<class R, typename I = int>
class rangelib::indexed_range< R, I >

Adapts a range and provides an integral count alongside the range.

Parameters:
R The adapted range type
I The integer type

Public Types

Member Types
typedef R adapted_range_type
 The of the adapted range.
typedef I index_type
 The index type.
typedef R::range_tag_type range_tag_type
 The range tag type.
typedef R::value_type value_type
 The value type.
typedef R::const_reference const_reference
 The non-mutating (const) type.
typedef indexed_range< R, I > class_type
 The current instantiation of the type.

Public Member Functions

Construction
 indexed_range (R r, index_type index=0)
 Constructor.
Notional Range methods
bool is_open () const
 Indicates whether the range is open.
const_reference current () const
 Returns the current value in the range.
class_typeadvance ()
 Advances the current position in the range.
Iterable Range methods
index_type index () const

Member Typedef Documentation

typedef R adapted_range_type

The of the adapted range.

Reimplemented from non_mutating_operator_adaptor.

typedef I index_type

The index type.

typedef R::range_tag_type range_tag_type

The range tag type.

typedef R::value_type value_type

The value type.

typedef R::const_reference const_reference

The non-mutating (const) type.

Reimplemented from non_mutating_operator_adaptor.

typedef indexed_range<R, I> class_type

The current instantiation of the type.

Reimplemented from non_mutating_operator_adaptor.


Constructor & Destructor Documentation

indexed_range ( r,
index_type  index = 0 
) [inline, explicit]

Constructor.

Parameters:
r The range
index The initial index of the range


Member Function Documentation

bool is_open (  )  const [inline]

Indicates whether the range is open.

const_reference current (  )  const [inline]

Returns the current value in the range.

References STLSOFT_ASSERT.

class_type& advance (  )  [inline]

Advances the current position in the range.

References STLSOFT_MESSAGE_ASSERT.


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

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