MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / nameElement

Method nameElement

src/serializers/SvgSerializer.cpp:2272–2282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2270}
2271
2272std::string SvgSerializer::nameElement(const IfcUtil::IfcBaseEntity* storey, const IfcGeom::Element* elem) {
2273 auto n = elem->name();
2274 IfcUtil::escape_xml(n);
2275
2276 return nameElement_({
2277 {"id", with_section_heights_from_storey_ ? object_id(storey, elem) : GeometrySerializer::object_id(elem)},
2278 {"class", elem->type()},
2279 {namespace_prefix_ + "name", n},
2280 {namespace_prefix_ + "guid", elem->guid()}
2281 });
2282}
2283
2284std::string SvgSerializer::idElement(const IfcUtil::IfcBaseEntity* elem) {
2285 const std::string type = elem->declaration().is("IfcBuildingStorey") ? "storey" : "product";

Callers

nothing calls this directly

Calls 7

nameElement_Function · 0.85
object_idFunction · 0.85
isNullMethod · 0.80
nameMethod · 0.45
typeMethod · 0.45
guidMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected