Loading...
Searching...
No Matches
pappso::FilterOboPsiModMap Class Reference

`#include <filterobopsimodmap.h>`

Inheritance diagram for pappso::FilterOboPsiModMap:

## Public Member Functions

| FilterOboPsiModMap ()
virtual | ~FilterOboPsiModMap ()
virtual void | setOboPsiModTerm (const OboPsiModTerm &term) override
| triggered function on each obo term when parsing obo file
const OboPsiModTerm & | getOboPsiModTermWithAccession (const QString &accession) const
const OboPsiModTerm & | getOboPsiModTermWithName (const QString &name) const
| get the first occurence of term with this name

## Private Attributes

std::map< QString, const OboPsiModTerm > | m_mapOboPsiModTerm

## Detailed Description

Definition at line 37 of file filterobopsimodmap.h.

## Constructor & Destructor Documentation

## FilterOboPsiModMap()

pappso::FilterOboPsiModMap::FilterOboPsiModMap | ( |  | ) |

Definition at line 33 of file filterobopsimodmap.cpp.

{
}

## ~FilterOboPsiModMap()

pappso::FilterOboPsiModMap::~FilterOboPsiModMap | ( |  | ) |

virtual

Destructor

Definition at line 38 of file filterobopsimodmap.cpp.

{
}

## Member Function Documentation

## getOboPsiModTermWithAccession()

const pappso::OboPsiModTerm & pappso::FilterOboPsiModMap::getOboPsiModTermWithAccession | ( | const QString & | accession | ) | const

Definition at line 49 of file filterobopsimodmap.cpp.

{
auto it = m_mapOboPsiModTerm.find(accession);
if(it == m_mapOboPsiModTerm.end())
{
throw pappso::ExceptionNotFound(
QObject::tr("OBO term accession %1 not found").arg(accession));
}
return it->second;
}
pappso::FilterOboPsiModMap::m_mapOboPsiModTerm
std::map< QString, const OboPsiModTerm > m_mapOboPsiModTerm
Definition filterobopsimodmap.h:57

References m_mapOboPsiModTerm.

Referenced by pappso::AaModification::createInstance(), pappso::PwizMsRunReader::getOboPsiModTermInstrumentModelName(), and pappso::TimsMsRunReaderBase::getOboPsiModTermInstrumentModelName().

## getOboPsiModTermWithName()

const pappso::OboPsiModTerm & pappso::FilterOboPsiModMap::getOboPsiModTermWithName | ( | const QString & | name | ) | const

get the first occurence of term with this name

Warning
  not reliable, it does not check for unicity

Definition at line 61 of file filterobopsimodmap.cpp.

{
for(auto &pair_term : m_mapOboPsiModTerm)
{
if(pair_term.second.m_name == name)
return pair_term.second;
}
throw pappso::ExceptionNotFound(QObject::tr("OBO term name %1 not found").arg(name));
}

References m_mapOboPsiModTerm.

Referenced by pappso::AaModification::createInstance().

## setOboPsiModTerm()

void pappso::FilterOboPsiModMap::setOboPsiModTerm | ( | const OboPsiModTerm & | term | ) |

override virtual

triggered function on each obo term when parsing obo file

Implements pappso::OboPsiModHandlerInterface.

Definition at line 43 of file filterobopsimodmap.cpp.

{
m_mapOboPsiModTerm.insert({term.getAccession(), term});
}

References pappso::OboPsiModTerm::getAccession(), and m_mapOboPsiModTerm.

## Member Data Documentation

## m_mapOboPsiModTerm

std::map<QString, const OboPsiModTerm> pappso::FilterOboPsiModMap::m_mapOboPsiModTerm

private

Definition at line 57 of file filterobopsimodmap.h.

Referenced by getOboPsiModTermWithAccession(), getOboPsiModTermWithName(), and setOboPsiModTerm().

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

- pappsomspp/core/obo/filterobopsimodmap.h
- pappsomspp/core/obo/filterobopsimodmap.cpp