| 36 | using ::google::api::expr::runtime::CelFunction; |
| 37 | |
| 38 | absl::StatusOr<bool> AdapterActivationImpl::FindVariable( |
| 39 | absl::string_view name, |
| 40 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 41 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 42 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 43 | // This implementation should only be used during interop, when we can |
| 44 | // always assume the memory manager is backed by a protobuf arena. |
| 45 | |
| 46 | absl::optional<google::api::expr::runtime::CelValue> legacy_value = |
| 47 | legacy_activation_.FindValue(name, arena); |
| 48 | if (!legacy_value.has_value()) { |
| 49 | return false; |
| 50 | } |
| 51 | CEL_RETURN_IF_ERROR(ModernValue(arena, *legacy_value, *result)); |
| 52 | return true; |
| 53 | } |
| 54 | |
| 55 | std::vector<FunctionOverloadReference> |
| 56 | AdapterActivationImpl::FindFunctionOverloads(absl::string_view name) const |