WSL/SLF GitLab Repository

FilterBlock.h 1.91 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/***********************************************************************************/
/*  Copyright 2009 WSL Institute for Snow and Avalanche Research    SLF-DAVOS      */
/***********************************************************************************/
/* This file is part of MeteoIO.
    MeteoIO is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    MeteoIO is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with MeteoIO.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __FILTERBLOCK_H__
#define __FILTERBLOCK_H__

#include <meteoio/MeteoData.h>
22
#include <meteoio/meteofilters/ProcessingBlock.h>
23
24
25
26
27
28
29
30
#include <vector>
#include <string>
#include <set>

namespace mio {

/**
 * @class  FilterBlock
31
 * @brief  An abstract class
32
33
34
35
36
37
 * @author Thomas Egger
 * @date   2011-01-02
 */
class FilterBlock : public ProcessingBlock {
	public:
		virtual ~FilterBlock();
38

39
		virtual void process(const unsigned int& param, const std::vector<MeteoData>& ivec,
40
		                     std::vector<MeteoData>& ovec) = 0;
41

42
43
	protected:
		FilterBlock(const std::string& filter_name); ///< protected constructor only to be called by children
44

45
		static void extract_dbl_vector(const unsigned int& param, const std::vector<MeteoData>& ivec,
46
		                               std::vector<double>& ovec);
47
		static void extract_dbl_vector(const unsigned int& param, const std::vector<const MeteoData*>& ivec,
48
                                               std::vector<double>& ovec);
49
50
51
52
};

}
#endif