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

Public Member Functions

 SelectedIndexPredicate ()
 
virtual tribool accept (const Protein &protein) const
 return true iff Protein is accepted More...
 
virtual bool done () const
 return true iff done accepting proteins; this allows early termination of the iteration through the original ProteinList, 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 proteins; this allows early termination of the iteration through the original ProteinList, possibly using assumptions about the order of the iteration (e.g. 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 Attributes

bool pastMaxIndex
 

Detailed Description

Definition at line 76 of file ProteinList_FilterTest.cpp.

Constructor & Destructor Documentation

§ SelectedIndexPredicate() [1/2]

SelectedIndexPredicate::SelectedIndexPredicate ( )
inline

Definition at line 80 of file ProteinList_FilterTest.cpp.

§ SelectedIndexPredicate() [2/2]

SelectedIndexPredicate::SelectedIndexPredicate ( )
inline

Definition at line 225 of file SpectrumList_FilterTest.cpp.

Member Function Documentation

§ accept() [1/2]

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() [1/2]

virtual bool SelectedIndexPredicate::done ( ) const
inlinevirtual

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

index is increasing)

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

Definition at line 91 of file ProteinList_FilterTest.cpp.

92  {
93  return pastMaxIndex;
94  }

§ accept() [2/2]

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 227 of file SpectrumList_FilterTest.cpp.

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

228  {
229  if (spectrumIdentity.index>5) pastMaxIndex = true;
230 
231  return (spectrumIdentity.index==1 ||
232  spectrumIdentity.index==3 ||
233  spectrumIdentity.index==5);
234  }
size_t index
the zero-based, consecutive index of the spectrum in the SpectrumList.
Definition: MSData.hpp:472

§ done() [2/2]

virtual bool SelectedIndexPredicate::done ( ) const
inlinevirtual

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

index is increasing)

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

Definition at line 236 of file SpectrumList_FilterTest.cpp.

237  {
238  return pastMaxIndex;
239  }

Member Data Documentation

§ pastMaxIndex

bool SelectedIndexPredicate::pastMaxIndex
mutable

Definition at line 78 of file ProteinList_FilterTest.cpp.


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