MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / CreateDirectTernaryStep

Function CreateDirectTernaryStep

eval/eval/ternary_step.cc:175–187  ·  view source on GitHub ↗

Factory method for ternary (_?_:_) recursive execution step

Source from the content-addressed store, hash-verified

173
174// Factory method for ternary (_?_:_) recursive execution step
175std::unique_ptr<DirectExpressionStep> CreateDirectTernaryStep(
176 std::unique_ptr<DirectExpressionStep> condition,
177 std::unique_ptr<DirectExpressionStep> left,
178 std::unique_ptr<DirectExpressionStep> right, int64_t expr_id,
179 bool shortcircuiting) {
180 if (shortcircuiting) {
181 return std::make_unique<ShortcircuitingDirectTernaryStep>(
182 std::move(condition), std::move(left), std::move(right), expr_id);
183 }
184
185 return std::make_unique<ExhaustiveDirectTernaryStep>(
186 std::move(condition), std::move(left), std::move(right), expr_id);
187}
188
189absl::StatusOr<std::unique_ptr<ExpressionStep>> CreateTernaryStep(
190 int64_t expr_id) {

Callers 2

MakeTernaryRecursiveMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected