STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

indirect_range_adaptor Class Template Reference
[Range Adaptors]

Runtime adaptor that adapts a Basic Indirect range to an Indirect range. More...

#include <basic_indirect_range_adaptor.hpp>

Inheritance diagram for indirect_range_adaptor:

indirect_range_tag basic_indirect_range_tag List of all members.

Public Methods

 indirect_range_adaptor (range_type r)
 Constructor.

template<typename T> T accumulate (T val) const
 Returns the sum of val and the value of each element in the range.

template<typename T, typename P> T accumulate (T val, P pr) const
 Returns the sum of val and the value of pr applied to each element in the range.

template<typename O> O copy (O o) const
 Copies each element in the range to the output iterator o.

template<typename T> size_t count (T const &val) const
 Returns the number of elements in the range that evaluate equal to val.

template<typename P> size_t count_if (P pr) const
 Returns the number of elements in the range matching the predicate pr.

ptrdiff_t distance () const
 Returns the number of elements in the range.

template<typename F> F for_each (F f)
 Applied the functor f to each element in the array.

template<typename T> ss_bool_t exists (T const &val) const
 Returns true if the element val exists in the range.

template<typename P> ss_bool_t exists_if (P pr) const
 Returns true if any element in given predicate pr evaluates true any element in the range.

template<typename P, typename T> ss_bool_t exists_if (P pr, T &result) const
 Returns true if any element in given predicate pr evaluates true any element in the range, and places the matching element in result.

value_type max_element () const
 Returns the value of the maximum elements in the range.

template<typename P> value_type max_element (P pr) const
 Returns the value of the maximum elements in the range, as determined by the comparand predicate pr.

value_type min_element () const
 Returns the value of the minimum elements in the range.

template<typename P> value_type min_element (P pr) const
 Returns the value of the minimum elements in the range, as determined by the comparand predicate pr.


Detailed Description

template<typename R>
class stlsoft::indirect_range_adaptor< R >

Runtime adaptor that adapts a Basic Indirect range to an Indirect range.


Constructor & Destructor Documentation

indirect_range_adaptor range_type    r [inline]
 

Constructor.

Parameters:
r  The Basic Indirect range instance to be adapted


Member Function Documentation

T accumulate   val,
  pr
const [inline]
 

Returns the sum of val and the value of pr applied to each element in the range.

T accumulate   val const [inline]
 

Returns the sum of val and the value of each element in the range.

O copy   o const [inline]
 

Copies each element in the range to the output iterator o.

size_t count T const &    val const [inline]
 

Returns the number of elements in the range that evaluate equal to val.

size_t count_if   pr const [inline]
 

Returns the number of elements in the range matching the predicate pr.

ptrdiff_t distance   const [inline]
 

Returns the number of elements in the range.

ss_bool_t exists T const &    val const [inline]
 

Returns true if the element val exists in the range.

ss_bool_t exists_if   pr,
T &    result
const [inline]
 

Returns true if any element in given predicate pr evaluates true any element in the range, and places the matching element in result.

ss_bool_t exists_if   pr const [inline]
 

Returns true if any element in given predicate pr evaluates true any element in the range.

F for_each   f [inline]
 

Applied the functor f to each element in the array.

value_type max_element   pr const [inline]
 

Returns the value of the maximum elements in the range, as determined by the comparand predicate pr.

value_type max_element   const [inline]
 

Returns the value of the maximum elements in the range.

value_type min_element   pr const [inline]
 

Returns the value of the minimum elements in the range, as determined by the comparand predicate pr.

value_type min_element   const [inline]
 

Returns the value of the minimum elements in the range.


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

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004