IODA Bundle
BoundingFilter.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 NOAA/NWS/NCEP/EMC
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #pragma once
9 
10 #include "Filter.h"
11 
12 #include <memory>
13 #include <string>
14 #include <vector>
15 
16 #include "BufrParser/BufrTypes.h"
17 
18 
19 namespace Ingester
20 {
21  /// \brief Class that filter data given optional upper and lower bounds.
22  class BoundingFilter : public Filter
23  {
24  public:
25  /// \brief Constructor
26  /// \param mnemonic BUFR Mnemonic to filter on
27  /// \param lowerBound Lowest allowable value
28  /// \param upperBound Highest allowable value
29  BoundingFilter(const std::string& mnemonic,
30  std::shared_ptr<float> lowerBound,
31  std::shared_ptr<float> upperBound);
32 
33  /// \brief Apply the filter to the data
34  /// \param dataMap Map to modify by filtering out relevant data.
35  void apply(BufrDataMap& dataMap) final;
36 
37  private:
38  const std::string mnemonic_;
39  const std::shared_ptr<float> lowerBound_;
40  const std::shared_ptr<float> upperBound_;
41  };
42 } // namespace Ingester
Class that filter data given optional upper and lower bounds.
const std::shared_ptr< float > lowerBound_
BoundingFilter(const std::string &mnemonic, std::shared_ptr< float > lowerBound, std::shared_ptr< float > upperBound)
Constructor.
const std::shared_ptr< float > upperBound_
const std::string mnemonic_
void apply(BufrDataMap &dataMap) final
Apply the filter to the data.
Base class for all the supported filters.
Definition: Filter.h:17
IngesterArrayMap BufrDataMap
Definition: BufrTypes.h:21