| 504 | } |
| 505 | |
| 506 | const std::vector<uint32_t> IfcLoader::GetSetArgument() const |
| 507 | { |
| 508 | std::vector<uint32_t> tapeOffsets; |
| 509 | tapeOffsets.reserve(4); |
| 510 | |
| 511 | _tokenStream->Read<char>(); // set begin |
| 512 | int depth = 1; |
| 513 | while (depth > 0) |
| 514 | { |
| 515 | uint32_t offset = _tokenStream->GetReadOffset(); |
| 516 | IfcTokenType t = static_cast<IfcTokenType>(_tokenStream->Read<char>()); |
| 517 | |
| 518 | switch (t) { |
| 519 | case IfcTokenType::SET_BEGIN: |
| 520 | depth++; |
| 521 | break; |
| 522 | case IfcTokenType::SET_END: |
| 523 | depth--; |
| 524 | break; |
| 525 | case IfcTokenType::REF: |
| 526 | tapeOffsets.push_back(offset); |
| 527 | _tokenStream->Read<uint32_t>(); |
| 528 | break; |
| 529 | case IfcTokenType::STRING: |
| 530 | case IfcTokenType::INTEGER: |
| 531 | case IfcTokenType::REAL: |
| 532 | case IfcTokenType::LABEL: |
| 533 | case IfcTokenType::ENUM: { |
| 534 | tapeOffsets.push_back(offset); |
| 535 | uint16_t length = _tokenStream->Read<uint16_t>(); |
| 536 | _tokenStream->Forward(length); |
| 537 | break; |
| 538 | } |
| 539 | default: |
| 540 | spdlog::error("[GetSetArgument[]) unexpected token", GetCurrentLineExpressID()); |
| 541 | break; |
| 542 | } |
| 543 | } |
| 544 | |
| 545 | return tapeOffsets; |
| 546 | } |
| 547 | |
| 548 | const std::vector<std::vector<uint32_t>> IfcLoader::GetSetListArgument() const |
| 549 | { |
no test coverage detected