ProteoWizard
Public Member Functions | List of all members
MSLevelSorter Struct Reference
Inheritance diagram for MSLevelSorter:
pwiz::analysis::SpectrumList_Sorter::Predicate

Public Member Functions

virtual tribool less (const SpectrumIdentity &lhs, const SpectrumIdentity &rhs) const
 return values: true: lhs < rhs false: lhs >= rhs indeterminate: need to see the full Spectrum object to decide More...
 
virtual tribool less (const Spectrum &lhs, const Spectrum &rhs) const
 return values: true: lhs < rhs false: lhs >= rhs indeterminate: need a more detailed Spectrum object to decide More...
 
- Public Member Functions inherited from pwiz::analysis::SpectrumList_Sorter::Predicate
virtual ~Predicate ()
 

Detailed Description

Definition at line 59 of file SpectrumList_SorterTest.cpp.

Member Function Documentation

§ less() [1/2]

virtual tribool MSLevelSorter::less ( const SpectrumIdentity lhs,
const SpectrumIdentity rhs 
) const
inlinevirtual

return values: true: lhs < rhs false: lhs >= rhs indeterminate: need to see the full Spectrum object to decide

Reimplemented from pwiz::analysis::SpectrumList_Sorter::Predicate.

Definition at line 61 of file SpectrumList_SorterTest.cpp.

63  {
64  return boost::logic::indeterminate;
65  }

§ less() [2/2]

virtual tribool MSLevelSorter::less ( const Spectrum lhs,
const Spectrum rhs 
) const
inlinevirtual

return values: true: lhs < rhs false: lhs >= rhs indeterminate: need a more detailed Spectrum object to decide

Reimplemented from pwiz::analysis::SpectrumList_Sorter::Predicate.

Definition at line 67 of file SpectrumList_SorterTest.cpp.

References pwiz::data::ParamContainer::cvParam(), pwiz::data::CVParam::empty(), MS_ms_level, and pwiz::data::CVParam::valueAs().

69  {
70  CVParam lhsMSLevel = lhs.cvParam(MS_ms_level);
71  CVParam rhsMSLevel = rhs.cvParam(MS_ms_level);
72  if (lhsMSLevel.empty() || rhsMSLevel.empty())
73  return boost::logic::indeterminate;
74  return lhsMSLevel.valueAs<int>() < rhsMSLevel.valueAs<int>();
75  }
CVParam cvParam(CVID cvid) const
finds cvid in the container:
MS_ms_level
ms level: Stages of ms achieved in a multi stage mass spectrometry experiment.
Definition: cv.hpp:1987
value_type valueAs() const
templated value access with type conversion
Definition: ParamTypes.hpp:112
bool empty() const
Definition: ParamTypes.hpp:142
represents a tag-value pair, where the tag comes from the controlled vocabulary
Definition: ParamTypes.hpp:44

The documentation for this struct was generated from the following file: