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

Function Int64FromValue

eval/public/structs/cel_proto_wrap_util.cc:830–843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828}
829
830google::protobuf::Message* Int64FromValue(const google::protobuf::Message* prototype,
831 const CelValue& value, google::protobuf::Arena* arena) {
832 int64_t val;
833 if (!value.GetValue(&val)) {
834 return nullptr;
835 }
836 auto* message = prototype->New(arena);
837 CEL_ASSIGN_OR_RETURN(
838 auto reflection,
839 cel::well_known_types::GetInt64ValueReflection(message->GetDescriptor()),
840 _.With(IgnoreErrorAndReturnNullptr()));
841 reflection.SetValue(message, val);
842 return message;
843}
844
845google::protobuf::Message* StringFromValue(const google::protobuf::Message* prototype,
846 const CelValue& value, google::protobuf::Arena* arena) {

Callers 1

MaybeWrapMessageMethod · 0.85

Calls 3

GetValueMethod · 0.45
NewMethod · 0.45
SetValueMethod · 0.45

Tested by

no test coverage detected