processing_iterator Class Template Reference

#include <ql/Utilities/processingiterator.hpp>

List of all members.


Detailed Description

template<class Iterator, class UnaryFunction>
class QuantLib::processing_iterator< Iterator, UnaryFunction >

Iterator mapping a unary function to an underlying sequence.

This iterator advances an underlying iterator and returns the values obtained by applying a unary function to the values such iterator points to.

This class was implemented based on Christopher Baus and Thomas Becker, Custom Iterators for the STL, included in the proceedings of the First Workshop on C++ Template Programming, Erfurt, Germany, 2000 (http://www.oonumerics.org/tmpw00/)


Public Types

typedef UnaryFunction::result_type value_type
typedef const value_type * pointer
typedef const value_type & reference

Public Member Functions

 processing_iterator (const Iterator &, const UnaryFunction &)
Dereferencing
reference operator * () const
pointer operator-> () const
Random access
value_type operator[] (difference_type) const
Increment and decrement
processing_iteratoroperator++ ()
processing_iterator operator++ (int)
processing_iteratoroperator-- ()
processing_iterator operator-- (int)
processing_iteratoroperator+= (difference_type)
processing_iteratoroperator-= (difference_type)
processing_iterator operator+ (difference_type)
processing_iterator operator- (difference_type)
Difference
difference_type operator- (const processing_iterator< Iterator, UnaryFunction > &)
Comparisons
bool operator== (const processing_iterator< Iterator, UnaryFunction > &)
bool operator!= (const processing_iterator< Iterator, UnaryFunction > &)
bool operator< (const processing_iterator< Iterator, UnaryFunction > &)
bool operator> (const processing_iterator< Iterator, UnaryFunction > &)
bool operator<= (const processing_iterator< Iterator, UnaryFunction > &)
bool operator>= (const processing_iterator< Iterator, UnaryFunction > &)

Public Attributes

typedef< Iterator >::difference_type difference_type

Related Functions

(Note that these are not member functions.)

processing_iterator< Iterator,
UnaryFunction > 
make_processing_iterator (Iterator it, UnaryFunction p)
 helper function to create processing iterators


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen