IODA Bundle
Split.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 <string>
11 #include <vector>
12 
13 #include "BufrParser/BufrTypes.h"
14 
15 namespace Ingester
16 {
17  /// \brief Base class for all Split objects that split data into sub-parts
18  class Split
19  {
20  public:
21  Split() = default;
22 
23  /// \brief Get set of sub categories this split will create
24  /// \param dataMap The data we will split on.
25  /// \result set of unique strings
26  virtual std::vector<std::string> subCategories(const BufrDataMap& dataMap) = 0;
27 
28  /// \brief Split the data according to internal rules
29  /// \param dataMap Data to be split
30  /// \result map of split data where the category is the key
31  virtual std::map<std::string, BufrDataMap> split(const BufrDataMap& dataMap) = 0;
32  };
33 } // namespace Ingester
34 
35 
Base class for all Split objects that split data into sub-parts.
Definition: Split.h:19
Split()=default
virtual std::vector< std::string > subCategories(const BufrDataMap &dataMap)=0
Get set of sub categories this split will create.
virtual std::map< std::string, BufrDataMap > split(const BufrDataMap &dataMap)=0
Split the data according to internal rules.
IngesterArrayMap BufrDataMap
Definition: BufrTypes.h:21