OpenMS  2.6.0
Public Types | Public Member Functions | Private Attributes | List of all members
WeightWrapper Class Reference

Encapsulated weight queries to simplify mono vs average weight computation. More...

#include <OpenMS/CHEMISTRY/WeightWrapper.h>

Collaboration diagram for WeightWrapper:
[legend]

Public Types

enum  WEIGHTMODE { AVERAGE = 0, MONO, SIZE_OF_WEIGHTMODE }
 

Public Member Functions

 WeightWrapper ()
 constructor More...
 
 WeightWrapper (const WEIGHTMODE weight_mode)
 constructor More...
 
virtual ~WeightWrapper ()
 destructor More...
 
 WeightWrapper (const WeightWrapper &source)
 copy constructor More...
 
void setWeightMode (const WEIGHTMODE mode)
 Sets the weight mode (MONO or AVERAGE) More...
 
WEIGHTMODE getWeightMode () const
 Gets the weight mode (MONO or AVERAGE) More...
 
double getWeight (const AASequence &aa) const
 returns the weight of either mono or average value More...
 
double getWeight (const EmpiricalFormula &ef) const
 returns the weight of either mono or average value More...
 
double getWeight (const Residue &r, Residue::ResidueType res_type=Residue::Full) const
 returns the weight of either mono or average value More...
 

Private Attributes

WEIGHTMODE weight_mode_
 one of WeightWrapper::WEIGHTMODE's values More...
 

Detailed Description

Encapsulated weight queries to simplify mono vs average weight computation.

Supports EmpiricalFormula's and AASequence's getMonoWeight() and getAverageWeight()

Member Enumeration Documentation

◆ WEIGHTMODE

enum WEIGHTMODE
Enumerator
AVERAGE 
MONO 
SIZE_OF_WEIGHTMODE 

Constructor & Destructor Documentation

◆ WeightWrapper() [1/3]

constructor

◆ WeightWrapper() [2/3]

WeightWrapper ( const WEIGHTMODE  weight_mode)
explicit

constructor

◆ ~WeightWrapper()

virtual ~WeightWrapper ( )
virtual

destructor

◆ WeightWrapper() [3/3]

WeightWrapper ( const WeightWrapper source)

copy constructor

Member Function Documentation

◆ getWeight() [1/3]

double getWeight ( const AASequence aa) const

returns the weight of either mono or average value

Which weight is returned depends on the current weight-mode.

Returns
double weight in u

◆ getWeight() [2/3]

double getWeight ( const EmpiricalFormula ef) const

returns the weight of either mono or average value

Which weight is returned depends on the current weight-mode.

Returns
double weight in u

◆ getWeight() [3/3]

double getWeight ( const Residue r,
Residue::ResidueType  res_type = Residue::Full 
) const

returns the weight of either mono or average value

Which weight is returned depends on the current weight-mode.

Returns
double weight in u

◆ getWeightMode()

WEIGHTMODE getWeightMode ( ) const

Gets the weight mode (MONO or AVERAGE)

Gets the mode in which getWeight() calls are answered.

◆ setWeightMode()

void setWeightMode ( const WEIGHTMODE  mode)

Sets the weight mode (MONO or AVERAGE)

Sets the mode in which getWeight() calls are answered.

Member Data Documentation

◆ weight_mode_

WEIGHTMODE weight_mode_
private

one of WeightWrapper::WEIGHTMODE's values