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

Function NetworkAddressRepEqual

codelab/network_functions.cc:205–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205absl::Status NetworkAddressRepEqual(
206 const cel::OpaqueValueDispatcher* absl_nonnull,
207 cel::OpaqueValueContent content, const cel::OpaqueValue& other,
208 const google::protobuf::DescriptorPool* absl_nonnull,
209 google::protobuf::MessageFactory* absl_nonnull, google::protobuf::Arena* absl_nonnull,
210 cel::Value* absl_nonnull result) {
211 if (other.GetTypeId() != cel::TypeId<NetworkAddressRep>()) {
212 *result = cel::BoolValue(false);
213 return absl::OkStatus();
214 }
215 const NetworkAddressRep rep = content.To<NetworkAddressRep>();
216 absl::optional<NetworkAddressRep> other_rep =
217 NetworkAddressRep::Unwrap(other);
218 ABSL_DCHECK(other_rep.has_value());
219 *result = cel::BoolValue(rep.IsEqualTo(*other_rep));
220 return absl::OkStatus();
221}
222
223cel::OpaqueValue NetworkAddressRepClone(
224 const cel::OpaqueValueDispatcher* absl_nonnull,

Callers

nothing calls this directly

Calls 4

BoolValueClass · 0.50
GetTypeIdMethod · 0.45
has_valueMethod · 0.45
IsEqualToMethod · 0.45

Tested by

no test coverage detected