MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / generate

Method generate

src/sys/expressionparser.cxx:231–233  ·  view source on GitHub ↗

Evaluate expression, check it's a bool, and return 1 or 0

Source from the content-addressed store, hash-verified

229
230 /// Evaluate expression, check it's a bool, and return 1 or 0
231 double generate(const Context& ctx) override {
232 return toBool(expr->generate(ctx)) ? 0.0 : 1.0;
233 }
234
235 std::string str() const override { return "!"s + expr->str(); }
236

Callers

nothing calls this directly

Calls 2

toBoolFunction · 0.85
generateMethod · 0.45

Tested by

no test coverage detected