| 165 | } |
| 166 | |
| 167 | const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& name) { |
| 168 | // TODO: initialize automatically somehow |
| 169 | Header_section_schema::get_schema(); |
| 170 | #ifdef HAS_SCHEMA_2x3 |
| 171 | Ifc2x3::get_schema(); |
| 172 | #endif |
| 173 | #ifdef HAS_SCHEMA_4 |
| 174 | Ifc4::get_schema(); |
| 175 | #endif |
| 176 | #ifdef HAS_SCHEMA_4x1 |
| 177 | Ifc4x1::get_schema(); |
| 178 | #endif |
| 179 | #ifdef HAS_SCHEMA_4x2 |
| 180 | Ifc4x2::get_schema(); |
| 181 | #endif |
| 182 | #ifdef HAS_SCHEMA_4x3_rc1 |
| 183 | Ifc4x3_rc1::get_schema(); |
| 184 | #endif |
| 185 | #ifdef HAS_SCHEMA_4x3_rc2 |
| 186 | Ifc4x3_rc2::get_schema(); |
| 187 | #endif |
| 188 | #ifdef HAS_SCHEMA_4x3_rc3 |
| 189 | Ifc4x3_rc3::get_schema(); |
| 190 | #endif |
| 191 | #ifdef HAS_SCHEMA_4x3_rc4 |
| 192 | Ifc4x3_rc4::get_schema(); |
| 193 | #endif |
| 194 | #ifdef HAS_SCHEMA_4x3 |
| 195 | Ifc4x3::get_schema(); |
| 196 | #endif |
| 197 | #ifdef HAS_SCHEMA_4x3_tc1 |
| 198 | Ifc4x3_tc1::get_schema(); |
| 199 | #endif |
| 200 | #ifdef HAS_SCHEMA_4x3_add1 |
| 201 | Ifc4x3_add1::get_schema(); |
| 202 | #endif |
| 203 | #ifdef HAS_SCHEMA_4x3_add2 |
| 204 | Ifc4x3_add2::get_schema(); |
| 205 | #endif |
| 206 | |
| 207 | std::map<std::string, const IfcParse::schema_definition*>::const_iterator iter = schemas.find(boost::to_upper_copy(name)); |
| 208 | if (iter == schemas.end()) { |
| 209 | throw IfcParse::IfcException("No schema named " + name); |
| 210 | } |
| 211 | return iter->second; |
| 212 | } |
| 213 | |
| 214 | std::vector<std::string> IfcParse::schema_names() { |
| 215 | // Load schema modules |