FV3 Bundle
Variables.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017-2018 UCAR
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 #ifndef OOPS_BASE_VARIABLES_H_
9 #define OOPS_BASE_VARIABLES_H_
10 
11 #include <ostream>
12 #include <string>
13 #include <vector>
14 
15 #include <boost/scoped_ptr.hpp>
16 
17 #include "eckit/config/LocalConfiguration.h"
18 #include "oops/util/Printable.h"
19 
20 namespace oops {
21 
22 // -----------------------------------------------------------------------------
23 
24 class Variables : public util::Printable {
25  public:
26  static const std::string classname() {return "oops::Variables";}
27 
28  explicit Variables(const eckit::Configuration &);
29  explicit Variables(const std::vector<std::string> &, const std::string & conv = "");
30 
31  ~Variables();
32 
33  Variables(const Variables &);
34 
35  const std::vector<std::string> & variables() const {return vars_;}
36  const eckit::Configuration & toFortran() const {return fconf_;}
37 
38  private:
39  void print(std::ostream &) const;
40 
41  std::string convention_;
42  std::vector<std::string> vars_;
43  eckit::LocalConfiguration conf_;
44  eckit::LocalConfiguration fconf_; // Until we can read vector of strings from fortran
45 };
46 
47 // -----------------------------------------------------------------------------
48 
49 } // namespace oops
50 
51 #endif // OOPS_BASE_VARIABLES_H_
Variables(const eckit::Configuration &)
The namespace for the main oops code.
const std::vector< std::string > & variables() const
Definition: Variables.h:35
static const std::string classname()
Definition: Variables.h:26
void print(std::ostream &) const
eckit::LocalConfiguration conf_
Definition: Variables.h:43
eckit::LocalConfiguration fconf_
Definition: Variables.h:44
std::string convention_
Definition: Variables.h:41
std::vector< std::string > vars_
Definition: Variables.h:42
const eckit::Configuration & toFortran() const
Definition: Variables.h:36