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

Function BytesMapFieldValueAccessor

common/value.cc:631–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629}
630
631void BytesMapFieldValueAccessor(
632 const google::protobuf::MapValueConstRef& value,
633 const google::protobuf::Message* absl_nonnull message,
634 const google::protobuf::FieldDescriptor* absl_nonnull field,
635 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
636 google::protobuf::MessageFactory* absl_nonnull message_factory,
637 google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) {
638 ABSL_DCHECK(message != nullptr);
639 ABSL_DCHECK(field != nullptr);
640 ABSL_DCHECK(descriptor_pool != nullptr);
641 ABSL_DCHECK(message_factory != nullptr);
642 ABSL_DCHECK(arena != nullptr);
643 ABSL_DCHECK(result != nullptr);
644 ABSL_DCHECK(!field->is_repeated());
645 ABSL_DCHECK_EQ(field->type(), google::protobuf::FieldDescriptor::TYPE_BYTES);
646
647 if (message->GetArena() == nullptr) {
648 *result = BytesValue(arena, value.GetStringValue());
649 } else {
650 *result = BytesValue(Borrower::Arena(arena), value.GetStringValue());
651 }
652}
653
654void EnumMapFieldValueAccessor(
655 const google::protobuf::MapValueConstRef& value,

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected