/proc/self/cwd/eval/public/cel_value_producer.h
Line | Count | Source |
1 | | #ifndef THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_VALUE_PRODUCER_H_ |
2 | | #define THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_VALUE_PRODUCER_H_ |
3 | | |
4 | | #include "eval/public/cel_value.h" |
5 | | |
6 | | namespace google::api::expr::runtime { |
7 | | |
8 | | // CelValueProducer produces CelValue during CEL Expression evaluation. |
9 | | // It is intended to be used with Activation, to provide on-demand CelValue |
10 | | // calculations. |
11 | | // ValueProducer serves as performance optimization. Multiple calls to value |
12 | | // producer during the execution of the same expression should return the same |
13 | | // value. |
14 | | class CelValueProducer { |
15 | | public: |
16 | 0 | virtual ~CelValueProducer() {} |
17 | | |
18 | | // Produces CelValue. |
19 | | // If CelValue payload is not a primitive type, it must be owned by arena. |
20 | | virtual CelValue Produce(google::protobuf::Arena* arena) = 0; |
21 | | }; |
22 | | |
23 | | } // namespace google::api::expr::runtime |
24 | | |
25 | | #endif // THIRD_PARTY_CEL_CPP_EVAL_PUBLIC_CEL_VALUE_PRODUCER_H_ |