libpappsomspp
Library for mass spectrometry
filterobopsimodsink.cpp
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
3
*
4
* This file is part of the PAPPSOms++ library.
5
*
6
* PAPPSOms++ is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* PAPPSOms++ is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
18
*
19
* Contributors:
20
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
21
*implementation
22
******************************************************************************/
23
24
#include "
filterobopsimodsink.h
"
25
#include "../exception/exceptionnotfound.h"
26
27
namespace
pappso
28
{
29
FilterOboPsiModSink::FilterOboPsiModSink
()
30
{
31
}
32
33
FilterOboPsiModSink::~FilterOboPsiModSink
()
34
{
35
}
36
37
const
std::list<OboPsiModTerm> &
38
FilterOboPsiModSink::getOboPsiModTermList
()
39
{
40
return
m_oboPsiModTermList
;
41
}
42
43
void
44
FilterOboPsiModSink::setOboPsiModTerm
(
const
OboPsiModTerm &term)
45
{
46
m_oboPsiModTermList
.push_back(term);
47
}
48
49
const
OboPsiModTerm &
50
FilterOboPsiModSink::getOne
()
51
{
52
if
(
m_oboPsiModTermList
.size() == 1)
53
{
54
return
*
m_oboPsiModTermList
.begin();
55
}
56
if
(
m_oboPsiModTermList
.size() == 0)
57
{
58
throw
ExceptionNotFound
(QObject::tr(
"OBO term list is empty"
));
59
}
60
else
61
{
62
throw
ExceptionNotFound
(
63
QObject::tr(
"Too much OBO terms in list (size = %1)"
)
64
.arg(
m_oboPsiModTermList
.size()));
65
}
66
}
67
68
const
OboPsiModTerm &
69
FilterOboPsiModSink::getFirst
()
70
{
71
if
(
m_oboPsiModTermList
.size() == 0)
72
{
73
throw
ExceptionNotFound
(QObject::tr(
"OBO term list is empty"
));
74
}
75
else
76
{
77
return
*
m_oboPsiModTermList
.begin();
78
}
79
}
80
}
// namespace pappso
pappso::FilterOboPsiModSink::FilterOboPsiModSink
FilterOboPsiModSink()
Definition:
filterobopsimodsink.cpp:50
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition:
aa.cpp:39
pappso::FilterOboPsiModSink::~FilterOboPsiModSink
virtual ~FilterOboPsiModSink()
Definition:
filterobopsimodsink.cpp:54
pappso::FilterOboPsiModSink::m_oboPsiModTermList
std::list< OboPsiModTerm > m_oboPsiModTermList
Definition:
filterobopsimodsink.h:80
filterobopsimodsink.h
pappso::ExceptionNotFound
Definition:
exceptionnotfound.h:53
pappso::FilterOboPsiModSink::setOboPsiModTerm
void setOboPsiModTerm(const OboPsiModTerm &term) override
Definition:
filterobopsimodsink.cpp:65
pappso::FilterOboPsiModSink::getOne
const OboPsiModTerm & getOne()
Definition:
filterobopsimodsink.cpp:71
pappso::FilterOboPsiModSink::getOboPsiModTermList
const std::list< OboPsiModTerm > & getOboPsiModTermList()
Definition:
filterobopsimodsink.cpp:59
pappso::FilterOboPsiModSink::getFirst
const OboPsiModTerm & getFirst()
Definition:
filterobopsimodsink.cpp:90
pappsomspp
obo
filterobopsimodsink.cpp
Generated on Wed Oct 21 2020 12:29:32 for libpappsomspp by
1.8.18