ProteoWizard
Public Member Functions | Public Attributes | List of all members
SelectedIndexPredicate Struct Reference
Inheritance diagram for SelectedIndexPredicate:
pwiz::analysis::SpectrumList_Filter::Predicate pwiz::analysis::ProteinList_Filter::Predicate pwiz::analysis::ChromatogramList_Filter::Predicate

Public Member Functions

 SelectedIndexPredicate ()
 
virtual tribool accept (const ChromatogramIdentity &chromatogramIdentity) const
 return values: true: accept the Chromatogram false: reject the Chromatogram indeterminate: need to see the full Chromatogram object to decide More...
 
virtual bool done () const
 return true iff done accepting chromatograms; this allows early termination of the iteration through the original ChromatogramList, possibly using assumptions about the order of the iteration (e.g. More...
 
 SelectedIndexPredicate ()
 
virtual tribool accept (const Protein &protein) const
 return true iff Protein is accepted More...
 
virtual bool done () const
 return true iff done accepting chromatograms; this allows early termination of the iteration through the original ChromatogramList, possibly using assumptions about the order of the iteration (e.g. More...
 
 SelectedIndexPredicate ()
 
virtual tribool accept (const SpectrumIdentity &spectrumIdentity) const
 return values: true: accept the Spectrum false: reject the Spectrum indeterminate: need to see the full Spectrum object to decide More...
 
virtual bool done () const
 return true iff done accepting chromatograms; this allows early termination of the iteration through the original ChromatogramList, possibly using assumptions about the order of the iteration (e.g. More...
 
virtual string describe () const
 return a string describing how the predicate filters More...
 
- Public Member Functions inherited from pwiz::analysis::SpectrumList_Filter::Predicate
virtual msdata::DetailLevel suggestedDetailLevel () const
 can be overridden in subclasses that know they will need a certain detail level; it must be overridden to return DetailLevel_FullData if binary data is needed More...
 
virtual boost::logic::tribool accept (const msdata::Spectrum &spectrum) const
 return true iff Spectrum is accepted More...
 
virtual ~Predicate ()
 
- Public Member Functions inherited from pwiz::analysis::ProteinList_Filter::Predicate
virtual ~Predicate ()
 
- Public Member Functions inherited from pwiz::analysis::ChromatogramList_Filter::Predicate
virtual bool suggestedDetailLevel () const
 can be overridden in subclasses that know they will need a certain detail level; it must be overridden to return DetailLevel_FullData if binary data is needed More...
 
virtual boost::logic::tribool accept (const msdata::Chromatogram &chromatogram) const
 return true iff Chromatogram is accepted More...
 
virtual ~Predicate ()
 

Public Attributes

bool pastMaxIndex
 

Additional Inherited Members

- Public Types inherited from pwiz::analysis::SpectrumList_Filter::Predicate
enum  FilterMode { FilterMode_Include, FilterMode_Exclude }
 controls whether spectra that pass the predicate are included or excluded from the result More...
 

Detailed Description

Definition at line 139 of file ChromatogramList_FilterTest.cpp.

Constructor & Destructor Documentation

◆ SelectedIndexPredicate() [1/3]

SelectedIndexPredicate::SelectedIndexPredicate ( )
inline

Definition at line 143 of file ChromatogramList_FilterTest.cpp.

◆ SelectedIndexPredicate() [2/3]

SelectedIndexPredicate::SelectedIndexPredicate ( )
inline

Definition at line 80 of file ProteinList_FilterTest.cpp.

◆ SelectedIndexPredicate() [3/3]

SelectedIndexPredicate::SelectedIndexPredicate ( )
inline

Definition at line 259 of file SpectrumList_FilterTest.cpp.

Member Function Documentation

◆ accept() [1/3]

virtual tribool SelectedIndexPredicate::accept ( const ChromatogramIdentity chromatogramIdentity) const
inlinevirtual

return values: true: accept the Chromatogram false: reject the Chromatogram indeterminate: need to see the full Chromatogram object to decide

Implements pwiz::analysis::ChromatogramList_Filter::Predicate.

Definition at line 145 of file ChromatogramList_FilterTest.cpp.

References pwiz::msdata::ChromatogramIdentity::index.

146  {
147  if (chromatogramIdentity.index>2) pastMaxIndex = true;
148 
149  return (chromatogramIdentity.index==1 ||
150  chromatogramIdentity.index==2);
151  }
size_t index
the zero-based, consecutive index of the chromatogram in the ChromatogramList.
Definition: MSData.hpp:492

◆ done() [1/3]

virtual bool SelectedIndexPredicate::done ( ) const
inlinevirtual

return true iff done accepting chromatograms; this allows early termination of the iteration through the original ChromatogramList, possibly using assumptions about the order of the iteration (e.g.

index is increasing, nativeID interpreted as scan number is increasing, ...)

Reimplemented from pwiz::analysis::ChromatogramList_Filter::Predicate.

Definition at line 153 of file ChromatogramList_FilterTest.cpp.

154  {
155  return pastMaxIndex;
156  }

◆ accept() [2/3]

virtual tribool SelectedIndexPredicate::accept ( const Protein protein) const
inlinevirtual

return true iff Protein is accepted

Reimplemented from pwiz::analysis::ProteinList_Filter::Predicate.

Definition at line 82 of file ProteinList_FilterTest.cpp.

References pwiz::proteome::Protein::index.

83  {
84  if (protein.index>5) pastMaxIndex = true;
85 
86  return (protein.index==1 ||
87  protein.index==3 ||
88  protein.index==5);
89  }

◆ done() [2/3]

virtual bool SelectedIndexPredicate::done ( ) const
inlinevirtual

return true iff done accepting chromatograms; this allows early termination of the iteration through the original ChromatogramList, possibly using assumptions about the order of the iteration (e.g.

index is increasing, nativeID interpreted as scan number is increasing, ...)

Reimplemented from pwiz::analysis::ChromatogramList_Filter::Predicate.

Definition at line 91 of file ProteinList_FilterTest.cpp.

92  {
93  return pastMaxIndex;
94  }

◆ accept() [3/3]

virtual tribool SelectedIndexPredicate::accept ( const SpectrumIdentity spectrumIdentity) const
inlinevirtual

return values: true: accept the Spectrum false: reject the Spectrum indeterminate: need to see the full Spectrum object to decide

Implements pwiz::analysis::SpectrumList_Filter::Predicate.

Definition at line 261 of file SpectrumList_FilterTest.cpp.

References pwiz::msdata::SpectrumIdentity::index.

262  {
263  if (spectrumIdentity.index>5) pastMaxIndex = true;
264 
265  return (spectrumIdentity.index==1 ||
266  spectrumIdentity.index==3 ||
267  spectrumIdentity.index==5);
268  }
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
Definition: MSData.hpp:473

◆ done() [3/3]

virtual bool SelectedIndexPredicate::done ( ) const
inlinevirtual

return true iff done accepting chromatograms; this allows early termination of the iteration through the original ChromatogramList, possibly using assumptions about the order of the iteration (e.g.

index is increasing, nativeID interpreted as scan number is increasing, ...)

Reimplemented from pwiz::analysis::ChromatogramList_Filter::Predicate.

Definition at line 270 of file SpectrumList_FilterTest.cpp.

271  {
272  return pastMaxIndex;
273  }

◆ describe()

virtual string SelectedIndexPredicate::describe ( ) const
inlinevirtual

return a string describing how the predicate filters

Implements pwiz::analysis::SpectrumList_Filter::Predicate.

Definition at line 275 of file SpectrumList_FilterTest.cpp.

275 { return ""; }

Member Data Documentation

◆ pastMaxIndex

bool SelectedIndexPredicate::pastMaxIndex
mutable

Definition at line 141 of file ChromatogramList_FilterTest.cpp.


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