| 15 | namespace runtime { |
| 16 | |
| 17 | absl::optional<CelValue> Activation::FindValue(absl::string_view name, |
| 18 | google::protobuf::Arena* arena) const { |
| 19 | auto entry = value_map_.find(name); |
| 20 | |
| 21 | // No entry found. |
| 22 | if (entry == value_map_.end()) { |
| 23 | return {}; |
| 24 | } |
| 25 | |
| 26 | return entry->second.RetrieveValue(arena); |
| 27 | } |
| 28 | |
| 29 | absl::Status Activation::InsertFunction(std::unique_ptr<CelFunction> function) { |
| 30 | auto& overloads = function_map_[function->descriptor().name()]; |