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

Method addSite

src/ifcparse/IfcHierarchyHelper.cpp:169–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167
168template <typename Schema>
169typename Schema::IfcSite* IfcHierarchyHelper<Schema>::addSite(typename Schema::IfcProject* proj, typename Schema::IfcOwnerHistory* owner_hist) {
170 if (!owner_hist) {
171 owner_hist = getSingle<typename Schema::IfcOwnerHistory>();
172 }
173 if (!owner_hist) {
174 owner_hist = addOwnerHistory();
175 }
176 if (!proj) {
177 proj = getSingle<typename Schema::IfcProject>();
178 }
179 if (!proj) {
180 proj = addProject(owner_hist);
181 }
182
183 typename Schema::IfcSite* site = new typename Schema::IfcSite(IfcParse::IfcGlobalId(),
184 owner_hist,
185 boost::none,
186 boost::none,
187 boost::none,
188 addLocalPlacement(),
189 0,
190 boost::none,
191 Schema::IfcElementCompositionEnum::IfcElementComposition_ELEMENT,
192 boost::none,
193 boost::none,
194 boost::none,
195 boost::none,
196 0);
197
198 addEntity(site);
199 addRelatedObject<typename Schema::IfcRelAggregates>(proj, site, owner_hist);
200 return site;
201}
202
203template <typename Schema>
204typename Schema::IfcBuilding* IfcHierarchyHelper<Schema>::addBuilding(typename Schema::IfcSite* site, typename Schema::IfcOwnerHistory* owner_hist) {

Callers 2

mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected