MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / rebuildInstance

Method rebuildInstance

pj_scripting/src/lua_mimo_transform.cpp:87–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void LuaMimoTransform::rebuildInstance() {
88 has_session_start_ = false;
89 instance_.reset();
90 error_.clear();
91 if (!engine_) {
92 error_ = "no script engine";
93 return;
94 }
95 auto made = engine_->createInstance(klass_, params_json_);
96 if (!made.has_value()) {
97 error_ = made.error();
98 return;
99 }
100 instance_ = std::move(made).value();
101}
102
103void LuaMimoTransform::reset() {
104 // Construct-new-and-swap: a fresh VM/instance is the only guaranteed-clean reset

Callers

nothing calls this directly

Calls 4

resetMethod · 0.45
clearMethod · 0.45
createInstanceMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected