Update schema references

This commit is contained in:
Thomas Krijnen
2022-07-17 21:13:46 +02:00
parent 0ca90817d8
commit 6026e037fa
13 changed files with 248 additions and 355 deletions
+9
View File
@@ -116,6 +116,9 @@ void IfcParse::register_schema(schema_definition* s) {
#ifdef HAS_SCHEMA_4x3_rc4
#include "../ifcparse/Ifc4x3_rc4.h"
#endif
#ifdef HAS_SCHEMA_4x3
#include "../ifcparse/Ifc4x3.h"
#endif
const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& name) {
// TODO: initialize automatically somehow
@@ -143,6 +146,9 @@ const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& n
#ifdef HAS_SCHEMA_4x3_rc4
Ifc4x3_rc4::get_schema();
#endif
#ifdef HAS_SCHEMA_4x3
Ifc4x3::get_schema();
#endif
std::map<std::string, const IfcParse::schema_definition*>::const_iterator it = schemas.find(boost::to_upper_copy(name));
if (it == schemas.end()) {
@@ -191,6 +197,9 @@ void IfcParse::clear_schemas() {
#ifdef HAS_SCHEMA_4x3_rc4
Ifc4x3_rc4::clear_schema();
#endif
#ifdef HAS_SCHEMA_4x3
Ifc4x3::clear_schema();
#endif
// clear any remaining registered schemas
// we pop schemas until map is empty, because map iteration is invalidated after each erasure