IODA Bundle
DataObject.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 <set>
11 #include <string>
12 
13 #include "ioda/ObsGroup.h"
14 #include "ioda/defs.h"
15 
16 namespace Ingester
17 {
18  /// \brief Abstract base class for intermediate data object that bridges the Parsers with the
19  /// IodaEncoder.
20  class DataObject
21  {
22  public:
23  /// \brief Makes an ioda::Variable and ads it to the given ioda::ObsGroup
24  /// \param obsGroup Obsgroup were to add the variable
25  /// \param name The name to associate with the variable (ex "latitude@MetaData")
26  /// \param dimensions List of Variables to use as the dimensions for this new variable
27  /// \param chunks List of integers specifying the chunking dimensions
28  /// \param compressionLevel The GZip compression level to use, must be 0-9
30  ioda::ObsGroup& obsGroup,
31  const std::string& name,
32  const std::vector<ioda::Variable>& dimensions,
33  const std::vector<ioda::Dimensions_t>& chunks,
34  int compressionLevel) = 0;
35 
36  /// \brief Print data to stdout for debug purposes.
37  virtual void print() const = 0;
38 
39  /// \brief Get number of columns represented in the data.
40  virtual size_t ncols() const = 0;
41 
42  /// \brief Get number of rows represented in the data.
43  virtual size_t nrows() const = 0;
44  };
45 } // namespace Ingester
46 
47 
Interfaces for ioda::ObsGroup and related classes.
Abstract base class for intermediate data object that bridges the Parsers with the IodaEncoder.
Definition: DataObject.h:21
virtual ioda::Variable createVariable(ioda::ObsGroup &obsGroup, const std::string &name, const std::vector< ioda::Variable > &dimensions, const std::vector< ioda::Dimensions_t > &chunks, int compressionLevel)=0
Makes an ioda::Variable and ads it to the given ioda::ObsGroup.
virtual void print() const =0
Print data to stdout for debug purposes.
virtual size_t ncols() const =0
Get number of columns represented in the data.
virtual size_t nrows() const =0
Get number of rows represented in the data.
An ObsGroup is a specialization of a ioda::Group. It provides convenience functions and guarantees th...
Definition: ObsGroup.h:32
Common preprocessor definitions used throughout IODA.