| 629 | } |
| 630 | |
| 631 | bool WriteLine(uint32_t modelID, uint32_t expressID, uint32_t type, emscripten::val parameters) |
| 632 | { |
| 633 | if (!manager.IsModelOpen(modelID)) |
| 634 | return false; |
| 635 | auto loader = manager.GetIfcLoader(modelID); |
| 636 | uint32_t start = loader->GetTotalSize(); |
| 637 | |
| 638 | // line ID |
| 639 | loader->Push<uint8_t>(webifc::parsing::IfcTokenType::REF); |
| 640 | loader->Push<uint32_t>(expressID); |
| 641 | |
| 642 | // line TYPE |
| 643 | std::string ifcName = manager.GetSchemaManager().IfcTypeCodeToType(type); |
| 644 | std::transform(ifcName.begin(), ifcName.end(), ifcName.begin(), ::toupper); |
| 645 | loader->Push<uint8_t>(webifc::parsing::IfcTokenType::LABEL); |
| 646 | loader->Push<uint16_t>((uint16_t)ifcName.size()); |
| 647 | loader->Push((void *)ifcName.data(), ifcName.size()); |
| 648 | bool responseCode = WriteSet(modelID, parameters); |
| 649 | // end line |
| 650 | loader->Push<uint8_t>(webifc::parsing::IfcTokenType::LINE_END); |
| 651 | |
| 652 | loader->UpdateLineTape(expressID, type, start); |
| 653 | return responseCode; |
| 654 | } |
| 655 | |
| 656 | emscripten::val ReadValue(uint32_t modelID, webifc::parsing::IfcTokenType t) |
| 657 | { |
nothing calls this directly
no test coverage detected