| 43 | } |
| 44 | |
| 45 | JsonSerializer* JsonSerializerFactory::Factory::construct(const std::string& schema_name, IfcParse::IfcFile* file, std::string json_filename, JsonSerializer::Dialect dialect) { |
| 46 | const std::string schema_name_lower = boost::to_lower_copy(schema_name); |
| 47 | auto it = this->find(schema_name_lower); |
| 48 | if (it == this->end()) { |
| 49 | throw IfcParse::IfcException("No Json serializer registered for " + schema_name); |
| 50 | } |
| 51 | return it->second(file, json_filename, dialect); |
| 52 | } |
| 53 | |
| 54 | JsonSerializer::JsonSerializer(IfcParse::IfcFile* file, const std::string& json_filename, JsonSerializer::Dialect dialect) { |
| 55 | if (file) { |
no test coverage detected