Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes

AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT > Class Template Reference

Forward iterator for an area of peaks in an experiment. More...

#include <OpenMS/KERNEL/AreaIterator.h>

Inheritance diagram for AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >:
iterator

List of all members.

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 first, SpectrumIteratorType begin, SpectrumIteratorType end, CoordinateType low_mz, CoordinateType high_mz)
 Constructor for the begin iterator.
 AreaIterator ()
 Default 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
PeakIndex getPeakIndex () const
 returns the PeakIndex corresponding to the current iterator position

Private Member Functions

void nextScan_ ()

Private Attributes

SpectrumIteratorType first_
 Iterator to the first scan of the map (needed to calculate the index).
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
bool is_end_
 Flag that indicates that this iterator is the end iterator.

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.

Note:
This iterator iterates over spectra with MS level 1 only!

Member Typedef Documentation

typedef unsigned int difference_type

The difference type.

typedef PeakIteratorT PeakIteratorType
typedef ValueT PeakType
typedef PointerT pointer

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

typedef ReferenceT reference

The reference type as returned by operator*().

typedef SpectrumIteratorT SpectrumIteratorType
typedef ValueT value_type

The iterator's value type.


Constructor & Destructor Documentation

AreaIterator (  )  [inline]

Default constructor (for the end iterator).

~AreaIterator (  )  [inline]

Destructor.

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

Copy constructor.


Member Function Documentation

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

Test for inequality.

reference operator* (  )  const [inline]

Dereferencing of this pointer yields the underlying peak.

References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::current_peak_.

AreaIterator operator++ ( int   )  [inline]

Step forward by one (postfix operator).

pointer operator-> (  )  const [inline]

Dereferencing of this pointer yields the underlying peak.

References AreaIterator< ValueT, ReferenceT, PointerT, SpectrumIteratorT, PeakIteratorT >::current_peak_.

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

Member Data Documentation


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:43:00 using doxygen 1.7.1