libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
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
 

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}

References m_labelMatch, and m_sink.

Referenced by FilterOboPsiModTermLabel().

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

References FilterOboPsiModTermLabel(), m_labelMatch, and m_sink.

◆ ~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 {
55 m_sink.setOboPsiModTerm(term);
56 }
57 else if(m_labelMatch.match(term.m_psiMsLabel).hasMatch())
58 {
59 m_sink.setOboPsiModTerm(term);
60 }
61}

References m_labelMatch, pappso::OboPsiModTerm::m_psiModLabel, pappso::OboPsiModTerm::m_psiMsLabel, and m_sink.

Member Data Documentation

◆ m_labelMatch

QRegularExpression pappso::FilterOboPsiModTermLabel::m_labelMatch
private

◆ m_sink

OboPsiModHandlerInterface& pappso::FilterOboPsiModTermLabel::m_sink
private

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