mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
fix: #734 - No XML serializer registered for IFC4X1
This commit is contained in:
committed by
Thomas Krijnen
parent
3937d995b6
commit
05a5c3c3f9
@@ -466,6 +466,17 @@ Ifc4::IfcStyledItem* create_styled_item(Ifc4::IfcRepresentationItem* item, Ifc4:
|
||||
return new Ifc4::IfcStyledItem(item, style_assignments, boost::none);
|
||||
}
|
||||
|
||||
Ifc4x1::IfcStyledItem* create_styled_item(Ifc4x1::IfcRepresentationItem* item, Ifc4x1::IfcPresentationStyleAssignment* style_assignment) {
|
||||
IfcEntityList::ptr style_assignments(new IfcEntityList);
|
||||
style_assignments->push(style_assignment);
|
||||
return new Ifc4x1::IfcStyledItem(item, style_assignments, boost::none);
|
||||
}
|
||||
|
||||
Ifc4x2::IfcStyledItem* create_styled_item(Ifc4x2::IfcRepresentationItem* item, Ifc4x2::IfcPresentationStyleAssignment* style_assignment) {
|
||||
IfcEntityList::ptr style_assignments(new IfcEntityList);
|
||||
style_assignments->push(style_assignment);
|
||||
return new Ifc4x2::IfcStyledItem(item, style_assignments, boost::none);
|
||||
}
|
||||
template <typename Schema>
|
||||
void IfcHierarchyHelper<Schema>::setSurfaceColour(typename Schema::IfcRepresentation* rep,
|
||||
typename Schema::IfcPresentationStyleAssignment* style_assignment)
|
||||
@@ -560,3 +571,5 @@ typename Schema::IfcGeometricRepresentationContext* IfcHierarchyHelper<Schema>::
|
||||
|
||||
template IFC_PARSE_API class IfcHierarchyHelper<Ifc2x3>;
|
||||
template IFC_PARSE_API class IfcHierarchyHelper<Ifc4>;
|
||||
template IFC_PARSE_API class IfcHierarchyHelper<Ifc4x1>;
|
||||
template IFC_PARSE_API class IfcHierarchyHelper<Ifc4x2>;
|
||||
|
||||
@@ -79,6 +79,13 @@ namespace {
|
||||
return t->RelatedElements()->generalize();
|
||||
}
|
||||
|
||||
IfcEntityList::ptr get_children_of_relation(Ifc4x1::IfcRelContainedInSpatialStructure* t) {
|
||||
return t->RelatedElements()->generalize();
|
||||
}
|
||||
|
||||
IfcEntityList::ptr get_children_of_relation(Ifc4x2::IfcRelContainedInSpatialStructure* t) {
|
||||
return t->RelatedElements()->generalize();
|
||||
}
|
||||
void set_children_of_relation(IfcUtil::IfcBaseClass* t, IfcEntityList::ptr& cs) {
|
||||
IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument;
|
||||
attr->set(cs);
|
||||
@@ -95,8 +102,15 @@ namespace {
|
||||
void set_children_of_relation(Ifc4::IfcRelContainedInSpatialStructure* t, IfcEntityList::ptr& cs) {
|
||||
t->setRelatedElements(cs->as<Ifc4::IfcProduct>());
|
||||
}
|
||||
}
|
||||
|
||||
void set_children_of_relation(Ifc4x1::IfcRelContainedInSpatialStructure* t, IfcEntityList::ptr& cs) {
|
||||
t->setRelatedElements(cs->as<Ifc4x1::IfcProduct>());
|
||||
}
|
||||
|
||||
void set_children_of_relation(Ifc4x2::IfcRelContainedInSpatialStructure* t, IfcEntityList::ptr& cs) {
|
||||
t->setRelatedElements(cs->as<Ifc4x2::IfcProduct>());
|
||||
}
|
||||
}
|
||||
template <typename Schema>
|
||||
class IFC_PARSE_API IfcHierarchyHelper : public IfcParse::IfcFile {
|
||||
public:
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
|
||||
extern void init_XmlSerializerIfc2x3(XmlSerializerFactory::Factory*);
|
||||
extern void init_XmlSerializerIfc4(XmlSerializerFactory::Factory*);
|
||||
extern void init_XmlSerializerIfc4x1(XmlSerializerFactory::Factory*);
|
||||
extern void init_XmlSerializerIfc4x2(XmlSerializerFactory::Factory*);
|
||||
|
||||
XmlSerializerFactory::Factory::Factory() {
|
||||
init_XmlSerializerIfc2x3(this);
|
||||
init_XmlSerializerIfc4(this);
|
||||
init_XmlSerializerIfc4x1(this);
|
||||
init_XmlSerializerIfc4x2(this);
|
||||
}
|
||||
|
||||
void XmlSerializerFactory::Factory::bind(const std::string& schema_name, fn f) {
|
||||
|
||||
Reference in New Issue
Block a user