mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-15 18:14:08 +00:00
In-code changes for ADD2
This commit is contained in:
@@ -65,6 +65,9 @@
|
||||
#ifdef HAS_SCHEMA_4x3_add1
|
||||
#include "Ifc4x3_add1.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
#include "Ifc4x3_add2.h"
|
||||
#endif
|
||||
|
||||
#include "IfcFile.h"
|
||||
#include "IfcGlobalId.h"
|
||||
@@ -313,6 +316,28 @@ void set_children_of_relation(Ifc4x3_add1::IfcRelAggregates* t, aggregate_of_ins
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAS_SCHEMA_4x3_add2
|
||||
Ifc4x3_add2::IfcObjectDefinition* get_parent_of_relation(Ifc4x3_add2::IfcRelContainedInSpatialStructure* t) {
|
||||
return t->RelatingStructure();
|
||||
}
|
||||
|
||||
aggregate_of_instance::ptr get_children_of_relation(Ifc4x3_add2::IfcRelContainedInSpatialStructure* t) {
|
||||
return t->RelatedElements()->generalize();
|
||||
}
|
||||
|
||||
aggregate_of_instance::ptr get_children_of_relation(Ifc4x3_add2::IfcRelAggregates* t) {
|
||||
return t->RelatedObjects()->generalize();
|
||||
}
|
||||
|
||||
void set_children_of_relation(Ifc4x3_add2::IfcRelContainedInSpatialStructure* t, aggregate_of_instance::ptr& cs) {
|
||||
t->setRelatedElements(cs->as<Ifc4x3_add2::IfcProduct>());
|
||||
}
|
||||
|
||||
void set_children_of_relation(Ifc4x3_add2::IfcRelAggregates* t, aggregate_of_instance::ptr& cs) {
|
||||
t->setRelatedObjects(cs->as<Ifc4x3_add2::IfcObjectDefinition>());
|
||||
}
|
||||
#endif
|
||||
|
||||
IfcUtil::IfcBaseClass* get_parent_of_relation(IfcUtil::IfcBaseClass* t) {
|
||||
return *t->data().getArgument(
|
||||
t->declaration().as_entity()->attribute_index("RelatingObject"));
|
||||
|
||||
Reference in New Issue
Block a user