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

Method WrapMapFieldKeyString

common/value.cc:1893–1907  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1891}
1892
1893StringValue Value::WrapMapFieldKeyString(
1894 const google::protobuf::MapKey& key,
1895 const google::protobuf::Message* absl_nonnull message ABSL_ATTRIBUTE_LIFETIME_BOUND,
1896 google::protobuf::Arena* absl_nonnull arena ABSL_ATTRIBUTE_LIFETIME_BOUND) {
1897 ABSL_DCHECK(message != nullptr);
1898 ABSL_DCHECK(arena != nullptr);
1899 ABSL_DCHECK_EQ(key.type(), google::protobuf::FieldDescriptor::CPPTYPE_STRING);
1900
1901#if CEL_INTERNAL_PROTOBUF_OSS_VERSION_PREREQ(5, 30, 0)
1902 return StringValue(Borrower::Arena(MessageArenaOr(message, arena)),
1903 key.GetStringValue());
1904#else
1905 return StringValue(arena, key.GetStringValue());
1906#endif
1907}
1908
1909Value Value::WrapMapFieldValue(
1910 const google::protobuf::MapValueConstRef& value,

Callers

nothing calls this directly

Calls 4

ArenaFunction · 0.85
typeMethod · 0.80
StringValueClass · 0.50
GetStringValueMethod · 0.45

Tested by

no test coverage detected