NSCL DDAS  1.0
Support for XIA DDAS at the NSCL
 All Classes Namespaces Files Functions Variables Macros Pages
Public Types | Public Member Functions | List of all members
TrAnal::SumIterator< T > Class Template Reference

Summing iterator. More...

#include <SumIterator.hpp>

Inheritance diagram for TrAnal::SumIterator< T >:
TrAnal::AlgoIterator< T >

Public Types

typedef T value_type
 
typedef ptrdiff_t difference_type
 
typedef T * pointer
 
typedef T & reference
 
typedef std::input_iterator_tag iterator_category
 

Public Member Functions

 SumIterator (const TrRange< T > &range)
 
 SumIterator (const SumIterator &that)
 
SumIteratoroperator= (const SumIterator &that)
 
bool operator== (const SumIterator &that) const
 
bool operator!= (const SumIterator &that) const
 
virtual bool operator< (const TrIterator< T > &it) const
 Comparison operator. More...
 
bool operator< (const SumIterator &that) const
 
bool operator> (const SumIterator &that) const
 
bool operator<= (const SumIterator &that) const
 
bool operator>= (const SumIterator &that) const
 
virtual SumIteratoroperator++ ()
 Prefixed incrementation Supports ++x style incrementing. Default implementation does nothing. More...
 
SumIterator operator++ (int)
 
virtual double operator* () const
 Dereference operator. More...
 
virtual TrIterator< T > min_extent () const
 Min extent To implement the minimum iterator extent for the range This default implementation returns an iterator to address 0x0. More...
 
virtual TrIterator< T > max_extent () const
 Max extent To implement the maximum iterator extent for the range This default implementation returns an iterator to address 0x0. More...
 
- Public Member Functions inherited from TrAnal::AlgoIterator< T >
 AlgoIterator ()
 Default constructor.
 
 AlgoIterator (const AlgoIterator &)
 Copy constructor.
 
AlgoIteratoroperator= (const AlgoIterator &)
 Assignment operator.
 

Detailed Description

template<class T>
class TrAnal::SumIterator< T >

Summing iterator.

Implements the AlgoIterator interface but extends the functionality to provide richer comparisons.

The summing region is semi-inclusive, i.e. [low,high) . As a result, out-of-bounds can be reliable checked before attempting to access an invalid memory location.

Member Function Documentation

template<class T>
virtual TrIterator<T> TrAnal::SumIterator< T >::max_extent ( ) const
inlinevirtual

Max extent To implement the maximum iterator extent for the range This default implementation returns an iterator to address 0x0.

Returns
null iterator

Reimplemented from TrAnal::AlgoIterator< T >.

template<class T>
virtual TrIterator<T> TrAnal::SumIterator< T >::min_extent ( ) const
inlinevirtual

Min extent To implement the minimum iterator extent for the range This default implementation returns an iterator to address 0x0.

Returns
null iterator

Reimplemented from TrAnal::AlgoIterator< T >.

template<class T>
virtual double TrAnal::SumIterator< T >::operator* ( ) const
inlinevirtual

Dereference operator.

Returns
sum of values pointed to by the range [min_extent,max_extent)

Reimplemented from TrAnal::AlgoIterator< T >.

template<class T>
virtual SumIterator& TrAnal::SumIterator< T >::operator++ ( )
inlinevirtual

Prefixed incrementation Supports ++x style incrementing. Default implementation does nothing.

Returns
const reference to this

Reimplemented from TrAnal::AlgoIterator< T >.

template<class T>
virtual bool TrAnal::SumIterator< T >::operator< ( const TrIterator< T > &  it) const
inlinevirtual

Comparison operator.

Compares whether max_extent is less than the the argument.

Parameters
itthe iterator to compare to

Reimplemented from TrAnal::AlgoIterator< T >.


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