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

Function WriteHeaderLine

src/cpp/wasm/web-ifc-wasm.cpp:608–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606}
607
608bool WriteHeaderLine(uint32_t modelID, uint32_t type, emscripten::val parameters)
609{
610 if (!manager.IsModelOpen(modelID))
611 return false;
612 auto loader = manager.GetIfcLoader(modelID);
613 uint32_t start = loader->GetTotalSize();
614 std::string ifcName = manager.GetSchemaManager().IfcTypeCodeToType(type);
615 std::transform(ifcName.begin(), ifcName.end(), ifcName.begin(), ::toupper);
616 loader->Push<uint8_t>(webifc::parsing::IfcTokenType::LABEL);
617 loader->Push<uint16_t>((uint16_t)ifcName.size());
618 loader->Push((void *)ifcName.data(), ifcName.size());
619 bool responseCode = WriteSet(modelID, parameters);
620 loader->Push<uint8_t>(webifc::parsing::IfcTokenType::LINE_END);
621 loader->AddHeaderLineTape(type, start);
622 return responseCode;
623}
624
625void RemoveLine(uint32_t modelID, uint32_t expressID)
626{

Callers

nothing calls this directly

Calls 8

WriteSetFunction · 0.85
GetIfcLoaderMethod · 0.80
IfcTypeCodeToTypeMethod · 0.80
sizeMethod · 0.80
AddHeaderLineTapeMethod · 0.80
IsModelOpenMethod · 0.45
GetTotalSizeMethod · 0.45
PushMethod · 0.45

Tested by

no test coverage detected