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 8ae1d74 commit 50289e9
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_moisture_profile.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace coupler {

}

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

0 comments on commit 50289e9

Please sign in to comment.