| 388 | } |
| 389 | |
| 390 | bool Tuple::getBool(size_t index) const { |
| 391 | if (index >= offsets.size()) { |
| 392 | throw invalid_tuple_index(); |
| 393 | } |
| 394 | ASSERT_LT(offsets[index], data.size()); |
| 395 | uint8_t code = data[offsets[index]]; |
| 396 | if (code == FALSE_CODE) { |
| 397 | return false; |
| 398 | } else if (code == TRUE_CODE) { |
| 399 | return true; |
| 400 | } else { |
| 401 | throw invalid_tuple_data_type(); |
| 402 | } |
| 403 | } |
| 404 | |
| 405 | float Tuple::getFloat(size_t index) const { |
| 406 | if (index >= offsets.size()) { |