Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 >:

Public Types

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

Public Member Functions

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

Private Member Functions

void nextScan_ ()
 

Private Attributes

SpectrumIteratorType first_
 Iterator to the first scan of the map (needed to calculate the index) More...
 
SpectrumIteratorType current_scan_
 Iterator to the current spectrum. More...
 
SpectrumIteratorType end_scan_
 Past-the-end iterator of spectra. More...
 
PeakIteratorType current_peak_
 Iterator to the current peak. More...
 
PeakIteratorType end_peak_
 Past-the-end iterator of peaks in the current spectrum. More...
 
CoordinateType low_mz_
 low m/z boundary More...
 
CoordinateType high_mz_
 high m/z boundary More...
 
bool is_end_
 Flag that indicates that this iterator is the end iterator. More...
 

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

PeakIndex getPeakIndex ( ) const
inline
CoordinateType getRT ( ) const
inline
void nextScan_ ( )
inlineprivate
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++ ( )
inline
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_.

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

Member Data Documentation

PeakIteratorType current_peak_
private
SpectrumIteratorType current_scan_
private
PeakIteratorType end_peak_
private
SpectrumIteratorType end_scan_
private
SpectrumIteratorType first_
private
CoordinateType high_mz_
private
bool is_end_
private
CoordinateType low_mz_
private

OpenMS / TOPP release 2.0.0 Documentation generated on Sat May 16 2015 16:14:11 using doxygen 1.8.9.1