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

Method Next2

common/legacy_value.cc:136–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134 }
135
136 absl::StatusOr<bool> Next2(
137 const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
138 google::protobuf::MessageFactory* absl_nonnull message_factory,
139 google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull key,
140 Value* absl_nullable value) override {
141 ABSL_DCHECK(descriptor_pool != nullptr);
142 ABSL_DCHECK(message_factory != nullptr);
143 ABSL_DCHECK(arena != nullptr);
144 ABSL_DCHECK(key != nullptr);
145
146 if (index_ >= size_) {
147 return false;
148 }
149 if (value != nullptr) {
150 auto cel_value = cel_list_->Get(arena, index_);
151 CEL_RETURN_IF_ERROR(ModernValue(arena, cel_value, *value));
152 }
153 *key = IntValue(index_);
154 ++index_;
155 return true;
156 }
157
158 private:
159 const CelList* const cel_list_;

Callers

nothing calls this directly

Calls 3

ModernValueFunction · 0.70
IntValueClass · 0.50
GetMethod · 0.45

Tested by

no test coverage detected