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

Method object_id

src/ifcgeom/GeometrySerializer.h:165–171  ·  view source on GitHub ↗

Returns ID for the object depending on the used setting.

Source from the content-addressed store, hash-verified

163
164 /// Returns ID for the object depending on the used setting.
165 virtual std::string object_id(const IfcGeom::Element* o)
166 {
167 if (settings_.get<ifcopenshell::geometry::settings::UseElementGuids>().get()) return o->guid();
168 if (settings_.get<ifcopenshell::geometry::settings::UseElementNames>().get()) return o->name();
169 if (settings_.get<ifcopenshell::geometry::settings::UseElementStepIds>().get()) return "id-" + boost::lexical_cast<std::string>(o->id());
170 return o->unique_id();
171 }
172
173protected:
174 ifcopenshell::geometry::Settings geometry_settings_;

Callers

nothing calls this directly

Calls 4

getMethod · 0.45
guidMethod · 0.45
nameMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected