See ListValueInterface::Get for documentation.
| 180 | |
| 181 | // See ListValueInterface::Get for documentation. |
| 182 | absl::Status ParsedRepeatedFieldValue::Get( |
| 183 | size_t index, const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 184 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 185 | google::protobuf::Arena* absl_nonnull arena, Value* absl_nonnull result) const { |
| 186 | ABSL_DCHECK(*this); |
| 187 | ABSL_DCHECK(message_ != nullptr); |
| 188 | |
| 189 | if (ABSL_PREDICT_FALSE(field_ == nullptr || |
| 190 | index >= std::numeric_limits<int>::max() || |
| 191 | static_cast<int>(index) >= |
| 192 | GetReflection()->FieldSize(*message_, field_))) { |
| 193 | *result = IndexOutOfBoundsError(index); |
| 194 | return absl::OkStatus(); |
| 195 | } |
| 196 | if (arena_ == nullptr) { |
| 197 | *result = Value::WrapRepeatedFieldUnsafe(static_cast<int>(index), message_, |
| 198 | field_, descriptor_pool, |
| 199 | message_factory, arena); |
| 200 | } else { |
| 201 | *result = |
| 202 | Value::WrapRepeatedField(static_cast<int>(index), message_, field_, |
| 203 | descriptor_pool, message_factory, arena); |
| 204 | } |
| 205 | return absl::OkStatus(); |
| 206 | } |
| 207 | |
| 208 | absl::Status ParsedRepeatedFieldValue::ForEach( |
| 209 | ForEachWithIndexCallback callback, |
nothing calls this directly
no test coverage detected