Skip to content

Commit 13eb5d8

Browse files
committed
cleanup
1 parent b0a1e9f commit 13eb5d8

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

examples/ExternalInterfaceLib/external_interface_lib.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ class ExternalInterfaceLib : public fmu4cpp::fmu_base {
1010
public:
1111
FMU4CPP_CTOR(ExternalInterfaceLib) {
1212

13-
// register_variable(integer("i", &i));
14-
register_variable(string("jsonString_", [this]{return jsonString_;}, [this](const std::string& val){jsonString_ = val;}));
13+
register_variable(string("jsonString_", &jsonString_));
1514

1615
ExternalInterfaceLib::reset();
1716
}
@@ -23,24 +22,18 @@ class ExternalInterfaceLib : public fmu4cpp::fmu_base {
2322
json["dt"] = dt;
2423
json["message"] = "This is an example of an external interface using JSON.";
2524

26-
// ++i;
27-
2825
jsonString_ = json.dump();
2926

30-
std::cout << "Generated JSON string: " << jsonString_ << std::endl;
31-
3227
log(fmiOK, "Generated JSON string: " + jsonString_);
3328

3429
return true;
3530
}
3631

3732
void reset() override {
38-
// i = 0;
3933
jsonString_ = "";
4034
}
4135

4236
private:
43-
// int i{};
4437
std::string jsonString_{};
4538
};
4639

0 commit comments

Comments
 (0)