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

Method ForEach

common/values/value_builder.cc:280–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278 size_t Size() const override { return elements_.size(); }
279
280 absl::Status ForEach(
281 ForEachWithIndexCallback callback,
282 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
283 google::protobuf::MessageFactory* absl_nonnull message_factory,
284 google::protobuf::Arena* absl_nonnull arena) const override {
285 const size_t size = elements_.size();
286 for (size_t i = 0; i < size; ++i) {
287 CEL_ASSIGN_OR_RETURN(auto ok, callback(i, elements_[i]));
288 if (!ok) {
289 break;
290 }
291 }
292 return absl::OkStatus();
293 }
294
295 absl::StatusOr<absl_nonnull ValueIteratorPtr> NewIterator() const override {
296 return std::make_unique<CompatListValueImplIterator>(

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected