OpenMS  2.8.0
Public Member Functions | List of all members
RangeManagerContainer< RangeBases > Class Template Referenceabstract

#include <OpenMS/KERNEL/RangeManager.h>

Inheritance diagram for RangeManagerContainer< RangeBases >:
[legend]
Collaboration diagram for RangeManagerContainer< RangeBases >:
[legend]

Public Member Functions

virtual void updateRanges ()=0
 
const RangeManager< RangeBases... > & getRange () const
 get range of current data (call updateRanges() before to ensure the range is accurate) More...
 
RangeManager< RangeBases... > & getRange ()
 get mutable range, provided for efficiency reasons (avoid updateRanges(), if only minor changes were made) More...
 
- Public Member Functions inherited from RangeManager< RangeBases... >
bool operator== (const RangeManager &rhs) const
 
bool assignUnsafe (const RangeManager< RangeBasesOther... > &rhs)
 
void assign (const RangeManager< RangeBasesOther... > &rhs)
 
bool extendUnsafe (const RangeManager< RangeBasesOther... > &rhs)
 
void extend (const RangeManager< RangeBasesOther... > &rhs)
 
void scaleBy (const double factor)
 calls RangeBase::scale() for each dimension More...
 
RangeBasegetRangeForDim (MSDim dim)
 obtain a range dimension at runtime using dim More...
 
HasRangeType hasRange () const
 is any/some/all dimension in this range populated? More...
 
bool containsAll (const RangeManager< RangeBasesOther... > &rhs) const
 
void clearRanges ()
 Resets all ranges. More...
 
void printRange (std::ostream &out) const
 print each dimension (base classes) to a stream More...
 

Additional Inherited Members

- Protected Member Functions inherited from RangeManager< RangeBases... >
void for_each_base_ (Visitor &&visitor)
 use fold expression to iterate over all RangeBases of RangeManager and apply a lambda (Visitor) for each one More...
 
void for_each_base_ (Visitor &&visitor) const
 .. and a const version More...
 
- Static Protected Member Functions inherited from RangeManager< RangeBases... >
static void static_for_each_base_ (Visitor &&visitor)
 use fold expression to iterate over all RangeBases of RangeManager and apply a lambda (Visitor) for each one (for static members) More...
 

Detailed Description

template<typename ... RangeBases>
class OpenMS::RangeManagerContainer< RangeBases >

use this class as a base class for containers, e.g. MSSpectrum. It forces them to implement 'updateRanges()' as a common interface and provides a 'getRange()' member which saves casting to a range type manually

Member Function Documentation

◆ getRange() [1/2]

RangeManager<RangeBases...>& getRange ( )
inline

get mutable range, provided for efficiency reasons (avoid updateRanges(), if only minor changes were made)

◆ getRange() [2/2]

const RangeManager<RangeBases...>& getRange ( ) const
inline

get range of current data (call updateRanges() before to ensure the range is accurate)

◆ updateRanges()

virtual void updateRanges ( )
pure virtual

implement this function to reflect the underlying data of the derived class (e.g. an MSSpectrum) Usually, call clearRanges() internally and then populate the dimensions.

Implemented in MSSpectrum, MSExperiment, MSChromatogram, FeatureMap, and ConsensusMap.