WSL/SLF GitLab Repository

ProcessingStack.h 1.98 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/***********************************************************************************/
/*  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 __PROCESSINGSTACK_H__
#define __PROCESSINGSTACK_H__

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

namespace mio {

/**
 * @class  ProcessingStack
31
 * @brief
32
33
34
35
36
37
38
39
40
41
42
 * @author Thomas Egger
 * @date   2011-01-11
 */
class ProcessingStack {
	public:
		/**
		 * @brief Constructor parses cfg and builds up a filter stack for param_name
		 */
		ProcessingStack(const Config& cfg, const std::string& param_name);
		~ProcessingStack();

43
		void process(const std::vector< std::vector<MeteoData> >& ivec,
44
		             std::vector< std::vector<MeteoData> >& ovec, const bool& second_pass=false);
45
46
47

		void getWindowSize(ProcessingProperties& o_properties);

48
		const std::string toString() const;
49

50
	private:
51
		static void getArgumentsForFilter(const Config& cfg, const std::string& keyname, std::vector<std::string>& vecArguments);
52
53

		std::vector<ProcessingBlock*> filter_stack; //for now: strictly linear chain of processing blocks
54
		const std::string param_name;
55
56
57
58
59
};

} //end namespace

#endif