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

Function IsAlreadyWrapped

eval/public/structs/cel_proto_wrap_util.cc:1341–1350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1339}
1340
1341bool IsAlreadyWrapped(google::protobuf::Descriptor::WellKnownType wkt,
1342 const CelValue& value) {
1343 if (value.IsMessage()) {
1344 const auto* msg = value.MessageOrDie();
1345 if (wkt == msg->GetDescriptor()->well_known_type()) {
1346 return true;
1347 }
1348 }
1349 return false;
1350}
1351
1352// MessageFromValueMaker makes a specific protobuf Message instance based on
1353// the desired protobuf type name and an input CelValue.

Callers 1

MaybeWrapMessageMethod · 0.85

Calls 3

MessageOrDieMethod · 0.80
IsMessageMethod · 0.45
GetDescriptorMethod · 0.45

Tested by

no test coverage detected