OpenMS
Loading...
Searching...
No Matches
DataFilters::DataFilter Struct Reference

Representation of a peak/feature filter combining FilterType, FilterOperation and a value (either double or String) More...

#include <OpenMS/PROCESSING/MISC/DataFilters.h>

Collaboration diagram for DataFilters::DataFilter:
[legend]

Public Member Functions

 DataFilter ()
 
 DataFilter (const FilterType type, const FilterOperation op, const double val, const String &meta_name="")
 ctor for common case of numerical filter
 
 DataFilter (const FilterType type, const FilterOperation op, const String &val, const String &meta_name="")
 ctor for common case of string filter
 
String toString () const
 Returns a string representation of the filter.
 
void fromString (const String &filter)
 Parses filter and sets the filter properties accordingly.
 
bool operator== (const DataFilter &rhs) const
 Equality operator.
 
bool operator!= (const DataFilter &rhs) const
 Inequality operator.
 

Public Attributes

FilterType field { DataFilters::INTENSITY }
 Field to filter.
 
FilterOperation op { DataFilters::GREATER_EQUAL}
 Filter operation.
 
double value { 0.0 }
 Value for comparison.
 
String value_string
 String value for comparison (for meta data)
 
String meta_name
 Name of the considered meta information (key)
 
bool value_is_numerical { false }
 use value or value_string ?
 

Detailed Description

Representation of a peak/feature filter combining FilterType, FilterOperation and a value (either double or String)

Constructor & Destructor Documentation

◆ DataFilter() [1/3]

DataFilter ( )
inline

◆ DataFilter() [2/3]

DataFilter ( const FilterType  type,
const FilterOperation  op,
const double  val,
const String meta_name = "" 
)
inline

ctor for common case of numerical filter

◆ DataFilter() [3/3]

DataFilter ( const FilterType  type,
const FilterOperation  op,
const String val,
const String meta_name = "" 
)
inline

ctor for common case of string filter

Member Function Documentation

◆ fromString()

void fromString ( const String filter)

Parses filter and sets the filter properties accordingly.

This method accepts the format provided by toString().

Exceptions
Exception::InvalidValueis thrown when the filter is not formatted properly

◆ operator!=()

bool operator!= ( const DataFilter rhs) const

Inequality operator.

◆ operator==()

bool operator== ( const DataFilter rhs) const

Equality operator.

◆ toString()

String toString ( ) const

Returns a string representation of the filter.

Member Data Documentation

◆ field

◆ meta_name

String meta_name

Name of the considered meta information (key)

Referenced by DataFilters::passes(), and DataFilters::passes().

◆ op

◆ value

double value { 0.0 }

Value for comparison.

Referenced by DataFilters::passes(), DataFilters::passes(), and DataFilters::passes().

◆ value_is_numerical

bool value_is_numerical { false }

use value or value_string ?

◆ value_string

String value_string

String value for comparison (for meta data)