libpappsomspp
Library for mass spectrometry
pappso::FilterOboPsiModTermLabel Class Reference

#include <filterobopsimodtermlabel.h>

Inheritance diagram for pappso::FilterOboPsiModTermLabel:
pappso::OboPsiModHandlerInterface

Public Member Functions

 FilterOboPsiModTermLabel (OboPsiModHandlerInterface &sink, const QString &label_search)
 
 FilterOboPsiModTermLabel (const FilterOboPsiModTermLabel &other)
 
virtual ~FilterOboPsiModTermLabel ()
 
void setOboPsiModTerm (const OboPsiModTerm &term) override
 triggered function on each obo term when parsing obo file More...
 

Private Attributes

QRegularExpression m_labelMatch
 
OboPsiModHandlerInterfacem_sink
 

Detailed Description

Definition at line 32 of file filterobopsimodtermlabel.h.

Constructor & Destructor Documentation

◆ FilterOboPsiModTermLabel() [1/2]

pappso::FilterOboPsiModTermLabel::FilterOboPsiModTermLabel ( OboPsiModHandlerInterface sink,
const QString &  label_search 
)

Definition at line 31 of file filterobopsimodtermlabel.cpp.

33  : m_sink(sink)
34 {
35  m_labelMatch.setPattern(QString(label_search).replace("*", "(.*)"));
36  m_labelMatch.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
37 }
OboPsiModHandlerInterface & m_sink

References m_labelMatch.

◆ FilterOboPsiModTermLabel() [2/2]

pappso::FilterOboPsiModTermLabel::FilterOboPsiModTermLabel ( const FilterOboPsiModTermLabel other)

Definition at line 43 of file filterobopsimodtermlabel.cpp.

45  : m_labelMatch(other.m_labelMatch), m_sink(other.m_sink)
46 {
47 }

◆ ~FilterOboPsiModTermLabel()

pappso::FilterOboPsiModTermLabel::~FilterOboPsiModTermLabel ( )
virtual

Definition at line 39 of file filterobopsimodtermlabel.cpp.

40 {
41 }

Member Function Documentation

◆ setOboPsiModTerm()

void pappso::FilterOboPsiModTermLabel::setOboPsiModTerm ( const OboPsiModTerm term)
overridevirtual

triggered function on each obo term when parsing obo file

Implements pappso::OboPsiModHandlerInterface.

Definition at line 50 of file filterobopsimodtermlabel.cpp.

51 {
52  // qDebug() << term._psi_mod_label << " " << term._psi_ms_label;
53  if(m_labelMatch.match(term.m_psiModLabel).hasMatch())
54  {
56  }
57  else if(m_labelMatch.match(term.m_psiMsLabel).hasMatch())
58  {
60  }
61 }
virtual void setOboPsiModTerm(const OboPsiModTerm &term)=0
triggered function on each obo term when parsing obo file

References m_labelMatch, pappso::OboPsiModTerm::m_psiModLabel, pappso::OboPsiModTerm::m_psiMsLabel, m_sink, and pappso::OboPsiModHandlerInterface::setOboPsiModTerm().

Member Data Documentation

◆ m_labelMatch

QRegularExpression pappso::FilterOboPsiModTermLabel::m_labelMatch
private

Definition at line 35 of file filterobopsimodtermlabel.h.

Referenced by FilterOboPsiModTermLabel(), and setOboPsiModTerm().

◆ m_sink

OboPsiModHandlerInterface& pappso::FilterOboPsiModTermLabel::m_sink
private

Definition at line 36 of file filterobopsimodtermlabel.h.

Referenced by setOboPsiModTerm().


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