| 38 | } |
| 39 | |
| 40 | ifcopenshell::geometry::abstract_mapping* ifcopenshell::geometry::impl::MappingFactoryImplementation::construct(IfcParse::IfcFile* file, Settings& s) { |
| 41 | const std::string schema_name_lower = boost::to_lower_copy(file->schema()->name()); |
| 42 | std::map<std::string, ifcopenshell::geometry::impl::mapping_fn>::const_iterator it; |
| 43 | it = this->find(schema_name_lower); |
| 44 | if (it == end()) { |
| 45 | throw IfcParse::IfcException("No geometry mapping registered for " + schema_name_lower); |
| 46 | } |
| 47 | auto new_mapping = it->second(file, s); |
| 48 | new_mapping->initialize_settings(); |
| 49 | return new_mapping; |
| 50 | } |
no test coverage detected