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

Function DoubleRepeatedFieldAccessor

common/value.cc:746–768  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

744namespace {
745
746void DoubleRepeatedFieldAccessor(
747 int index, const google::protobuf::Message* absl_nonnull message,
748 const google::protobuf::FieldDescriptor* absl_nonnull field,
749 const google::protobuf::Reflection* absl_nonnull reflection,
750 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
751 google::protobuf::MessageFactory* absl_nonnull message_factory,
752 google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) {
753 ABSL_DCHECK(message != nullptr);
754 ABSL_DCHECK(field != nullptr);
755 ABSL_DCHECK(message_factory != nullptr);
756 ABSL_DCHECK(descriptor_pool != nullptr);
757 ABSL_DCHECK(reflection != nullptr);
758 ABSL_DCHECK(arena != nullptr);
759 ABSL_DCHECK(result != nullptr);
760 ABSL_DCHECK_EQ(reflection, message->GetReflection());
761 ABSL_DCHECK_EQ(field->containing_type(), message->GetDescriptor());
762 ABSL_DCHECK(field->is_repeated());
763 ABSL_DCHECK_EQ(field->cpp_type(), google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE);
764 ABSL_DCHECK_GE(index, 0);
765 ABSL_DCHECK_LT(index, reflection->FieldSize(*message, field));
766
767 *result = DoubleValue(reflection->GetRepeatedDouble(*message, field, index));
768}
769
770void FloatRepeatedFieldAccessor(
771 int index, const google::protobuf::Message* absl_nonnull message,

Callers

nothing calls this directly

Calls 3

DoubleValueClass · 0.50
GetReflectionMethod · 0.45
GetDescriptorMethod · 0.45

Tested by

no test coverage detected