libpappsomspp
Library for mass spectrometry
filternameinterface.h
Go to the documentation of this file.
1 /**
2  * \file pappsomspp/processing/filers/filternameinterface.h
3  * \date 31/10/2020
4  * \author Olivier Langella
5  * \brief interface to allow filter object construction from strings
6  */
7 
8 /*******************************************************************************
9  * Copyright (c) 2020 Olivier Langella <Olivier.Langella@u-psud.fr>.
10  *
11  * This file is part of the PAPPSOms++ library.
12  *
13  * PAPPSOms++ is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation, either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * PAPPSOms++ is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
25  *
26  ******************************************************************************/
27 
28 #pragma once
29 
30 #include <QString>
31 #include "../../exportinmportconfig.h"
32 #include "filterinterface.h"
33 
34 
35 namespace pappso
36 {
37 
38 
39 /** @brief Interface that allows to build filter objects from strings
40  */
42 {
43  public:
44  virtual QString name() const = 0;
45  virtual QString toString() const = 0;
46 
47  virtual ~FilterNameInterface(){};
48 
49  protected:
50  /** @brief build this filter using a string
51  * @param strBuildParams a string coding the filter and its parameters
52  * "filterName|param1;param2;param3"
53  *
54  */
55  virtual void buildFilterFromString(const QString &strBuildParams) = 0;
56 };
57 
58 
59 typedef std::shared_ptr<FilterNameInterface> FilterNameInterfaceSPtr;
60 typedef std::shared_ptr<const FilterNameInterface> FilterNameInterfaceCstSPtr;
61 
62 } // namespace pappso
generic interface to apply a filter on a trace
Interface that allows to build filter objects from strings.
virtual QString toString() const =0
virtual QString name() const =0
virtual void buildFilterFromString(const QString &strBuildParams)=0
build this filter using a string
#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< FilterNameInterface > FilterNameInterfaceSPtr
std::shared_ptr< const FilterNameInterface > FilterNameInterfaceCstSPtr