ProteoWizard
Public Member Functions | Public Attributes | List of all members
SelectedIndexPredicate Struct Reference
Inheritance diagram for SelectedIndexPredicate:
pwiz::analysis::ChromatogramList_Filter::Predicate pwiz::analysis::ProteinList_Filter::Predicate pwiz::analysis::SpectrumList_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
 
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.
 
 SelectedIndexPredicate ()
 
virtual tribool accept (const Protein &protein) const
 return true iff Protein is accepted
 
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.
 
 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
 
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.
 
virtual string describe () const
 return a string describing how the predicate filters
 
- 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
 
virtual boost::logic::tribool accept (const msdata::Chromatogram &chromatogram) const
 return true iff Chromatogram is accepted
 
virtual ~Predicate ()
 
- Public Member Functions inherited from pwiz::analysis::ProteinList_Filter::Predicate
virtual ~Predicate ()
 
- 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
 
virtual boost::logic::tribool accept (const msdata::Spectrum &spectrum) const
 return true iff Spectrum is accepted
 
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

◆ SelectedIndexPredicate() [2/3]

SelectedIndexPredicate::SelectedIndexPredicate ( )
inline

Definition at line 80 of file ProteinList_FilterTest.cpp.

80: pastMaxIndex(false) {}

◆ SelectedIndexPredicate() [3/3]

SelectedIndexPredicate::SelectedIndexPredicate ( )
inline

Definition at line 259 of file SpectrumList_FilterTest.cpp.

259: pastMaxIndex(false) {}

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.

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

References pwiz::msdata::ChromatogramIdentity::index, and pastMaxIndex.

◆ 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 }

References pastMaxIndex.

◆ 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.

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

References pwiz::proteome::Protein::index, and pastMaxIndex.

◆ 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 }

References pastMaxIndex.

◆ 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.

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

References pwiz::msdata::SpectrumIdentity::index, and pastMaxIndex.

◆ 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 }

References pastMaxIndex.

◆ 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.

Referenced by accept(), accept(), accept(), and done().


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