libpappsomspp
Library for mass spectrometry
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 "../../exportinmportconfig.h"
35
36namespace pappso
37{
38/**
39 * @todo write docs
40 */
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 using FilterNameType = std::vector<FilterNameInterfaceCstSPtr>;
66
67 FilterNameType::const_iterator begin();
68 FilterNameType::const_iterator end();
69
70 protected:
71 void buildFilterFromString(const QString &strBuildParams) override;
72
73 private:
74 std::vector<FilterNameInterfaceCstSPtr> m_filterVector;
75};
76
77typedef std::shared_ptr<FilterSuiteString> FilterSuiteStringSPtr;
78} // namespace pappso
Interface that allows to build filter objects from strings.
std::vector< FilterNameInterfaceCstSPtr > FilterNameType
std::vector< FilterNameInterfaceCstSPtr > m_filterVector
A simple container of DataPoint instances.
Definition: trace.h:38
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
std::shared_ptr< FilterSuiteString > FilterSuiteStringSPtr