Temporary access to a value. This pointer becomes invalid on the next modifying operation.
| 365 | /// |
| 366 | /// This pointer becomes invalid on the next modifying operation. |
| 367 | const uint8_t* GetValue(int64_t i, offset_type* out_length) const { |
| 368 | const offset_type* offsets = offsets_builder_.data(); |
| 369 | const auto offset = offsets[i]; |
| 370 | if (i == (length_ - 1)) { |
| 371 | *out_length = static_cast<offset_type>(value_data_builder_.length()) - offset; |
| 372 | } else { |
| 373 | *out_length = offsets[i + 1] - offset; |
| 374 | } |
| 375 | return value_data_builder_.data() + offset; |
| 376 | } |
| 377 | |
| 378 | offset_type offset(int64_t i) const { return offsets_data()[i]; } |
| 379 |