forked from cel-expr/cel-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction_step.h
More file actions
48 lines (39 loc) · 1.98 KB
/
Copy pathfunction_step.h
File metadata and controls
48 lines (39 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef THIRD_PARTY_CEL_CPP_EVAL_EVAL_FUNCTION_STEP_H_
#define THIRD_PARTY_CEL_CPP_EVAL_EVAL_FUNCTION_STEP_H_
#include <cstdint>
#include <memory>
#include <vector>
#include "absl/status/statusor.h"
#include "common/expr.h"
#include "eval/eval/direct_expression_step.h"
#include "eval/eval/evaluator_core.h"
#include "runtime/function_overload_reference.h"
#include "runtime/function_registry.h"
namespace google::api::expr::runtime {
// Factory method for Call-based execution step where the function has been
// statically resolved from a set of eagerly functions configured in the
// CelFunctionRegistry.
std::unique_ptr<DirectExpressionStep> CreateDirectFunctionStep(
int64_t expr_id, const cel::CallExpr& call,
std::vector<std::unique_ptr<DirectExpressionStep>> deps,
std::vector<cel::FunctionOverloadReference> overloads);
// Factory method for Call-based execution step where the function has been
// statically resolved from a set of lazy functions configured in the
// CelFunctionRegistry.
std::unique_ptr<DirectExpressionStep> CreateDirectLazyFunctionStep(
int64_t expr_id, const cel::CallExpr& call,
std::vector<std::unique_ptr<DirectExpressionStep>> deps,
std::vector<cel::FunctionRegistry::LazyOverload> providers);
// Factory method for Call-based execution step where the function will be
// resolved at runtime (lazily) from an input Activation.
absl::StatusOr<std::unique_ptr<ExpressionStep>> CreateFunctionStep(
const cel::CallExpr& call, int64_t expr_id,
std::vector<cel::FunctionRegistry::LazyOverload> lazy_overloads);
// Factory method for Call-based execution step where the function has been
// statically resolved from a set of eagerly functions configured in the
// CelFunctionRegistry.
absl::StatusOr<std::unique_ptr<ExpressionStep>> CreateFunctionStep(
const cel::CallExpr& call, int64_t expr_id,
std::vector<cel::FunctionOverloadReference> overloads);
} // namespace google::api::expr::runtime
#endif // THIRD_PARTY_CEL_CPP_EVAL_EVAL_FUNCTION_STEP_H_