OpenMS
HasPrecursorCharge< SpectrumType > Class Template Reference

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

#include <OpenMS/KERNEL/RangeUtils.h>

Collaboration diagram for HasPrecursorCharge< SpectrumType >:
[legend]

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
chargesList of charges that is compared against precursor charge.
reverseif reverse is true, operator() returns true if the spectrum has not one of the specified precursor charges.

Member Function Documentation

◆ operator()()

Member Data Documentation

◆ charges_

IntList charges_
protected

◆ reverse_

bool reverse_
protected