IODA Bundle
BufrMnemonicSet.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 "BufrTypes.h"
14 
15 namespace Ingester
16 {
17  /// \brief Defenition of BUFR mnemonics and associated channels of interest.
19  {
20  public:
21  explicit BufrMnemonicSet(const std::vector<std::string>& mnemonics,
22  const Channels& channels = {1});
23 
24  // Getters
25  inline std::vector<std::string> getMnemonics() const { return mnemonics_; }
26  inline std::string getMnemonicsStr() const { return mnemonicsStr_; }
27  inline Channels getChannels() const { return channels_; }
28  inline size_t getMaxColumn() const { return maxColumn_; }
29  inline size_t getSize() const { return mnemonics_.size(); }
30 
31  private:
32  /// \brief Collection of BUFR mnemonics.
33  const std::vector<std::string> mnemonics_;
34 
35  /// \brief String of assembled mnemonics to use when reading from the buffer interface
36  const std::string mnemonicsStr_;
37 
38  /// \brief Collection of channels to read for each mnemonic
40 
41  /// \brief The value of the greatest channel.
42  const size_t maxColumn_;
43 
44  /// \brief Concatinates mnemonics into a space seperated string.
45  static std::string makeMnemonicsStr(std::vector<std::string> mnemonics);
46  };
47 } // namespace Ingester
Defenition of BUFR mnemonics and associated channels of interest.
std::vector< std::string > getMnemonics() const
const Channels channels_
Collection of channels to read for each mnemonic.
Channels getChannels() const
const std::vector< std::string > mnemonics_
Collection of BUFR mnemonics.
std::string getMnemonicsStr() const
static std::string makeMnemonicsStr(std::vector< std::string > mnemonics)
Concatinates mnemonics into a space seperated string.
const std::string mnemonicsStr_
String of assembled mnemonics to use when reading from the buffer interface.
BufrMnemonicSet(const std::vector< std::string > &mnemonics, const Channels &channels={1})
const size_t maxColumn_
The value of the greatest channel.
std::set< size_t > Channels
Definition: BufrTypes.h:18