mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 05:10:53 +00:00
Be sure to init header_section_schema when obtaining schemas in python #7131
This commit is contained in:
@@ -59,6 +59,7 @@
|
|||||||
#ifdef HAS_SCHEMA_4x3_add2
|
#ifdef HAS_SCHEMA_4x3_add2
|
||||||
#include "Ifc4x3_add2.h"
|
#include "Ifc4x3_add2.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "Header_section_schema.h"
|
||||||
|
|
||||||
bool IfcParse::declaration::is(const std::string& name) const {
|
bool IfcParse::declaration::is(const std::string& name) const {
|
||||||
const std::string* name_ptr = &name;
|
const std::string* name_ptr = &name;
|
||||||
@@ -165,6 +166,7 @@ void IfcParse::register_schema(schema_definition* schema) {
|
|||||||
|
|
||||||
const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& name) {
|
const IfcParse::schema_definition* IfcParse::schema_by_name(const std::string& name) {
|
||||||
// TODO: initialize automatically somehow
|
// TODO: initialize automatically somehow
|
||||||
|
Header_section_schema::get_schema();
|
||||||
#ifdef HAS_SCHEMA_2x3
|
#ifdef HAS_SCHEMA_2x3
|
||||||
Ifc2x3::get_schema();
|
Ifc2x3::get_schema();
|
||||||
#endif
|
#endif
|
||||||
@@ -262,6 +264,7 @@ void IfcParse::clear_schemas() {
|
|||||||
#ifdef HAS_SCHEMA_4x3_add2
|
#ifdef HAS_SCHEMA_4x3_add2
|
||||||
Ifc4x3_add2::clear_schema();
|
Ifc4x3_add2::clear_schema();
|
||||||
#endif
|
#endif
|
||||||
|
Header_section_schema::clear_schema();
|
||||||
|
|
||||||
// clear any remaining registered schemas
|
// clear any remaining registered schemas
|
||||||
// we pop schemas until map is empty, because map iteration is invalidated after each erasure
|
// we pop schemas until map is empty, because map iteration is invalidated after each erasure
|
||||||
|
|||||||
Reference in New Issue
Block a user