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

Method Get

common/legacy_value.cc:516–527  ·  view source on GitHub ↗

See LegacyListValueInterface::Get for documentation.

Source from the content-addressed store, hash-verified

514
515// See LegacyListValueInterface::Get for documentation.
516absl::Status LegacyListValue::Get(
517 size_t index, const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
518 google::protobuf::MessageFactory* absl_nonnull message_factory,
519 google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const {
520 if (ABSL_PREDICT_FALSE(index < 0 || index >= impl_->size())) {
521 *result = ErrorValue(absl::InvalidArgumentError("index out of bounds"));
522 return absl::OkStatus();
523 }
524 CEL_RETURN_IF_ERROR(
525 ModernValue(arena, impl_->Get(arena, static_cast<int>(index)), *result));
526 return absl::OkStatus();
527}
528
529absl::Status LegacyListValue::ForEach(
530 ForEachWithIndexCallback callback,

Callers 9

NextMethod · 0.45
Next1Method · 0.45
Next2Method · 0.45
NextMethod · 0.45
Next1Method · 0.45
Next2Method · 0.45
ForEachMethod · 0.45
ContainsMethod · 0.45
FindMethod · 0.45

Calls 8

ErrorValueFunction · 0.85
ModernValueFunction · 0.70
InvalidMapKeyTypeErrorFunction · 0.70
NoSuchKeyErrorFunction · 0.50
sizeMethod · 0.45
kindMethod · 0.45
has_valueMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected