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

Method Equal

common/values/parsed_message_value.cc:139–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139absl::Status ParsedMessageValue::Equal(
140 const Value& other,
141 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
142 google::protobuf::MessageFactory* absl_nonnull message_factory,
143 google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const {
144 ABSL_DCHECK(descriptor_pool != nullptr);
145 ABSL_DCHECK(message_factory != nullptr);
146 ABSL_DCHECK(arena != nullptr);
147 ABSL_DCHECK(result != nullptr);
148
149 if (auto other_message = other.AsParsedMessage(); other_message) {
150 CEL_ASSIGN_OR_RETURN(
151 auto equal, internal::MessageEquals(*value_, **other_message,
152 descriptor_pool, message_factory));
153 *result = BoolValue(equal);
154 return absl::OkStatus();
155 }
156 if (auto other_struct = other.AsStruct(); other_struct) {
157 return common_internal::StructValueEqual(StructValue(*this), *other_struct,
158 descriptor_pool, message_factory,
159 arena, result);
160 }
161 *result = BoolValue(false);
162 return absl::OkStatus();
163}
164
165ParsedMessageValue ParsedMessageValue::Clone(
166 google::protobuf::Arena* absl_nonnull arena) const {

Callers

nothing calls this directly

Calls 5

StructValueEqualFunction · 0.85
BoolValueClass · 0.70
StructValueClass · 0.70
AsParsedMessageMethod · 0.45
AsStructMethod · 0.45

Tested by

no test coverage detected