Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

AreaIterator Class Template Reference

#include <OpenMS/KERNEL/AreaIterator.h>

Inheritance diagram for AreaIterator:

iterator

List of all members.


Detailed Description

template<class ValueT, class ReferenceT, class PointerT, class SpectrumIteratorT, class PeakIteratorT>
class OpenMS::Internal::AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >

Forward iterator for an area of peaks in an experiment.

This iterator allows us to move through the data structure in a linear manner i.e. we don't need to jump to the next spectrum manually.

This iterator iterates over spectra with MS level 1 only!

Public Types

typedef DoubleReal CoordinateType
typedef ValueT PeakType
typedef SpectrumIteratorT SpectrumIteratorType
typedef PeakIteratorT PeakIteratorType
Typedefs for STL compliance
typedef ValueT value_type
 The iterator's value type.
typedef ReferenceT reference
 The reference type as returned by operator*().
typedef PointerT pointer
 The pointer type as returned by operator->().
typedef unsigned int difference_type
 The difference type.

Public Member Functions

 AreaIterator (SpectrumIteratorType begin, SpectrumIteratorType end, CoordinateType low_mz, CoordinateType high_mz)
 Constructor for the begin iterator.
 AreaIterator (SpectrumIteratorType spectrum_end, PeakIteratorType peak_end)
 Constructor for the end iterator.
 ~AreaIterator ()
 Destructor.
 AreaIterator (const AreaIterator &rhs)
 Copy constructor.
AreaIteratoroperator= (const AreaIterator &rhs)
 Assignment operator.
bool operator== (const AreaIterator &rhs) const
 Test for equality.
bool operator!= (const AreaIterator &rhs) const
 Test for inequality.
AreaIteratoroperator++ ()
 Step forward by one (prefix operator).
AreaIterator operator++ (int)
 Step forward by one (postfix operator).
reference operator * () const
 Dereferencing of this pointer yields the underlying peak.
pointer operator-> () const
 Dereferencing of this pointer yields the underlying peak.
CoordinateType getRT () const
 returns the retention time of the current scan

Private Member Functions

void nextScan_ ()
 AreaIterator ()

Private Attributes

SpectrumIteratorType current_scan_
 Iterator to the current spectrum.
SpectrumIteratorType end_scan_
 Past-the-end iterator of spectra.
PeakIteratorType current_peak_
 Iterator to the current peak.
PeakIteratorType end_peak_
 Past-the-end iterator of peaks in the current spectrum.
CoordinateType low_mz_
 low m/z boundary
CoordinateType high_mz_
 high m/z boundary


Member Typedef Documentation

typedef DoubleReal CoordinateType

typedef ValueT PeakType

typedef SpectrumIteratorT SpectrumIteratorType

typedef PeakIteratorT PeakIteratorType

typedef ValueT value_type

The iterator's value type.

typedef ReferenceT reference

The reference type as returned by operator*().

typedef PointerT pointer

The pointer type as returned by operator->().

typedef unsigned int difference_type

The difference type.


Constructor & Destructor Documentation

AreaIterator ( SpectrumIteratorType  begin,
SpectrumIteratorType  end,
CoordinateType  low_mz,
CoordinateType  high_mz 
) [inline]

Constructor for the begin iterator.

AreaIterator ( SpectrumIteratorType  spectrum_end,
PeakIteratorType  peak_end 
) [inline]

Constructor for the end iterator.

~AreaIterator (  )  [inline]

Destructor.

AreaIterator ( const AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT > &  rhs  )  [inline]

Copy constructor.

AreaIterator (  )  [private]


Member Function Documentation

AreaIterator& operator= ( const AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT > &  rhs  )  [inline]

Assignment operator.

bool operator== ( const AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT > &  rhs  )  const [inline]

Test for equality.

bool operator!= ( const AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT > &  rhs  )  const [inline]

Test for inequality.

AreaIterator& operator++ (  )  [inline]

Step forward by one (prefix operator).

AreaIterator operator++ ( int   )  [inline]

Step forward by one (postfix operator).

reference operator * (  )  const [inline]

Dereferencing of this pointer yields the underlying peak.

pointer operator-> (  )  const [inline]

Dereferencing of this pointer yields the underlying peak.

CoordinateType getRT (  )  const [inline]

returns the retention time of the current scan

void nextScan_ (  )  [inline, private]


Member Data Documentation

SpectrumIteratorType current_scan_ [private]

Iterator to the current spectrum.

SpectrumIteratorType end_scan_ [private]

Past-the-end iterator of spectra.

PeakIteratorType current_peak_ [private]

Iterator to the current peak.

PeakIteratorType end_peak_ [private]

Past-the-end iterator of peaks in the current spectrum.

CoordinateType low_mz_ [private]

low m/z boundary

CoordinateType high_mz_ [private]

high m/z boundary


The documentation for this class was generated from the following file:
Generated Tue Apr 1 15:36:49 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1