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

Function GetHeaderLine

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

Source from the content-addressed store, hash-verified

778}
779
780emscripten::val GetHeaderLine(uint32_t modelID, uint32_t headerType)
781{
782 if (!manager.IsModelOpen(modelID))
783 return emscripten::val::undefined();
784 auto loader = manager.GetIfcLoader(modelID);
785 auto lines = loader->GetHeaderLinesWithType(headerType);
786
787 if (lines.size() <= 0)
788 return emscripten::val::undefined();
789 auto line = lines[0];
790 loader->MoveToHeaderLineArgument(line, 0);
791
792 std::string s(manager.GetSchemaManager().IfcTypeCodeToType(headerType));
793 auto arguments = GetArgs(modelID);
794 auto retVal = emscripten::val::object();
795 retVal.set("ID", line);
796 retVal.set("type", s);
797 retVal.set("arguments", arguments);
798 return retVal;
799}
800
801emscripten::val GetLine(uint32_t modelID, uint32_t expressID)
802{

Callers

nothing calls this directly

Calls 7

GetIfcLoaderMethod · 0.80
sizeMethod · 0.80
IfcTypeCodeToTypeMethod · 0.80
GetArgsFunction · 0.70
IsModelOpenMethod · 0.45

Tested by

no test coverage detected