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

Function AddValueToRepeatedField

eval/public/structs/field_access_impl.cc:733–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731}
732
733absl::Status AddValueToRepeatedField(const CelValue& value,
734 const FieldDescriptor* desc, Message* msg,
735 Arena* arena) {
736 RepeatedFieldSetter setter(msg, desc, arena);
737 return (setter.SetFieldFromCelValue(value))
738 ? absl::OkStatus()
739 : absl::InvalidArgumentError(absl::Substitute(
740 "Could not add supplied argument to message \"$0\" field "
741 "\"$1\" of type $2: value type \"$3\"",
742 msg->GetDescriptor()->name(), desc->name(),
743 desc->type_name(), CelValue::TypeName(value.type())));
744}
745
746} // namespace google::api::expr::runtime::internal

Callers 3

CEL_ASSIGN_OR_RETURNFunction · 0.70
TEST_PFunction · 0.70
TESTFunction · 0.70

Calls 4

SetFieldFromCelValueMethod · 0.80
typeMethod · 0.80
nameMethod · 0.45
GetDescriptorMethod · 0.45

Tested by 2

TEST_PFunction · 0.56
TESTFunction · 0.56