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

Method ForEach

common/values/value_builder.cc:417–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415 size_t Size() const override { return elements_.size(); }
416
417 absl::Status ForEach(
418 ForEachWithIndexCallback callback,
419 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
420 google::protobuf::MessageFactory* absl_nonnull message_factory,
421 google::protobuf::Arena* absl_nonnull arena) const override {
422 const size_t size = elements_.size();
423 for (size_t i = 0; i < size; ++i) {
424 CEL_ASSIGN_OR_RETURN(auto ok, callback(i, elements_[i]));
425 if (!ok) {
426 break;
427 }
428 }
429 return absl::OkStatus();
430 }
431
432 absl::StatusOr<absl_nonnull ValueIteratorPtr> NewIterator() const override {
433 return std::make_unique<CompatListValueImplIterator>(

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected