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

Method ForEach

common/legacy_value.cc:529–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529absl::Status LegacyListValue::ForEach(
530 ForEachWithIndexCallback callback,
531 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
532 google::protobuf::MessageFactory* absl_nonnull message_factory,
533 google::protobuf::Arena* absl_nonnull arena) const {
534 const auto size = impl_->size();
535 Value element;
536 for (int index = 0; index < size; ++index) {
537 CEL_RETURN_IF_ERROR(ModernValue(arena, impl_->Get(arena, index), element));
538 CEL_ASSIGN_OR_RETURN(auto ok, callback(index, Value(element)));
539 if (!ok) {
540 break;
541 }
542 }
543 return absl::OkStatus();
544}
545
546absl::StatusOr<absl_nonnull ValueIteratorPtr> LegacyListValue::NewIterator()
547 const {

Callers 11

MatchAndExplainMethod · 0.45
MatchAndExplainMethod · 0.45
SetsContainsFunction · 0.45
SetsIntersectsFunction · 0.45
MapInsertKeyValueFunction · 0.45
MapInsertMapFunction · 0.45
FormatMapFunction · 0.45
TEST_FFunction · 0.45
ASSERT_OK_AND_ASSIGNFunction · 0.45
ListUnwrapOptFunction · 0.45

Calls 3

ModernValueFunction · 0.70
sizeMethod · 0.45
GetMethod · 0.45

Tested by 4

MatchAndExplainMethod · 0.36
MatchAndExplainMethod · 0.36
TEST_FFunction · 0.36
ASSERT_OK_AND_ASSIGNFunction · 0.36