| 167 | |
| 168 | template <typename Schema> |
| 169 | typename 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 | |
| 203 | template <typename Schema> |
| 204 | typename Schema::IfcBuilding* IfcHierarchyHelper<Schema>::addBuilding(typename Schema::IfcSite* site, typename Schema::IfcOwnerHistory* owner_hist) { |