libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
filtersuitestring.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/processing/filers/filtersuitestring.h
3
* \date 17/11/2020
4
* \author Olivier Langella
5
* \brief build a filter suite from a string
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2020 Olivier Langella
10
*<olivier.langella@universite-paris-saclay.fr>
11
*
12
* This file is part of the PAPPSOms++ library.
13
*
14
* PAPPSOms++ is free software: you can redistribute it and/or modify
15
* it under the terms of the GNU General Public License as published by
16
* the Free Software Foundation, either version 3 of the License, or
17
* (at your option) any later version.
18
*
19
* PAPPSOms++ is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
* GNU General Public License for more details.
23
*
24
* You should have received a copy of the GNU General Public License
25
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
26
*
27
******************************************************************************/
28
29
#pragma once
30
31
32
#include <vector>
33
#include "
filternameinterface.h
"
34
#include "
pappsomspp/export-import-config.h
"
35
36
namespace
pappso
37
{
38
/**
39
* @todo write docs
40
*/
41
class
PMSPP_LIB_DECL
FilterSuiteString
:
public
FilterNameInterface
42
{
43
public
:
44
/**
45
* @param strBuildParams string to build the filter
46
* "chargeDeconvolution|0.02dalton anotherFilter|param1;param2"
47
*/
48
FilterSuiteString
(
const
QString &strBuildParams);
49
/**
50
* Destructor
51
*/
52
virtual
~FilterSuiteString
();
53
54
pappso::Trace
&
filter
(
pappso::Trace
&data_points)
const override
;
55
56
virtual
QString
name
()
const override
;
57
QString
toString
()
const override
;
58
59
/** @brief takes a string that describes filters to add
60
* @param strBuildParams string to build the filter
61
* "chargeDeconvolution|0.02dalton anotherFilter|param1;param2"
62
*/
63
void
addFilterFromString
(
const
QString &strBuildParams);
64
65
66
/** @brief add a filter to the suite
67
* @param filter FilterNameInterfaceSPtr
68
*/
69
void
addFilter
(
const
pappso::FilterNameInterfaceSPtr
&
filter
);
70
71
using
FilterNameType
= std::vector<FilterNameInterfaceCstSPtr>;
72
73
FilterNameType::const_iterator
begin
();
74
FilterNameType::const_iterator
end
();
75
76
protected
:
77
void
buildFilterFromString
(
const
QString &strBuildParams)
override
;
78
79
private
:
80
std::vector<FilterNameInterfaceCstSPtr>
m_filterVector
;
81
};
82
83
typedef
std::shared_ptr<FilterSuiteString>
FilterSuiteStringSPtr
;
84
}
// namespace pappso
pappso::FilterNameInterface
Interface that allows to build filter objects from strings.
Definition
filternameinterface.h:42
pappso::FilterSuiteString::FilterNameType
std::vector< FilterNameInterfaceCstSPtr > FilterNameType
Definition
filtersuitestring.h:71
pappso::FilterSuiteString::filter
pappso::Trace & filter(pappso::Trace &data_points) const override
Definition
filtersuitestring.cpp:53
pappso::FilterSuiteString::begin
FilterNameType::const_iterator begin()
Definition
filtersuitestring.cpp:154
pappso::FilterSuiteString::buildFilterFromString
void buildFilterFromString(const QString &strBuildParams) override
build this filter using a string
Definition
filtersuitestring.cpp:92
pappso::FilterSuiteString::m_filterVector
std::vector< FilterNameInterfaceCstSPtr > m_filterVector
Definition
filtersuitestring.h:80
pappso::FilterSuiteString::end
FilterNameType::const_iterator end()
Definition
filtersuitestring.cpp:159
pappso::FilterSuiteString::FilterSuiteString
FilterSuiteString(const QString &strBuildParams)
Definition
filtersuitestring.cpp:42
pappso::FilterSuiteString::toString
QString toString() const override
Definition
filtersuitestring.cpp:79
pappso::FilterSuiteString::addFilterFromString
void addFilterFromString(const QString &strBuildParams)
takes a string that describes filters to add
Definition
filtersuitestring.cpp:142
pappso::FilterSuiteString::name
virtual QString name() const override
Definition
filtersuitestring.cpp:71
pappso::FilterSuiteString::addFilter
void addFilter(const pappso::FilterNameInterfaceSPtr &filter)
add a filter to the suite
Definition
filtersuitestring.cpp:148
pappso::Trace
A simple container of DataPoint instances.
Definition
trace.h:152
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition
export-import-config.h:14
filternameinterface.h
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::FilterSuiteStringSPtr
std::shared_ptr< FilterSuiteString > FilterSuiteStringSPtr
Definition
filtersuitestring.h:83
pappso::FilterNameInterfaceSPtr
std::shared_ptr< FilterNameInterface > FilterNameInterfaceSPtr
Definition
filternameinterface.h:59
pappsomspp
core
processing
filters
filtersuitestring.h
Generated on
for libpappsomspp by
1.17.0