MCPcopy Create free account
hub / github.com/ThatOpen/engine_web-ifc / GetSetArgument

Method GetSetArgument

src/cpp/web-ifc/parsing/IfcLoader.cpp:506–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 15

PopulateRelNestsMapMethod · 0.80
PopulateStyledItemMapMethod · 0.80
GetMeshMethod · 0.80
GetSurfaceMethod · 0.80
GetBrepMethod · 0.80
AddFaceToGeometryMethod · 0.80
GetCrossSections2DMethod · 0.80

Calls 3

errorFunction · 0.85
GetReadOffsetMethod · 0.80
ForwardMethod · 0.45

Tested by

no test coverage detected