filtered_range Class Template Reference

#include <rangelib/filtered_range.hpp>

Inheritance diagram for filtered_range:

non_mutating_operator_adaptor

List of all members.


Detailed Description

template<typename R, typename P, typename RC = typename R::range_tag_type>
class rangelib::filtered_range< R, P, RC >

This class adapts an STL sequence instance into a Range.

Parameters:
R The range class
P The filter predicate
RC The range category tag type

Member Types

typedef R filtered_range_type
typedef P filter_predicate_type
typedef RC range_tag_type
typedef filtered_range< R, P, RC > class_type
 The type of this instantiation.
typedef filter_iterator
< iterator_base_type,
filter_predicate_type > 
iterator
 The mutating (non-const) iterator type.
typedef filter_iterator
< const_iterator_base_type,
filter_predicate_type > 
const_iterator
 The non-mutating (const) iterator type.
typedef select_first_type_if
< typename::stlsoft::typefixer::fixer_reference
< filtered_range_type,
HAS_MEMBER_REFERENCE >
::reference, typename
filtered_range_type::const_reference,
HAS_MEMBER_REFERENCE >::type 
reference
 The mutating (non-const) reference type.
typedef
filtered_range_type::const_reference 
const_reference
 The non-mutating (const) reference type.
typedef
filtered_range_type::value_type 
value_type
 The value type.

Public Member Functions

Construction
 filtered_range (filtered_range_type r, filter_predicate_type pr=filter_predicate_type())
 Constructs from a range and a predicate.
Notional Range methods
bool is_open () const
 Indicates whether the range is open.
reference current ()
 Returns the current value in the range.
const_reference current () const
 Returns the current value in the range.
class_typeadvance ()
 Advances the current position in the range.
Iterable Range methods
iterator begin ()
 Returns an iterator to the current position of the range.
iterator end ()
 Returns an iterator to the end of the range.
const_iterator begin () const
 Returns an iterator to the current position of the range.
const_iterator end () const
 Returns an iterator to the end of the range.

Member Typedef Documentation

typedef filtered_range<R, P, RC> class_type

The type of this instantiation.

Reimplemented from non_mutating_operator_adaptor.

typedef filter_iterator<iterator_base_type, filter_predicate_type> iterator

The mutating (non-const) iterator type.

typedef filter_iterator<const_iterator_base_type, filter_predicate_type> const_iterator

The non-mutating (const) iterator type.

typedef select_first_type_if< typename ::stlsoft::typefixer::fixer_reference<filtered_range_type, HAS_MEMBER_REFERENCE>::reference , typename filtered_range_type::const_reference , HAS_MEMBER_REFERENCE >::type reference

The mutating (non-const) reference type.

typedef filtered_range_type::const_reference const_reference

The non-mutating (const) reference type.

Reimplemented from non_mutating_operator_adaptor.

typedef filtered_range_type::value_type value_type

The value type.


Constructor & Destructor Documentation

filtered_range ( filtered_range_type  r,
filter_predicate_type  pr = filter_predicate_type() 
) [inline, explicit]

Constructs from a range and a predicate.

Parameters:
r The range whose values will be filtered
pr The predicate which will be used to filter the values of the range r


Member Function Documentation

bool is_open (  )  const [inline]

Indicates whether the range is open.

reference current (  )  [inline]

Returns the current value in the range.

References STLSOFT_ASSERT.

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.

iterator begin (  )  [inline]

Returns an iterator to the current position of the range.

iterator end (  )  [inline]

Returns an iterator to the end of the range.

const_iterator begin (  )  const [inline]

Returns an iterator to the current position of the range.

const_iterator end (  )  const [inline]

Returns an iterator to the end of the range.


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