| OpenMS 2.5.0

Public Member Functions | Protected Attributes | List of all members
HasPrecursorCharge< SpectrumType > Class Template Reference
Kernel » RangeUtils

Predicate that determines if a spectrum has a certain precursor charge as given in the constructor list. More...

`#include <OpenMS/KERNEL/RangeUtils.h>`

Inheritance diagram for HasPrecursorCharge< SpectrumType >:

## Public Member Functions

| HasPrecursorCharge (const IntList &charges, bool reverse=false)
| Constructor. More...
bool | operator() (const SpectrumType &s) const

## Protected Attributes

IntList | charges_
bool | reverse_

## Detailed Description

### template<class SpectrumType>
class OpenMS::HasPrecursorCharge< SpectrumType >

Predicate that determines if a spectrum has a certain precursor charge as given in the constructor list.

SpectrumType must have a getPrecursors() method

## Constructor & Destructor Documentation

## ◆ HasPrecursorCharge()

HasPrecursorCharge | ( | const IntList & | charges,
|  | bool | reverse = `false`
| ) |  |

inline

Constructor.

Parameters

  charges | List of charges that is compared against precursor charge.
  reverse | if `reverse` is true, operator() returns true if the spectrum has not one of the specified precursor charges.

## Member Function Documentation

## ◆ operator()()

bool operator() | ( | const SpectrumType & | s | ) | const

inline

References HasPrecursorCharge< SpectrumType >::charges_, seqan::find(), SpectrumSettings::getPrecursors(), and HasPrecursorCharge< SpectrumType >::reverse_.

## Member Data Documentation

## ◆ charges_

IntList charges_

protected

Referenced by HasPrecursorCharge< SpectrumType >::operator()().

## ◆ reverse_

bool reverse_

protected

Referenced by HasPrecursorCharge< SpectrumType >::operator()().