| 370 | } |
| 371 | |
| 372 | absl::Status ParsedMapFieldValue::Has( |
| 373 | const Value& key, |
| 374 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 375 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 376 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 377 | ABSL_DCHECK(*this); |
| 378 | if (ABSL_PREDICT_FALSE(field_ == nullptr)) { |
| 379 | *result = BoolValue(false); |
| 380 | return absl::OkStatus(); |
| 381 | } |
| 382 | const google::protobuf::FieldDescriptor* absl_nonnull key_field = |
| 383 | field_->message_type()->map_key(); |
| 384 | std::string proto_key_scratch; |
| 385 | google::protobuf::MapKey proto_key; |
| 386 | bool bool_result; |
| 387 | if (ValueToProtoMapKey(key, key_field->cpp_type(), &proto_key, |
| 388 | proto_key_scratch)) { |
| 389 | google::protobuf::MapValueConstRef proto_value; |
| 390 | bool_result = extensions::protobuf_internal::LookupMapValue( |
| 391 | *GetReflection(), *message_, *field_, proto_key, &proto_value); |
| 392 | } else { |
| 393 | bool_result = false; |
| 394 | } |
| 395 | *result = BoolValue(bool_result); |
| 396 | return absl::OkStatus(); |
| 397 | } |
| 398 | |
| 399 | absl::Status ParsedMapFieldValue::ListKeys( |
| 400 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
nothing calls this directly
no test coverage detected