Skip to content

Commit

Permalink
Update BMI C++ header to match upstream with virtual dtor and correct…
Browse files Browse the repository at this point in the history
… namespace
  • Loading branch information
PhilMiller committed Jun 11, 2024
1 parent 4680aaf commit c9951a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions bmi/bmi.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

#ifndef BMI_HXX
#define BMI_HXX

#include <string>
#include <vector>

namespace bmixx {
namespace bmi {

//const int BMI_SUCCESS = 0;
// const int BMI_FAILURE = 1;
const int BMI_SUCCESS = 0;
const int BMI_FAILURE = 1;

const int MAX_COMPONENT_NAME = 2048;
const int MAX_VAR_NAME = 2048;
Expand All @@ -21,6 +22,8 @@ namespace bmixx {

class Bmi {
public:
virtual ~Bmi() { }

// Model control functions.
virtual void Initialize(std::string config_file) = 0;
virtual void Update() = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/bmi_soil_freeze_thaw.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class NotImplemented : public std::logic_error {
};


class BmiSoilFreezeThaw : public bmixx::Bmi {
class BmiSoilFreezeThaw : public bmi::Bmi {
public:
BmiSoilFreezeThaw() {
this->input_var_names[0] = "ground_temperature";
Expand Down

0 comments on commit c9951a9

Please sign in to comment.