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

Function EnumRepeatedFieldAccessor

common/value.cc:1022–1046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1020}
1021
1022void EnumRepeatedFieldAccessor(
1023 int index, const google::protobuf::Message* absl_nonnull message,
1024 const google::protobuf::FieldDescriptor* absl_nonnull field,
1025 const google::protobuf::Reflection* absl_nonnull reflection,
1026 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
1027 google::protobuf::MessageFactory* absl_nonnull message_factory,
1028 google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) {
1029 ABSL_DCHECK(message != nullptr);
1030 ABSL_DCHECK(field != nullptr);
1031 ABSL_DCHECK(message_factory != nullptr);
1032 ABSL_DCHECK(descriptor_pool != nullptr);
1033 ABSL_DCHECK(reflection != nullptr);
1034 ABSL_DCHECK(arena != nullptr);
1035 ABSL_DCHECK(result != nullptr);
1036 ABSL_DCHECK_EQ(reflection, message->GetReflection());
1037 ABSL_DCHECK_EQ(field->containing_type(), message->GetDescriptor());
1038 ABSL_DCHECK(field->is_repeated());
1039 ABSL_DCHECK_EQ(field->cpp_type(), google::protobuf::FieldDescriptor::CPPTYPE_ENUM);
1040 ABSL_DCHECK_GE(index, 0);
1041 ABSL_DCHECK_LT(index, reflection->FieldSize(*message, field));
1042
1043 *result = NonNullEnumValue(
1044 field->enum_type(),
1045 reflection->GetRepeatedEnumValue(*message, field, index));
1046}
1047
1048void NullRepeatedFieldAccessor(
1049 int index, const google::protobuf::Message* absl_nonnull message,

Callers

nothing calls this directly

Calls 3

NonNullEnumValueFunction · 0.85
GetReflectionMethod · 0.45
GetDescriptorMethod · 0.45

Tested by

no test coverage detected