MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / StringMapFieldValueAccessor

Function StringMapFieldValueAccessor

common/value.cc:588–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

586}
587
588void StringMapFieldValueAccessor(
589 const google::protobuf::MapValueConstRef& value,
590 const google::protobuf::Message* absl_nonnull message,
591 const google::protobuf::FieldDescriptor* absl_nonnull field,
592 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
593 google::protobuf::MessageFactory* absl_nonnull message_factory,
594 google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) {
595 ABSL_DCHECK(message != nullptr);
596 ABSL_DCHECK(field != nullptr);
597 ABSL_DCHECK(descriptor_pool != nullptr);
598 ABSL_DCHECK(message_factory != nullptr);
599 ABSL_DCHECK(arena != nullptr);
600 ABSL_DCHECK(result != nullptr);
601 ABSL_DCHECK(!field->is_repeated());
602 ABSL_DCHECK_EQ(field->type(), google::protobuf::FieldDescriptor::TYPE_STRING);
603
604 if (message->GetArena() == nullptr) {
605 *result = StringValue(arena, value.GetStringValue());
606 } else {
607 *result = StringValue(Borrower::Arena(arena), value.GetStringValue());
608 }
609}
610
611void MessageMapFieldValueAccessor(
612 const google::protobuf::MapValueConstRef& value,

Callers

nothing calls this directly

Calls 5

ArenaFunction · 0.85
typeMethod · 0.80
StringValueClass · 0.50
GetArenaMethod · 0.45
GetStringValueMethod · 0.45

Tested by

no test coverage detected