Merge branch 'v0.6.0' into v0.7.0

# Conflicts:
#	cmake/CMakeLists.txt
#	src/ifcconvert/IfcConvert.cpp
#	src/ifcgeom/IfcGeomRepresentation.h
#	src/ifcgeom/IfcRepresentationShapeItem.h
#	src/ifcgeom/kernels/opencascade/IfcGeomFunctions.cpp
#	src/ifcgeom/schema_agnostic/IfcGeomRepresentation.cpp
#	src/ifcgeom/schema_agnostic/Kernel.cpp
#	src/ifcgeom/schema_agnostic/Kernel.h
#	src/ifcgeomserver/IfcGeomServer.cpp
#	src/serializers/schema_dependent/XmlSerializer.cpp
This commit is contained in:
Thomas Krijnen
2019-04-26 15:07:50 +02:00
51 changed files with 10815 additions and 7568 deletions
-4
View File
@@ -52,10 +52,6 @@ namespace IfcUtil {
IFC_PARSE_API const char* ArgumentTypeToString(ArgumentType argument_type);
IFC_PARSE_API bool valid_binary_string(const std::string& s);
/// Replaces spaces and potentially other problem causing characters with underscores.
IFC_PARSE_API void sanitate_material_name(std::string &str);
IFC_PARSE_API void escape_xml(std::string &str);
IFC_PARSE_API void unescape_xml(std::string &str);
}
class IFC_PARSE_API Argument {
File diff suppressed because it is too large Load Diff
+5184 -4033
View File
File diff suppressed because it is too large Load Diff
+133 -29
View File
@@ -356,10 +356,13 @@ extern entity* IFC4_IfcIShapeProfileDef_type;
extern entity* IFC4_IfcImageTexture_type;
extern entity* IFC4_IfcIndexedColourMap_type;
extern entity* IFC4_IfcIndexedPolyCurve_type;
extern entity* IFC4_IfcIndexedPolygonalFace_type;
extern entity* IFC4_IfcIndexedPolygonalFaceWithVoids_type;
extern entity* IFC4_IfcIndexedTextureMap_type;
extern entity* IFC4_IfcIndexedTriangleTextureMap_type;
extern entity* IFC4_IfcInterceptor_type;
extern entity* IFC4_IfcInterceptorType_type;
extern entity* IFC4_IfcIntersectionCurve_type;
extern entity* IFC4_IfcInventory_type;
extern entity* IFC4_IfcIrregularTimeSeries_type;
extern entity* IFC4_IfcIrregularTimeSeriesValue_type;
@@ -469,6 +472,7 @@ extern entity* IFC4_IfcPointOnCurve_type;
extern entity* IFC4_IfcPointOnSurface_type;
extern entity* IFC4_IfcPolyLoop_type;
extern entity* IFC4_IfcPolygonalBoundedHalfSpace_type;
extern entity* IFC4_IfcPolygonalFaceSet_type;
extern entity* IFC4_IfcPolyline_type;
extern entity* IFC4_IfcPort_type;
extern entity* IFC4_IfcPostalAddress_type;
@@ -619,6 +623,7 @@ extern entity* IFC4_IfcSIUnit_type;
extern entity* IFC4_IfcSanitaryTerminal_type;
extern entity* IFC4_IfcSanitaryTerminalType_type;
extern entity* IFC4_IfcSchedulingTime_type;
extern entity* IFC4_IfcSeamCurve_type;
extern entity* IFC4_IfcSectionProperties_type;
extern entity* IFC4_IfcSectionReinforcementProperties_type;
extern entity* IFC4_IfcSectionedSpine_type;
@@ -652,6 +657,7 @@ extern entity* IFC4_IfcSpatialStructureElementType_type;
extern entity* IFC4_IfcSpatialZone_type;
extern entity* IFC4_IfcSpatialZoneType_type;
extern entity* IFC4_IfcSphere_type;
extern entity* IFC4_IfcSphericalSurface_type;
extern entity* IFC4_IfcStackTerminal_type;
extern entity* IFC4_IfcStackTerminalType_type;
extern entity* IFC4_IfcStair_type;
@@ -702,6 +708,7 @@ extern entity* IFC4_IfcSubContractResource_type;
extern entity* IFC4_IfcSubContractResourceType_type;
extern entity* IFC4_IfcSubedge_type;
extern entity* IFC4_IfcSurface_type;
extern entity* IFC4_IfcSurfaceCurve_type;
extern entity* IFC4_IfcSurfaceCurveSweptAreaSolid_type;
extern entity* IFC4_IfcSurfaceFeature_type;
extern entity* IFC4_IfcSurfaceOfLinearExtrusion_type;
@@ -756,6 +763,7 @@ extern entity* IFC4_IfcTimeSeries_type;
extern entity* IFC4_IfcTimeSeriesValue_type;
extern entity* IFC4_IfcTopologicalRepresentationItem_type;
extern entity* IFC4_IfcTopologyRepresentation_type;
extern entity* IFC4_IfcToroidalSurface_type;
extern entity* IFC4_IfcTransformer_type;
extern entity* IFC4_IfcTransformerType_type;
extern entity* IFC4_IfcTransportElement_type;
@@ -912,7 +920,6 @@ extern type_declaration* IFC4_IfcSoundPressureMeasure_type;
extern type_declaration* IFC4_IfcSpecificHeatCapacityMeasure_type;
extern type_declaration* IFC4_IfcSpecularExponent_type;
extern type_declaration* IFC4_IfcSpecularRoughness_type;
extern type_declaration* IFC4_IfcStrippedOptional_type;
extern type_declaration* IFC4_IfcTemperatureGradientMeasure_type;
extern type_declaration* IFC4_IfcTemperatureRateOfChangeMeasure_type;
extern type_declaration* IFC4_IfcText_type;
@@ -1307,8 +1314,8 @@ Ifc4::IfcBuildingElementPartTypeEnum::Value Ifc4::IfcBuildingElementPartTypeEnum
}
const char* Ifc4::IfcBuildingElementProxyTypeEnum::ToString(Value v) {
if ( v < 0 || v >= 6 ) throw IfcException("Unable to find find keyword in schema");
const char* names[] = { "COMPLEX", "ELEMENT", "PARTIAL", "PROVISIONFORVOID", "USERDEFINED", "NOTDEFINED" };
if ( v < 0 || v >= 7 ) throw IfcException("Unable to find find keyword in schema");
const char* names[] = { "COMPLEX", "ELEMENT", "PARTIAL", "PROVISIONFORVOID", "PROVISIONFORSPACE", "USERDEFINED", "NOTDEFINED" };
return names[v];
}
@@ -1317,6 +1324,7 @@ Ifc4::IfcBuildingElementProxyTypeEnum::Value Ifc4::IfcBuildingElementProxyTypeEn
if (s == "ELEMENT") return ::Ifc4::IfcBuildingElementProxyTypeEnum::IfcBuildingElementProxyType_ELEMENT;
if (s == "PARTIAL") return ::Ifc4::IfcBuildingElementProxyTypeEnum::IfcBuildingElementProxyType_PARTIAL;
if (s == "PROVISIONFORVOID") return ::Ifc4::IfcBuildingElementProxyTypeEnum::IfcBuildingElementProxyType_PROVISIONFORVOID;
if (s == "PROVISIONFORSPACE") return ::Ifc4::IfcBuildingElementProxyTypeEnum::IfcBuildingElementProxyType_PROVISIONFORSPACE;
if (s == "USERDEFINED") return ::Ifc4::IfcBuildingElementProxyTypeEnum::IfcBuildingElementProxyType_USERDEFINED;
if (s == "NOTDEFINED") return ::Ifc4::IfcBuildingElementProxyTypeEnum::IfcBuildingElementProxyType_NOTDEFINED;
throw IfcException("Unable to find find keyword in schema");
@@ -2447,7 +2455,7 @@ Ifc4::IfcEventTypeEnum::Value Ifc4::IfcEventTypeEnum::FromString(const std::stri
const char* Ifc4::IfcExternalSpatialElementTypeEnum::ToString(Value v) {
if ( v < 0 || v >= 6 ) throw IfcException("Unable to find find keyword in schema");
const char* names[] = { "EXTERNAL", "EXTERNAL_EARTH", "EXTERNAL_WATER", "EXTERNAL_FIRE", "USERDEFINED", "NOTDEFIEND" };
const char* names[] = { "EXTERNAL", "EXTERNAL_EARTH", "EXTERNAL_WATER", "EXTERNAL_FIRE", "USERDEFINED", "NOTDEFINED" };
return names[v];
}
@@ -2457,7 +2465,7 @@ Ifc4::IfcExternalSpatialElementTypeEnum::Value Ifc4::IfcExternalSpatialElementTy
if (s == "EXTERNAL_WATER") return ::Ifc4::IfcExternalSpatialElementTypeEnum::IfcExternalSpatialElementType_EXTERNAL_WATER;
if (s == "EXTERNAL_FIRE") return ::Ifc4::IfcExternalSpatialElementTypeEnum::IfcExternalSpatialElementType_EXTERNAL_FIRE;
if (s == "USERDEFINED") return ::Ifc4::IfcExternalSpatialElementTypeEnum::IfcExternalSpatialElementType_USERDEFINED;
if (s == "NOTDEFIEND") return ::Ifc4::IfcExternalSpatialElementTypeEnum::IfcExternalSpatialElementType_NOTDEFIEND;
if (s == "NOTDEFINED") return ::Ifc4::IfcExternalSpatialElementTypeEnum::IfcExternalSpatialElementType_NOTDEFINED;
throw IfcException("Unable to find find keyword in schema");
}
@@ -3254,6 +3262,19 @@ Ifc4::IfcPlateTypeEnum::Value Ifc4::IfcPlateTypeEnum::FromString(const std::stri
throw IfcException("Unable to find find keyword in schema");
}
const char* Ifc4::IfcPreferredSurfaceCurveRepresentation::ToString(Value v) {
if ( v < 0 || v >= 3 ) throw IfcException("Unable to find find keyword in schema");
const char* names[] = { "CURVE3D", "PCURVE_S1", "PCURVE_S2" };
return names[v];
}
Ifc4::IfcPreferredSurfaceCurveRepresentation::Value Ifc4::IfcPreferredSurfaceCurveRepresentation::FromString(const std::string& s) {
if (s == "CURVE3D") return ::Ifc4::IfcPreferredSurfaceCurveRepresentation::IfcPreferredSurfaceCurveRepresentation_CURVE3D;
if (s == "PCURVE_S1") return ::Ifc4::IfcPreferredSurfaceCurveRepresentation::IfcPreferredSurfaceCurveRepresentation_PCURVE_S1;
if (s == "PCURVE_S2") return ::Ifc4::IfcPreferredSurfaceCurveRepresentation::IfcPreferredSurfaceCurveRepresentation_PCURVE_S2;
throw IfcException("Unable to find find keyword in schema");
}
const char* Ifc4::IfcProcedureTypeEnum::ToString(Value v) {
if ( v < 0 || v >= 9 ) throw IfcException("Unable to find find keyword in schema");
const char* names[] = { "ADVICE_CAUTION", "ADVICE_NOTE", "ADVICE_WARNING", "CALIBRATION", "DIAGNOSTIC", "SHUTDOWN", "STARTUP", "USERDEFINED", "NOTDEFINED" };
@@ -3706,12 +3727,13 @@ Ifc4::IfcSectionTypeEnum::Value Ifc4::IfcSectionTypeEnum::FromString(const std::
}
const char* Ifc4::IfcSensorTypeEnum::ToString(Value v) {
if ( v < 0 || v >= 25 ) throw IfcException("Unable to find find keyword in schema");
const char* names[] = { "CO2SENSOR", "CONDUCTANCESENSOR", "CONTACTSENSOR", "FIRESENSOR", "FLOWSENSOR", "FROSTSENSOR", "GASSENSOR", "HEATSENSOR", "HUMIDITYSENSOR", "IDENTIFIERSENSOR", "IONCONCENTRATIONSENSOR", "LEVELSENSOR", "LIGHTSENSOR", "MOISTURESENSOR", "MOVEMENTSENSOR", "PHSENSOR", "PRESSURESENSOR", "RADIATIONSENSOR", "RADIOACTIVITYSENSOR", "SMOKESENSOR", "SOUNDSENSOR", "TEMPERATURESENSOR", "WINDSENSOR", "USERDEFINED", "NOTDEFINED" };
if ( v < 0 || v >= 26 ) throw IfcException("Unable to find find keyword in schema");
const char* names[] = { "COSENSOR", "CO2SENSOR", "CONDUCTANCESENSOR", "CONTACTSENSOR", "FIRESENSOR", "FLOWSENSOR", "FROSTSENSOR", "GASSENSOR", "HEATSENSOR", "HUMIDITYSENSOR", "IDENTIFIERSENSOR", "IONCONCENTRATIONSENSOR", "LEVELSENSOR", "LIGHTSENSOR", "MOISTURESENSOR", "MOVEMENTSENSOR", "PHSENSOR", "PRESSURESENSOR", "RADIATIONSENSOR", "RADIOACTIVITYSENSOR", "SMOKESENSOR", "SOUNDSENSOR", "TEMPERATURESENSOR", "WINDSENSOR", "USERDEFINED", "NOTDEFINED" };
return names[v];
}
Ifc4::IfcSensorTypeEnum::Value Ifc4::IfcSensorTypeEnum::FromString(const std::string& s) {
if (s == "COSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_COSENSOR;
if (s == "CO2SENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_CO2SENSOR;
if (s == "CONDUCTANCESENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_CONDUCTANCESENSOR;
if (s == "CONTACTSENSOR") return ::Ifc4::IfcSensorTypeEnum::IfcSensorType_CONTACTSENSOR;
@@ -5375,13 +5397,6 @@ Ifc4::IfcSpecularRoughness::IfcSpecularRoughness(IfcEntityInstanceData* e) { dat
Ifc4::IfcSpecularRoughness::IfcSpecularRoughness(double v) { data_ = new IfcEntityInstanceData(IFC4_IfcSpecularRoughness_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(v); data_->setArgument(0, attr);} }
Ifc4::IfcSpecularRoughness::operator double() const { return *data_->getArgument(0); }
// Function implementations for IfcStrippedOptional
const IfcParse::type_declaration& Ifc4::IfcStrippedOptional::Class() { return *IFC4_IfcStrippedOptional_type; }
const IfcParse::type_declaration& Ifc4::IfcStrippedOptional::declaration() const { return *IFC4_IfcStrippedOptional_type; }
Ifc4::IfcStrippedOptional::IfcStrippedOptional(IfcEntityInstanceData* e) { data_ = e; }
Ifc4::IfcStrippedOptional::IfcStrippedOptional(bool v) { data_ = new IfcEntityInstanceData(IFC4_IfcStrippedOptional_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(v); data_->setArgument(0, attr);} }
Ifc4::IfcStrippedOptional::operator bool() const { return *data_->getArgument(0); }
// Function implementations for IfcTemperatureGradientMeasure
const IfcParse::type_declaration& Ifc4::IfcTemperatureGradientMeasure::Class() { return *IFC4_IfcTemperatureGradientMeasure_type; }
const IfcParse::type_declaration& Ifc4::IfcTemperatureGradientMeasure::declaration() const { return *IFC4_IfcTemperatureGradientMeasure_type; }
@@ -9506,6 +9521,27 @@ const IfcParse::entity& Ifc4::IfcIndexedPolyCurve::Class() { return *IFC4_IfcInd
Ifc4::IfcIndexedPolyCurve::IfcIndexedPolyCurve(IfcEntityInstanceData* e) : IfcBoundedCurve((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcIndexedPolyCurve_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcIndexedPolyCurve::IfcIndexedPolyCurve(::Ifc4::IfcCartesianPointList* v1_Points, boost::optional< IfcEntityList::ptr > v2_Segments, boost::optional< bool > v3_SelfIntersect) : IfcBoundedCurve((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcIndexedPolyCurve_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Points));data_->setArgument(0,attr);} if (v2_Segments) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v2_Segments));data_->setArgument(1,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(1, attr); } if (v3_SelfIntersect) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_SelfIntersect));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); } }
// Function implementations for IfcIndexedPolygonalFace
std::vector< int > /*[3:?]*/ Ifc4::IfcIndexedPolygonalFace::CoordIndex() const { return *data_->getArgument(0); }
void Ifc4::IfcIndexedPolygonalFace::setCoordIndex(std::vector< int > /*[3:?]*/ v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(0,attr);} }
::Ifc4::IfcPolygonalFaceSet::list::ptr Ifc4::IfcIndexedPolygonalFace::ToFaceSet() const { return data_->getInverse(IFC4_IfcPolygonalFaceSet_type, 2)->as<IfcPolygonalFaceSet>(); }
const IfcParse::entity& Ifc4::IfcIndexedPolygonalFace::declaration() const { return *IFC4_IfcIndexedPolygonalFace_type; }
const IfcParse::entity& Ifc4::IfcIndexedPolygonalFace::Class() { return *IFC4_IfcIndexedPolygonalFace_type; }
Ifc4::IfcIndexedPolygonalFace::IfcIndexedPolygonalFace(IfcEntityInstanceData* e) : IfcTessellatedItem((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcIndexedPolygonalFace_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcIndexedPolygonalFace::IfcIndexedPolygonalFace(std::vector< int > /*[3:?]*/ v1_CoordIndex) : IfcTessellatedItem((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcIndexedPolygonalFace_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_CoordIndex));data_->setArgument(0,attr);} }
// Function implementations for IfcIndexedPolygonalFaceWithVoids
std::vector< std::vector< int > > Ifc4::IfcIndexedPolygonalFaceWithVoids::InnerCoordIndices() const { return *data_->getArgument(1); }
void Ifc4::IfcIndexedPolygonalFaceWithVoids::setInnerCoordIndices(std::vector< std::vector< int > > v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(1,attr);} }
const IfcParse::entity& Ifc4::IfcIndexedPolygonalFaceWithVoids::declaration() const { return *IFC4_IfcIndexedPolygonalFaceWithVoids_type; }
const IfcParse::entity& Ifc4::IfcIndexedPolygonalFaceWithVoids::Class() { return *IFC4_IfcIndexedPolygonalFaceWithVoids_type; }
Ifc4::IfcIndexedPolygonalFaceWithVoids::IfcIndexedPolygonalFaceWithVoids(IfcEntityInstanceData* e) : IfcIndexedPolygonalFace((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcIndexedPolygonalFaceWithVoids_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcIndexedPolygonalFaceWithVoids::IfcIndexedPolygonalFaceWithVoids(std::vector< int > /*[3:?]*/ v1_CoordIndex, std::vector< std::vector< int > > v2_InnerCoordIndices) : IfcIndexedPolygonalFace((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcIndexedPolygonalFaceWithVoids_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_CoordIndex));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_InnerCoordIndices));data_->setArgument(1,attr);} }
// Function implementations for IfcIndexedTextureMap
::Ifc4::IfcTessellatedFaceSet* Ifc4::IfcIndexedTextureMap::MappedTo() const { return (::Ifc4::IfcTessellatedFaceSet*)((IfcUtil::IfcBaseClass*)(*data_->getArgument(1))); }
void Ifc4::IfcIndexedTextureMap::setMappedTo(::Ifc4::IfcTessellatedFaceSet* v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(1,attr);} }
@@ -9550,6 +9586,14 @@ const IfcParse::entity& Ifc4::IfcInterceptorType::Class() { return *IFC4_IfcInte
Ifc4::IfcInterceptorType::IfcInterceptorType(IfcEntityInstanceData* e) : IfcFlowTreatmentDeviceType((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcInterceptorType_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcInterceptorType::IfcInterceptorType(std::string v1_GlobalId, ::Ifc4::IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< ::Ifc4::IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< ::Ifc4::IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType, ::Ifc4::IfcInterceptorTypeEnum::Value v10_PredefinedType) : IfcFlowTreatmentDeviceType((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcInterceptorType_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_GlobalId));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_OwnerHistory));data_->setArgument(1,attr);} if (v3_Name) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_Name));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); } if (v4_Description) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v4_Description));data_->setArgument(3,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(3, attr); } if (v5_ApplicableOccurrence) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v5_ApplicableOccurrence));data_->setArgument(4,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(4, attr); } if (v6_HasPropertySets) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v6_HasPropertySets)->generalize());data_->setArgument(5,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(5, attr); } if (v7_RepresentationMaps) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v7_RepresentationMaps)->generalize());data_->setArgument(6,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(6, attr); } if (v8_Tag) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v8_Tag));data_->setArgument(7,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(7, attr); } if (v9_ElementType) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v9_ElementType));data_->setArgument(8,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(8, attr); }{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((IfcWrite::IfcWriteArgument::EnumerationReference(v10_PredefinedType,::Ifc4::IfcInterceptorTypeEnum::ToString(v10_PredefinedType))));data_->setArgument(9,attr);} }
// Function implementations for IfcIntersectionCurve
const IfcParse::entity& Ifc4::IfcIntersectionCurve::declaration() const { return *IFC4_IfcIntersectionCurve_type; }
const IfcParse::entity& Ifc4::IfcIntersectionCurve::Class() { return *IFC4_IfcIntersectionCurve_type; }
Ifc4::IfcIntersectionCurve::IfcIntersectionCurve(IfcEntityInstanceData* e) : IfcSurfaceCurve((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcIntersectionCurve_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcIntersectionCurve::IfcIntersectionCurve(::Ifc4::IfcCurve* v1_Curve3D, IfcTemplatedEntityList< ::Ifc4::IfcPcurve >::ptr v2_AssociatedGeometry, ::Ifc4::IfcPreferredSurfaceCurveRepresentation::Value v3_MasterRepresentation) : IfcSurfaceCurve((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcIntersectionCurve_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Curve3D));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_AssociatedGeometry)->generalize());data_->setArgument(1,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((IfcWrite::IfcWriteArgument::EnumerationReference(v3_MasterRepresentation,::Ifc4::IfcPreferredSurfaceCurveRepresentation::ToString(v3_MasterRepresentation))));data_->setArgument(2,attr);} }
// Function implementations for IfcInventory
bool Ifc4::IfcInventory::hasPredefinedType() const { return !data_->getArgument(5)->isNull(); }
::Ifc4::IfcInventoryTypeEnum::Value Ifc4::IfcInventory::PredefinedType() const { return ::Ifc4::IfcInventoryTypeEnum::FromString(*data_->getArgument(5)); }
@@ -11039,6 +11083,22 @@ const IfcParse::entity& Ifc4::IfcPolygonalBoundedHalfSpace::Class() { return *IF
Ifc4::IfcPolygonalBoundedHalfSpace::IfcPolygonalBoundedHalfSpace(IfcEntityInstanceData* e) : IfcHalfSpaceSolid((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcPolygonalBoundedHalfSpace_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcPolygonalBoundedHalfSpace::IfcPolygonalBoundedHalfSpace(::Ifc4::IfcSurface* v1_BaseSurface, bool v2_AgreementFlag, ::Ifc4::IfcAxis2Placement3D* v3_Position, ::Ifc4::IfcBoundedCurve* v4_PolygonalBoundary) : IfcHalfSpaceSolid((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcPolygonalBoundedHalfSpace_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_BaseSurface));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_AgreementFlag));data_->setArgument(1,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v3_Position));data_->setArgument(2,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v4_PolygonalBoundary));data_->setArgument(3,attr);} }
// Function implementations for IfcPolygonalFaceSet
bool Ifc4::IfcPolygonalFaceSet::hasClosed() const { return !data_->getArgument(1)->isNull(); }
bool Ifc4::IfcPolygonalFaceSet::Closed() const { return *data_->getArgument(1); }
void Ifc4::IfcPolygonalFaceSet::setClosed(bool v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(1,attr);} }
IfcTemplatedEntityList< ::Ifc4::IfcIndexedPolygonalFace >::ptr Ifc4::IfcPolygonalFaceSet::Faces() const { IfcEntityList::ptr es = *data_->getArgument(2); return es->as< ::Ifc4::IfcIndexedPolygonalFace >(); }
void Ifc4::IfcPolygonalFaceSet::setFaces(IfcTemplatedEntityList< ::Ifc4::IfcIndexedPolygonalFace >::ptr v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v->generalize());data_->setArgument(2,attr);} }
bool Ifc4::IfcPolygonalFaceSet::hasPnIndex() const { return !data_->getArgument(3)->isNull(); }
std::vector< int > /*[1:?]*/ Ifc4::IfcPolygonalFaceSet::PnIndex() const { return *data_->getArgument(3); }
void Ifc4::IfcPolygonalFaceSet::setPnIndex(std::vector< int > /*[1:?]*/ v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(3,attr);} }
const IfcParse::entity& Ifc4::IfcPolygonalFaceSet::declaration() const { return *IFC4_IfcPolygonalFaceSet_type; }
const IfcParse::entity& Ifc4::IfcPolygonalFaceSet::Class() { return *IFC4_IfcPolygonalFaceSet_type; }
Ifc4::IfcPolygonalFaceSet::IfcPolygonalFaceSet(IfcEntityInstanceData* e) : IfcTessellatedFaceSet((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcPolygonalFaceSet_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcPolygonalFaceSet::IfcPolygonalFaceSet(::Ifc4::IfcCartesianPointList3D* v1_Coordinates, boost::optional< bool > v2_Closed, IfcTemplatedEntityList< ::Ifc4::IfcIndexedPolygonalFace >::ptr v3_Faces, boost::optional< std::vector< int > /*[1:?]*/ > v4_PnIndex) : IfcTessellatedFaceSet((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcPolygonalFaceSet_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Coordinates));data_->setArgument(0,attr);} if (v2_Closed) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v2_Closed));data_->setArgument(1,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(1, attr); }{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v3_Faces)->generalize());data_->setArgument(2,attr);} if (v4_PnIndex) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v4_PnIndex));data_->setArgument(3,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(3, attr); } }
// Function implementations for IfcPolyline
IfcTemplatedEntityList< ::Ifc4::IfcCartesianPoint >::ptr Ifc4::IfcPolyline::Points() const { IfcEntityList::ptr es = *data_->getArgument(0); return es->as< ::Ifc4::IfcCartesianPoint >(); }
void Ifc4::IfcPolyline::setPoints(IfcTemplatedEntityList< ::Ifc4::IfcCartesianPoint >::ptr v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v->generalize());data_->setArgument(0,attr);} }
@@ -13060,6 +13120,14 @@ const IfcParse::entity& Ifc4::IfcSchedulingTime::Class() { return *IFC4_IfcSched
Ifc4::IfcSchedulingTime::IfcSchedulingTime(IfcEntityInstanceData* e) : IfcUtil::IfcBaseEntity() { if (!e) return; if (e->type() != IFC4_IfcSchedulingTime_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcSchedulingTime::IfcSchedulingTime(boost::optional< std::string > v1_Name, boost::optional< ::Ifc4::IfcDataOriginEnum::Value > v2_DataOrigin, boost::optional< std::string > v3_UserDefinedDataOrigin) : IfcUtil::IfcBaseEntity() {data_ = new IfcEntityInstanceData(IFC4_IfcSchedulingTime_type); if (v1_Name) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v1_Name));data_->setArgument(0,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(0, attr); } if (v2_DataOrigin) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((IfcWrite::IfcWriteArgument::EnumerationReference(*v2_DataOrigin,::Ifc4::IfcDataOriginEnum::ToString(*v2_DataOrigin))));data_->setArgument(1,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(1, attr); } if (v3_UserDefinedDataOrigin) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_UserDefinedDataOrigin));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); } }
// Function implementations for IfcSeamCurve
const IfcParse::entity& Ifc4::IfcSeamCurve::declaration() const { return *IFC4_IfcSeamCurve_type; }
const IfcParse::entity& Ifc4::IfcSeamCurve::Class() { return *IFC4_IfcSeamCurve_type; }
Ifc4::IfcSeamCurve::IfcSeamCurve(IfcEntityInstanceData* e) : IfcSurfaceCurve((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcSeamCurve_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcSeamCurve::IfcSeamCurve(::Ifc4::IfcCurve* v1_Curve3D, IfcTemplatedEntityList< ::Ifc4::IfcPcurve >::ptr v2_AssociatedGeometry, ::Ifc4::IfcPreferredSurfaceCurveRepresentation::Value v3_MasterRepresentation) : IfcSurfaceCurve((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcSeamCurve_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Curve3D));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_AssociatedGeometry)->generalize());data_->setArgument(1,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((IfcWrite::IfcWriteArgument::EnumerationReference(v3_MasterRepresentation,::Ifc4::IfcPreferredSurfaceCurveRepresentation::ToString(v3_MasterRepresentation))));data_->setArgument(2,attr);} }
// Function implementations for IfcSectionProperties
::Ifc4::IfcSectionTypeEnum::Value Ifc4::IfcSectionProperties::SectionType() const { return ::Ifc4::IfcSectionTypeEnum::FromString(*data_->getArgument(0)); }
void Ifc4::IfcSectionProperties::setSectionType(::Ifc4::IfcSectionTypeEnum::Value v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(IfcWrite::IfcWriteArgument::EnumerationReference(v,::Ifc4::IfcSectionTypeEnum::ToString(v)));data_->setArgument(0,attr);} }
@@ -13474,6 +13542,16 @@ const IfcParse::entity& Ifc4::IfcSphere::Class() { return *IFC4_IfcSphere_type;
Ifc4::IfcSphere::IfcSphere(IfcEntityInstanceData* e) : IfcCsgPrimitive3D((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcSphere_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcSphere::IfcSphere(::Ifc4::IfcAxis2Placement3D* v1_Position, double v2_Radius) : IfcCsgPrimitive3D((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcSphere_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Position));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_Radius));data_->setArgument(1,attr);} }
// Function implementations for IfcSphericalSurface
double Ifc4::IfcSphericalSurface::Radius() const { return *data_->getArgument(1); }
void Ifc4::IfcSphericalSurface::setRadius(double v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(1,attr);} }
const IfcParse::entity& Ifc4::IfcSphericalSurface::declaration() const { return *IFC4_IfcSphericalSurface_type; }
const IfcParse::entity& Ifc4::IfcSphericalSurface::Class() { return *IFC4_IfcSphericalSurface_type; }
Ifc4::IfcSphericalSurface::IfcSphericalSurface(IfcEntityInstanceData* e) : IfcElementarySurface((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcSphericalSurface_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcSphericalSurface::IfcSphericalSurface(::Ifc4::IfcAxis2Placement3D* v1_Position, double v2_Radius) : IfcElementarySurface((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcSphericalSurface_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Position));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_Radius));data_->setArgument(1,attr);} }
// Function implementations for IfcStackTerminal
bool Ifc4::IfcStackTerminal::hasPredefinedType() const { return !data_->getArgument(8)->isNull(); }
::Ifc4::IfcStackTerminalTypeEnum::Value Ifc4::IfcStackTerminal::PredefinedType() const { return ::Ifc4::IfcStackTerminalTypeEnum::FromString(*data_->getArgument(8)); }
@@ -14086,6 +14164,20 @@ const IfcParse::entity& Ifc4::IfcSurface::Class() { return *IFC4_IfcSurface_type
Ifc4::IfcSurface::IfcSurface(IfcEntityInstanceData* e) : IfcGeometricRepresentationItem((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcSurface_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcSurface::IfcSurface() : IfcGeometricRepresentationItem((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcSurface_type); }
// Function implementations for IfcSurfaceCurve
::Ifc4::IfcCurve* Ifc4::IfcSurfaceCurve::Curve3D() const { return (::Ifc4::IfcCurve*)((IfcUtil::IfcBaseClass*)(*data_->getArgument(0))); }
void Ifc4::IfcSurfaceCurve::setCurve3D(::Ifc4::IfcCurve* v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(0,attr);} }
IfcTemplatedEntityList< ::Ifc4::IfcPcurve >::ptr Ifc4::IfcSurfaceCurve::AssociatedGeometry() const { IfcEntityList::ptr es = *data_->getArgument(1); return es->as< ::Ifc4::IfcPcurve >(); }
void Ifc4::IfcSurfaceCurve::setAssociatedGeometry(IfcTemplatedEntityList< ::Ifc4::IfcPcurve >::ptr v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v->generalize());data_->setArgument(1,attr);} }
::Ifc4::IfcPreferredSurfaceCurveRepresentation::Value Ifc4::IfcSurfaceCurve::MasterRepresentation() const { return ::Ifc4::IfcPreferredSurfaceCurveRepresentation::FromString(*data_->getArgument(2)); }
void Ifc4::IfcSurfaceCurve::setMasterRepresentation(::Ifc4::IfcPreferredSurfaceCurveRepresentation::Value v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(IfcWrite::IfcWriteArgument::EnumerationReference(v,::Ifc4::IfcPreferredSurfaceCurveRepresentation::ToString(v)));data_->setArgument(2,attr);} }
const IfcParse::entity& Ifc4::IfcSurfaceCurve::declaration() const { return *IFC4_IfcSurfaceCurve_type; }
const IfcParse::entity& Ifc4::IfcSurfaceCurve::Class() { return *IFC4_IfcSurfaceCurve_type; }
Ifc4::IfcSurfaceCurve::IfcSurfaceCurve(IfcEntityInstanceData* e) : IfcCurve((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcSurfaceCurve_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcSurfaceCurve::IfcSurfaceCurve(::Ifc4::IfcCurve* v1_Curve3D, IfcTemplatedEntityList< ::Ifc4::IfcPcurve >::ptr v2_AssociatedGeometry, ::Ifc4::IfcPreferredSurfaceCurveRepresentation::Value v3_MasterRepresentation) : IfcCurve((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcSurfaceCurve_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Curve3D));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_AssociatedGeometry)->generalize());data_->setArgument(1,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((IfcWrite::IfcWriteArgument::EnumerationReference(v3_MasterRepresentation,::Ifc4::IfcPreferredSurfaceCurveRepresentation::ToString(v3_MasterRepresentation))));data_->setArgument(2,attr);} }
// Function implementations for IfcSurfaceCurveSweptAreaSolid
::Ifc4::IfcCurve* Ifc4::IfcSurfaceCurveSweptAreaSolid::Directrix() const { return (::Ifc4::IfcCurve*)((IfcUtil::IfcBaseClass*)(*data_->getArgument(2))); }
void Ifc4::IfcSurfaceCurveSweptAreaSolid::setDirectrix(::Ifc4::IfcCurve* v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(2,attr);} }
@@ -14681,25 +14773,19 @@ void Ifc4::IfcTendonType::setNominalDiameter(double v) { {IfcWrite::IfcWriteArgu
bool Ifc4::IfcTendonType::hasCrossSectionArea() const { return !data_->getArgument(11)->isNull(); }
double Ifc4::IfcTendonType::CrossSectionArea() const { return *data_->getArgument(11); }
void Ifc4::IfcTendonType::setCrossSectionArea(double v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(11,attr);} }
bool Ifc4::IfcTendonType::hasSheethDiameter() const { return !data_->getArgument(12)->isNull(); }
double Ifc4::IfcTendonType::SheethDiameter() const { return *data_->getArgument(12); }
void Ifc4::IfcTendonType::setSheethDiameter(double v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(12,attr);} }
bool Ifc4::IfcTendonType::hasSheathDiameter() const { return !data_->getArgument(12)->isNull(); }
double Ifc4::IfcTendonType::SheathDiameter() const { return *data_->getArgument(12); }
void Ifc4::IfcTendonType::setSheathDiameter(double v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(12,attr);} }
const IfcParse::entity& Ifc4::IfcTendonType::declaration() const { return *IFC4_IfcTendonType_type; }
const IfcParse::entity& Ifc4::IfcTendonType::Class() { return *IFC4_IfcTendonType_type; }
Ifc4::IfcTendonType::IfcTendonType(IfcEntityInstanceData* e) : IfcReinforcingElementType((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcTendonType_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcTendonType::IfcTendonType(std::string v1_GlobalId, ::Ifc4::IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< ::Ifc4::IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< ::Ifc4::IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType, ::Ifc4::IfcTendonTypeEnum::Value v10_PredefinedType, boost::optional< double > v11_NominalDiameter, boost::optional< double > v12_CrossSectionArea, boost::optional< double > v13_SheethDiameter) : IfcReinforcingElementType((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcTendonType_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_GlobalId));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_OwnerHistory));data_->setArgument(1,attr);} if (v3_Name) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_Name));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); } if (v4_Description) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v4_Description));data_->setArgument(3,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(3, attr); } if (v5_ApplicableOccurrence) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v5_ApplicableOccurrence));data_->setArgument(4,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(4, attr); } if (v6_HasPropertySets) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v6_HasPropertySets)->generalize());data_->setArgument(5,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(5, attr); } if (v7_RepresentationMaps) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v7_RepresentationMaps)->generalize());data_->setArgument(6,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(6, attr); } if (v8_Tag) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v8_Tag));data_->setArgument(7,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(7, attr); } if (v9_ElementType) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v9_ElementType));data_->setArgument(8,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(8, attr); }{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((IfcWrite::IfcWriteArgument::EnumerationReference(v10_PredefinedType,::Ifc4::IfcTendonTypeEnum::ToString(v10_PredefinedType))));data_->setArgument(9,attr);} if (v11_NominalDiameter) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v11_NominalDiameter));data_->setArgument(10,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(10, attr); } if (v12_CrossSectionArea) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v12_CrossSectionArea));data_->setArgument(11,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(11, attr); } if (v13_SheethDiameter) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v13_SheethDiameter));data_->setArgument(12,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(12, attr); } }
Ifc4::IfcTendonType::IfcTendonType(std::string v1_GlobalId, ::Ifc4::IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< ::Ifc4::IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< ::Ifc4::IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType, ::Ifc4::IfcTendonTypeEnum::Value v10_PredefinedType, boost::optional< double > v11_NominalDiameter, boost::optional< double > v12_CrossSectionArea, boost::optional< double > v13_SheathDiameter) : IfcReinforcingElementType((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcTendonType_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_GlobalId));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_OwnerHistory));data_->setArgument(1,attr);} if (v3_Name) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_Name));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); } if (v4_Description) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v4_Description));data_->setArgument(3,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(3, attr); } if (v5_ApplicableOccurrence) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v5_ApplicableOccurrence));data_->setArgument(4,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(4, attr); } if (v6_HasPropertySets) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v6_HasPropertySets)->generalize());data_->setArgument(5,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(5, attr); } if (v7_RepresentationMaps) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v7_RepresentationMaps)->generalize());data_->setArgument(6,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(6, attr); } if (v8_Tag) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v8_Tag));data_->setArgument(7,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(7, attr); } if (v9_ElementType) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v9_ElementType));data_->setArgument(8,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(8, attr); }{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((IfcWrite::IfcWriteArgument::EnumerationReference(v10_PredefinedType,::Ifc4::IfcTendonTypeEnum::ToString(v10_PredefinedType))));data_->setArgument(9,attr);} if (v11_NominalDiameter) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v11_NominalDiameter));data_->setArgument(10,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(10, attr); } if (v12_CrossSectionArea) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v12_CrossSectionArea));data_->setArgument(11,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(11, attr); } if (v13_SheathDiameter) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v13_SheathDiameter));data_->setArgument(12,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(12, attr); } }
// Function implementations for IfcTessellatedFaceSet
::Ifc4::IfcCartesianPointList3D* Ifc4::IfcTessellatedFaceSet::Coordinates() const { return (::Ifc4::IfcCartesianPointList3D*)((IfcUtil::IfcBaseClass*)(*data_->getArgument(0))); }
void Ifc4::IfcTessellatedFaceSet::setCoordinates(::Ifc4::IfcCartesianPointList3D* v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(0,attr);} }
bool Ifc4::IfcTessellatedFaceSet::hasNormals() const { return !data_->getArgument(1)->isNull(); }
std::vector< std::vector< double > > Ifc4::IfcTessellatedFaceSet::Normals() const { return *data_->getArgument(1); }
void Ifc4::IfcTessellatedFaceSet::setNormals(std::vector< std::vector< double > > v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(1,attr);} }
bool Ifc4::IfcTessellatedFaceSet::hasClosed() const { return !data_->getArgument(2)->isNull(); }
bool Ifc4::IfcTessellatedFaceSet::Closed() const { return *data_->getArgument(2); }
void Ifc4::IfcTessellatedFaceSet::setClosed(bool v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(2,attr);} }
::Ifc4::IfcIndexedColourMap::list::ptr Ifc4::IfcTessellatedFaceSet::HasColours() const { return data_->getInverse(IFC4_IfcIndexedColourMap_type, 0)->as<IfcIndexedColourMap>(); }
::Ifc4::IfcIndexedTextureMap::list::ptr Ifc4::IfcTessellatedFaceSet::HasTextures() const { return data_->getInverse(IFC4_IfcIndexedTextureMap_type, 1)->as<IfcIndexedTextureMap>(); }
@@ -14707,7 +14793,7 @@ void Ifc4::IfcTessellatedFaceSet::setClosed(bool v) { {IfcWrite::IfcWriteArgumen
const IfcParse::entity& Ifc4::IfcTessellatedFaceSet::declaration() const { return *IFC4_IfcTessellatedFaceSet_type; }
const IfcParse::entity& Ifc4::IfcTessellatedFaceSet::Class() { return *IFC4_IfcTessellatedFaceSet_type; }
Ifc4::IfcTessellatedFaceSet::IfcTessellatedFaceSet(IfcEntityInstanceData* e) : IfcTessellatedItem((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcTessellatedFaceSet_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcTessellatedFaceSet::IfcTessellatedFaceSet(::Ifc4::IfcCartesianPointList3D* v1_Coordinates, boost::optional< std::vector< std::vector< double > > > v2_Normals, boost::optional< bool > v3_Closed) : IfcTessellatedItem((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcTessellatedFaceSet_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Coordinates));data_->setArgument(0,attr);} if (v2_Normals) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v2_Normals));data_->setArgument(1,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(1, attr); } if (v3_Closed) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_Closed));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); } }
Ifc4::IfcTessellatedFaceSet::IfcTessellatedFaceSet(::Ifc4::IfcCartesianPointList3D* v1_Coordinates) : IfcTessellatedItem((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcTessellatedFaceSet_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Coordinates));data_->setArgument(0,attr);} }
// Function implementations for IfcTessellatedItem
@@ -14946,6 +15032,18 @@ const IfcParse::entity& Ifc4::IfcTopologyRepresentation::Class() { return *IFC4_
Ifc4::IfcTopologyRepresentation::IfcTopologyRepresentation(IfcEntityInstanceData* e) : IfcShapeModel((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcTopologyRepresentation_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcTopologyRepresentation::IfcTopologyRepresentation(::Ifc4::IfcRepresentationContext* v1_ContextOfItems, boost::optional< std::string > v2_RepresentationIdentifier, boost::optional< std::string > v3_RepresentationType, IfcTemplatedEntityList< ::Ifc4::IfcRepresentationItem >::ptr v4_Items) : IfcShapeModel((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcTopologyRepresentation_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_ContextOfItems));data_->setArgument(0,attr);} if (v2_RepresentationIdentifier) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v2_RepresentationIdentifier));data_->setArgument(1,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(1, attr); } if (v3_RepresentationType) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_RepresentationType));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); }{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v4_Items)->generalize());data_->setArgument(3,attr);} }
// Function implementations for IfcToroidalSurface
double Ifc4::IfcToroidalSurface::MajorRadius() const { return *data_->getArgument(1); }
void Ifc4::IfcToroidalSurface::setMajorRadius(double v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(1,attr);} }
double Ifc4::IfcToroidalSurface::MinorRadius() const { return *data_->getArgument(2); }
void Ifc4::IfcToroidalSurface::setMinorRadius(double v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(2,attr);} }
const IfcParse::entity& Ifc4::IfcToroidalSurface::declaration() const { return *IFC4_IfcToroidalSurface_type; }
const IfcParse::entity& Ifc4::IfcToroidalSurface::Class() { return *IFC4_IfcToroidalSurface_type; }
Ifc4::IfcToroidalSurface::IfcToroidalSurface(IfcEntityInstanceData* e) : IfcElementarySurface((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcToroidalSurface_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcToroidalSurface::IfcToroidalSurface(::Ifc4::IfcAxis2Placement3D* v1_Position, double v2_MajorRadius, double v3_MinorRadius) : IfcElementarySurface((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcToroidalSurface_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Position));data_->setArgument(0,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v2_MajorRadius));data_->setArgument(1,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v3_MinorRadius));data_->setArgument(2,attr);} }
// Function implementations for IfcTransformer
bool Ifc4::IfcTransformer::hasPredefinedType() const { return !data_->getArgument(8)->isNull(); }
::Ifc4::IfcTransformerTypeEnum::Value Ifc4::IfcTransformer::PredefinedType() const { return ::Ifc4::IfcTransformerTypeEnum::FromString(*data_->getArgument(8)); }
@@ -15005,17 +15103,23 @@ Ifc4::IfcTrapeziumProfileDef::IfcTrapeziumProfileDef(IfcEntityInstanceData* e) :
Ifc4::IfcTrapeziumProfileDef::IfcTrapeziumProfileDef(::Ifc4::IfcProfileTypeEnum::Value v1_ProfileType, boost::optional< std::string > v2_ProfileName, ::Ifc4::IfcAxis2Placement2D* v3_Position, double v4_BottomXDim, double v5_TopXDim, double v6_YDim, double v7_TopXOffset) : IfcParameterizedProfileDef((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcTrapeziumProfileDef_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((IfcWrite::IfcWriteArgument::EnumerationReference(v1_ProfileType,::Ifc4::IfcProfileTypeEnum::ToString(v1_ProfileType))));data_->setArgument(0,attr);} if (v2_ProfileName) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v2_ProfileName));data_->setArgument(1,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(1, attr); }{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v3_Position));data_->setArgument(2,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v4_BottomXDim));data_->setArgument(3,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v5_TopXDim));data_->setArgument(4,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v6_YDim));data_->setArgument(5,attr);}{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v7_TopXOffset));data_->setArgument(6,attr);} }
// Function implementations for IfcTriangulatedFaceSet
bool Ifc4::IfcTriangulatedFaceSet::hasNormals() const { return !data_->getArgument(1)->isNull(); }
std::vector< std::vector< double > > Ifc4::IfcTriangulatedFaceSet::Normals() const { return *data_->getArgument(1); }
void Ifc4::IfcTriangulatedFaceSet::setNormals(std::vector< std::vector< double > > v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(1,attr);} }
bool Ifc4::IfcTriangulatedFaceSet::hasClosed() const { return !data_->getArgument(2)->isNull(); }
bool Ifc4::IfcTriangulatedFaceSet::Closed() const { return *data_->getArgument(2); }
void Ifc4::IfcTriangulatedFaceSet::setClosed(bool v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(2,attr);} }
std::vector< std::vector< int > > Ifc4::IfcTriangulatedFaceSet::CoordIndex() const { return *data_->getArgument(3); }
void Ifc4::IfcTriangulatedFaceSet::setCoordIndex(std::vector< std::vector< int > > v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(3,attr);} }
bool Ifc4::IfcTriangulatedFaceSet::hasNormalIndex() const { return !data_->getArgument(4)->isNull(); }
std::vector< std::vector< int > > Ifc4::IfcTriangulatedFaceSet::NormalIndex() const { return *data_->getArgument(4); }
void Ifc4::IfcTriangulatedFaceSet::setNormalIndex(std::vector< std::vector< int > > v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(4,attr);} }
bool Ifc4::IfcTriangulatedFaceSet::hasPnIndex() const { return !data_->getArgument(4)->isNull(); }
std::vector< int > /*[1:?]*/ Ifc4::IfcTriangulatedFaceSet::PnIndex() const { return *data_->getArgument(4); }
void Ifc4::IfcTriangulatedFaceSet::setPnIndex(std::vector< int > /*[1:?]*/ v) { {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set(v);data_->setArgument(4,attr);} }
const IfcParse::entity& Ifc4::IfcTriangulatedFaceSet::declaration() const { return *IFC4_IfcTriangulatedFaceSet_type; }
const IfcParse::entity& Ifc4::IfcTriangulatedFaceSet::Class() { return *IFC4_IfcTriangulatedFaceSet_type; }
Ifc4::IfcTriangulatedFaceSet::IfcTriangulatedFaceSet(IfcEntityInstanceData* e) : IfcTessellatedFaceSet((IfcEntityInstanceData*)0) { if (!e) return; if (e->type() != IFC4_IfcTriangulatedFaceSet_type) throw IfcException("Unable to find find keyword in schema"); data_ = e; }
Ifc4::IfcTriangulatedFaceSet::IfcTriangulatedFaceSet(::Ifc4::IfcCartesianPointList3D* v1_Coordinates, boost::optional< std::vector< std::vector< double > > > v2_Normals, boost::optional< bool > v3_Closed, std::vector< std::vector< int > > v4_CoordIndex, boost::optional< std::vector< std::vector< int > > > v5_NormalIndex) : IfcTessellatedFaceSet((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcTriangulatedFaceSet_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Coordinates));data_->setArgument(0,attr);} if (v2_Normals) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v2_Normals));data_->setArgument(1,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(1, attr); } if (v3_Closed) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_Closed));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); }{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v4_CoordIndex));data_->setArgument(3,attr);} if (v5_NormalIndex) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v5_NormalIndex));data_->setArgument(4,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(4, attr); } }
Ifc4::IfcTriangulatedFaceSet::IfcTriangulatedFaceSet(::Ifc4::IfcCartesianPointList3D* v1_Coordinates, boost::optional< std::vector< std::vector< double > > > v2_Normals, boost::optional< bool > v3_Closed, std::vector< std::vector< int > > v4_CoordIndex, boost::optional< std::vector< int > /*[1:?]*/ > v5_PnIndex) : IfcTessellatedFaceSet((IfcEntityInstanceData*)0) {data_ = new IfcEntityInstanceData(IFC4_IfcTriangulatedFaceSet_type); {IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v1_Coordinates));data_->setArgument(0,attr);} if (v2_Normals) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v2_Normals));data_->setArgument(1,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(1, attr); } if (v3_Closed) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v3_Closed));data_->setArgument(2,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(2, attr); }{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((v4_CoordIndex));data_->setArgument(3,attr);} if (v5_PnIndex) {{IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument();attr->set((*v5_PnIndex));data_->setArgument(4,attr);} } else { IfcWrite::IfcWriteArgument* attr = new IfcWrite::IfcWriteArgument(); attr->set(boost::blank()); data_->setArgument(4, attr); } }
// Function implementations for IfcTrimmedCurve
::Ifc4::IfcCurve* Ifc4::IfcTrimmedCurve::BasisCurve() const { return (::Ifc4::IfcCurve*)((IfcUtil::IfcBaseClass*)(*data_->getArgument(0))); }
+128 -32
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -40,6 +40,7 @@ public:
it end();
IfcUtil::IfcBaseClass* operator[] (int i);
unsigned int size() const;
void reserve(unsigned capacity);
bool contains(IfcUtil::IfcBaseClass*) const;
template <class U>
typename U::list::ptr as() {
+6
View File
@@ -41,6 +41,7 @@ public:
typedef boost::unordered_map<unsigned int, IfcUtil::IfcBaseClass*> entity_by_id_t;
typedef std::map<std::string, IfcUtil::IfcBaseClass*> entity_by_guid_t;
typedef std::map<unsigned int, std::vector<unsigned int> > entities_by_ref_t;
typedef std::map<unsigned int, IfcEntityList::ptr> ref_map_t;
typedef entity_by_id_t::const_iterator const_iterator;
class type_iterator : private entities_by_type_t::const_iterator {
@@ -86,6 +87,7 @@ private:
entities_by_type_t bytype;
entities_by_type_t bytype_excl;
entities_by_ref_t byref;
ref_map_t by_ref_cached_;
entity_by_guid_t byguid;
entity_entity_map_t entity_file_map;
@@ -181,6 +183,10 @@ public:
IfcEntityList::ptr getInverse(int instance_id, const IfcParse::declaration* type, int attribute_index);
/// Marks entity as modified so that potential cache for it is invalidated.
/// @todo Currently the whole cache is invalidated. Implement more fine-grained invalidation.
void mark_entity_as_modified(int id);
unsigned int FreshId() { return ++MaxId; }
IfcUtil::IfcBaseClass* addEntity(IfcUtil::IfcBaseClass* entity);
+82 -29
View File
@@ -32,58 +32,101 @@
#include <iostream>
#include <algorithm>
using boost::property_tree::ptree;
namespace {
static const char* severity_strings[] = {"Notice", "Warning", "Error"};
template <typename T>
struct severity_strings {
static const std::array<std::basic_string<T>, 3> value;
};
void plain_text_message(std::ostream& os, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
os << "[" << severity_strings[type] << "] ";
template <>
const std::array<std::basic_string<char>, 3> severity_strings<char>::value = { "Notice", "Warning", "Error" };
template <>
const std::array<std::basic_string<wchar_t>, 3> severity_strings<wchar_t>::value = { L"Notice", L"Warning", L"Error" };
template <typename T>
void plain_text_message(T& os, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
os << "[" << severity_strings<typename T::char_type>::value[type] << "] ";
if (current_product) {
std::string global_id = *(**current_product).data().getArgument((**current_product).declaration().as_entity()->attribute_index("GlobalId"));
os << "{" << global_id << "} ";
std::string global_id = *((IfcUtil::IfcBaseEntity*)*current_product)->get("GlobalId");
os << "{" << global_id.c_str() << "} ";
}
os << message << std::endl;
os << message.c_str() << std::endl;
if (instance) {
std::string instance_string = instance->data().toString();
if (instance_string.size() > 259) {
instance_string = instance_string.substr(0, 256) + "...";
}
os << instance_string << std::endl;
os << instance_string.c_str() << std::endl;
}
}
void json_message(std::ostream& os, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
ptree pt;
pt.put("level", severity_strings[type]);
template <typename T>
std::basic_string<T> string_as(const std::string& s) {
std::basic_string<T> v;
v.assign(s.begin(), s.end());
return v;
}
template <typename T>
void json_message(T& os, const boost::optional<IfcUtil::IfcBaseClass*>& current_product, Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
boost::property_tree::basic_ptree<std::basic_string<typename T::char_type>, std::basic_string<typename T::char_type> > pt;
// @todo this is crazy
static const typename T::char_type level_string[] = { 'l', 'e', 'v', 'e', 'l', 0 };
static const typename T::char_type product_string[] = { 'p', 'r', 'o', 'd', 'u', 'c', 't', 0 };
static const typename T::char_type message_string[] = { 'm', 'e', 's', 's', 'a', 'g', 'e', 0 };
static const typename T::char_type instance_string[] = { 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', 0 };
pt.put(level_string, severity_strings<typename T::char_type>::value[type]);
if (current_product) {
pt.put("product", (**current_product).data().toString());
pt.put(product_string, string_as<typename T::char_type>((**current_product).data().toString()));
}
pt.put("message", message);
pt.put(message_string, string_as<typename T::char_type>(message));
if (instance) {
pt.put("instance", instance->data().toString());
pt.put(instance_string, string_as<typename T::char_type>(instance->data().toString()));
}
boost::property_tree::write_json(os, pt, false);
}
}
void Logger::SetOutput(std::ostream* l1, std::ostream* l2) {
void Logger::SetProduct(boost::optional<IfcUtil::IfcBaseClass*> product) {
current_product = product;
}
void Logger::SetOutput(std::ostream* l1, std::ostream* l2) {
wlog1 = wlog2 = 0;
log1 = l1;
log2 = l2;
if ( ! log2 ) {
if (!log2) {
log2 = &log_stream;
}
}
void Logger::SetOutput(std::wostream* l1, std::wostream* l2) {
log1 = log2 = 0;
wlog1 = l1;
wlog2 = l2;
if (!wlog2) {
log2 = &log_stream;
}
}
void Logger::Message(Logger::Severity type, const std::string& message, const IfcUtil::IfcBaseClass* instance) {
if (type > max_severity) {
max_severity = type;
}
if (log2 && type >= verbosity) {
if ((log2 || wlog2) && type >= verbosity) {
if (format == FMT_PLAIN) {
plain_text_message(*log2, current_product, type, message, instance);
if (log2) {
plain_text_message(*log2, current_product, type, message, instance);
} else if (wlog2) {
plain_text_message(*wlog2, current_product, type, message, instance);
}
} else if (format == FMT_JSON) {
json_message(*log2, current_product, type, message, instance);
if (log2) {
json_message(*log2, current_product, type, message, instance);
} else if (wlog2) {
json_message(*wlog2, current_product, type, message, instance);
}
}
}
}
@@ -92,18 +135,26 @@ void Logger::Message(Logger::Severity type, const std::exception& exception, con
Message(type, std::string(exception.what()), instance);
}
template <typename T>
void status(T& log1, const std::string& message, bool new_line) {
log1 << message.c_str();
if (new_line) {
log1 << std::endl;
} else {
log1 << std::flush;
}
}
void Logger::Status(const std::string& message, bool new_line) {
if (log1) {
(*log1) << message;
if ( new_line ) (*log1) << std::endl;
else (*log1) << std::flush;
status(*log1, message, new_line);
} else if (wlog1) {
status(*wlog1, message, new_line);
}
}
void Logger::ProgressBar(int progress) {
if (log1) {
Status("\r[" + std::string(progress,'#') + std::string(50 - progress,' ') + "]", false);
}
Status("\r[" + std::string(progress,'#') + std::string(50 - progress,' ') + "]", false);
}
std::string Logger::GetLog() {
@@ -120,6 +171,8 @@ Logger::Format Logger::OutputFormat() { return format; }
std::ostream* Logger::log1 = 0;
std::ostream* Logger::log2 = 0;
std::wostream* Logger::wlog1 = 0;
std::wostream* Logger::wlog2 = 0;
std::stringstream Logger::log_stream;
Logger::Severity Logger::verbosity = Logger::LOG_NOTICE;
Logger::Severity Logger::max_severity = Logger::LOG_NOTICE;
+12 -4
View File
@@ -38,19 +38,27 @@ public:
typedef enum { LOG_NOTICE, LOG_WARNING, LOG_ERROR } Severity;
typedef enum { FMT_PLAIN, FMT_JSON } Format;
private:
// To both stream variants need to exist at runtime or should this be a
// template argument of Logger or controlled using preprocessor directives?
static std::ostream* log1;
static std::ostream* log2;
static std::wostream* wlog1;
static std::wostream* wlog2;
static std::stringstream log_stream;
static Severity verbosity;
static Format format;
static boost::optional<IfcUtil::IfcBaseClass*> current_product;
static Severity max_severity;
public:
static void SetProduct(boost::optional<IfcUtil::IfcBaseClass*> product);
static void SetProduct(boost::optional<IfcUtil::IfcBaseClass*> product) {
current_product = product;
}
/// Determines to what stream respectively progress and errors are logged
static void SetOutput(std::wostream* l1, std::wostream* l2);
/// Determines to what stream respectively progress and errors are logged
static void SetOutput(std::ostream* l1, std::ostream* l2);
+28 -18
View File
@@ -25,10 +25,6 @@
#include <ctime>
#include <boost/circular_buffer.hpp>
#ifdef _MSC_VER
#include <Windows.h>
#endif
#include <boost/algorithm/string.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
@@ -40,6 +36,7 @@
#include "../ifcparse/IfcFile.h"
#include "../ifcparse/IfcSIPrefix.h"
#include "../ifcparse/IfcSchema.h"
#include "../ifcparse/utils.h"
#ifdef USE_MMAP
#include <boost/filesystem/path.hpp>
@@ -117,9 +114,8 @@ IfcSpfStream::IfcSpfStream(const std::string& fn)
, eof(false)
{
#ifdef _MSC_VER
int fn_buffer_size = MultiByteToWideChar(CP_UTF8, 0, fn.c_str(), -1, 0, 0);
wchar_t* fn_wide = new wchar_t[fn_buffer_size];
MultiByteToWideChar(CP_UTF8, 0, fn.c_str(), -1, fn_wide, fn_buffer_size);
std::wstring fn_ws = IfcUtil::path::from_utf8(fn);
const wchar_t* fn_wide = fn_ws.c_str();
#ifdef USE_MMAP
if (mmap) {
@@ -131,7 +127,6 @@ IfcSpfStream::IfcSpfStream(const std::string& fn)
}
#endif
delete[] fn_wide;
#else
#ifdef USE_MMAP
@@ -1257,7 +1252,9 @@ void IfcEntityInstanceData::setArgument(unsigned int i, Argument* a, IfcUtil::Ar
if (this->file) {
register_inverse_visitor visitor(*this->file, *this);
apply_individual_instance_visitor(copy).apply(visitor);
}
this->file->mark_entity_as_modified(id_);
}
attributes_[i] = copy;
}
@@ -1504,6 +1501,11 @@ IfcEntityList::ptr IfcFile::traverse(IfcUtil::IfcBaseClass* instance, int max_le
return IfcParse::traverse(instance, max_level);
}
void IfcFile::mark_entity_as_modified(int /*id*/)
{
by_ref_cached_.clear();
}
void IfcFile::addEntities(IfcEntityList::ptr es) {
for( IfcEntityList::it i = es->begin(); i != es->end(); ++ i ) {
addEntity(*i);
@@ -1868,17 +1870,25 @@ IfcEntityList::ptr IfcFile::instances_by_type(const std::string& t) {
IfcEntityList::ptr IfcFile::instances_by_reference(int t) {
entities_by_ref_t::const_iterator it = byref.find(t);
IfcEntityList::ptr return_value;
IfcEntityList::ptr ret;
if (it != byref.end()) {
const std::vector<unsigned>& ids = it->second;
for (std::vector<unsigned>::const_iterator jt = ids.begin(); jt != ids.end(); ++jt) {
if (!return_value) {
return_value.reset(new IfcEntityList);
}
return_value->push(instance_by_id(*jt));
}
ref_map_t::const_iterator cached_it = by_ref_cached_.find(t);
if (cached_it != by_ref_cached_.end()) {
ret = cached_it->second;
}
else {
if (it->second.size()) {
ret.reset(new IfcEntityList);
ret->reserve((unsigned)it->second.size());
const std::vector<unsigned>& ids = it->second;
for (std::vector<unsigned>::const_iterator jt = ids.begin(); jt != ids.end(); ++jt) {
ret->push(instance_by_id(*jt));
}
}
by_ref_cached_[t] = ret;
}
}
return return_value;
return ret;
}
IfcUtil::IfcBaseClass* IfcFile::instance_by_id(int id) {
+49 -47
View File
@@ -195,53 +195,52 @@ namespace IfcParse {
virtual const enumeration_type* as_enumeration_type() const { return this; }
};
class entity : public declaration {
public:
class attribute {
protected:
std::string name_;
const parameter_type* type_of_attribute_;
bool optional_;
public:
attribute(const std::string& name, parameter_type* type_of_attribute, bool optional)
: name_(name)
, type_of_attribute_(type_of_attribute)
, optional_(optional) {}
const std::string& name() const { return name_; }
const parameter_type* type_of_attribute() const { return type_of_attribute_; }
bool optional() const { return optional_; }
};
class inverse_attribute {
public:
typedef enum { bag_type, set_type, unspecified_type } aggregate_type;
protected:
std::string name_;
aggregate_type type_of_aggregation_;
int bound1_, bound2_;
const entity* entity_reference_;
const attribute* attribute_reference_;
public:
inverse_attribute(const std::string& name, aggregate_type type_of_aggregation, int bound1, int bound2, const entity* entity_reference, const attribute* attribute_reference)
: name_(name)
, type_of_aggregation_(type_of_aggregation)
, bound1_(bound1)
, bound2_(bound2)
, entity_reference_(entity_reference)
, attribute_reference_(attribute_reference)
{}
const std::string& name() const { return name_; }
aggregate_type type_of_aggregation() const { return type_of_aggregation_; }
int bound1() const { return bound1_; }
int bound2() const { return bound2_; }
const entity* entity_reference() const { return entity_reference_; }
const attribute* attribute_reference() const { return attribute_reference_; }
};
class attribute {
protected:
std::string name_;
const parameter_type* type_of_attribute_;
bool optional_;
public:
attribute(const std::string& name, parameter_type* type_of_attribute, bool optional)
: name_(name)
, type_of_attribute_(type_of_attribute)
, optional_(optional) {}
const std::string& name() const { return name_; }
const parameter_type* type_of_attribute() const { return type_of_attribute_; }
bool optional() const { return optional_; }
};
class inverse_attribute {
public:
typedef enum { bag_type, set_type, unspecified_type } aggregate_type;
protected:
std::string name_;
aggregate_type type_of_aggregation_;
int bound1_, bound2_;
const entity* entity_reference_;
const attribute* attribute_reference_;
public:
inverse_attribute(const std::string& name, aggregate_type type_of_aggregation, int bound1, int bound2, const entity* entity_reference, const attribute* attribute_reference)
: name_(name)
, type_of_aggregation_(type_of_aggregation)
, bound1_(bound1)
, bound2_(bound2)
, entity_reference_(entity_reference)
, attribute_reference_(attribute_reference) {}
const std::string& name() const { return name_; }
aggregate_type type_of_aggregation() const { return type_of_aggregation_; }
int bound1() const { return bound1_; }
int bound2() const { return bound2_; }
const entity* entity_reference() const { return entity_reference_; }
const attribute* attribute_reference() const { return attribute_reference_; }
};
class entity : public declaration {
protected:
bool is_abstract_;
const entity* supertype_; /* NB: IFC explicitly allows only single inheritance */
std::vector<const entity*> subtypes_;
@@ -276,8 +275,9 @@ namespace IfcParse {
}
public:
entity(const std::string& name, int index_in_schema, entity* supertype)
entity(const std::string& name, bool is_abstract, int index_in_schema, entity* supertype)
: declaration(name, index_in_schema)
, is_abstract_(is_abstract)
, supertype_(supertype)
{}
@@ -293,6 +293,8 @@ namespace IfcParse {
else return false;
}
bool is_abstract() const { return is_abstract_; }
void set_subtypes(const std::vector<const entity*>& subtypes) {
subtypes_ = subtypes;
}
+85 -1
View File
@@ -17,8 +17,43 @@
* *
********************************************************************************/
#ifdef _MSC_VER
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#ifndef NOMSG
#define NOMSG NOMSG
#endif
#ifndef NODRAWTEXT
#define NODRAWTEXT NODRAWTEXT
#endif
#ifndef NOGDI
#define NOGDI NOGDI
#endif
#ifndef NOSERVICE
#define NOSERVICE NOSERVICE
#endif
#ifndef NOKERNEL
#define NOKERNEL NOKERNEL
#endif
#ifndef NOUSER
#define NOUSER NOUSER
#endif
#ifndef NOMCX
#define NOMCX NOMCX
#endif
#ifndef NOIME
#define NOIME NOIME
#endif
#include <Windows.h>
#endif
#include "../ifcparse/IfcBaseClass.h"
#include "../ifcparse/Argument.h"
#include "../ifcparse/utils.h"
#include "../ifcparse/IfcException.h"
#include "../ifcparse/IfcEntityList.h"
@@ -42,6 +77,7 @@ void IfcEntityList::push(const IfcEntityList::ptr& l) {
}
}
unsigned int IfcEntityList::size() const { return (unsigned int) ls.size(); }
void IfcEntityList::reserve(unsigned capacity) { ls.reserve((size_t)capacity); }
IfcEntityList::it IfcEntityList::begin() { return ls.begin(); }
IfcEntityList::it IfcEntityList::end() { return ls.end(); }
IfcUtil::IfcBaseClass* IfcEntityList::operator[] (int i) {
@@ -239,4 +275,52 @@ IfcUtil::ArgumentType IfcUtil::from_parameter_type(const IfcParse::parameter_typ
}
return IfcUtil::Argument_UNKNOWN;
}
}
#ifdef _MSC_VER
std::string IfcUtil::path::to_utf8(const std::wstring& str) {
int buffer_size = WideCharToMultiByte(CP_UTF8, 0, str.c_str(), -1, 0, 0, 0, 0);
char* buffer = new char[buffer_size];
WideCharToMultiByte(CP_UTF8, 0, str.c_str(), -1, buffer, buffer_size, 0, 0);
std::string str_utf8(buffer);
delete[] buffer;
return str_utf8;
}
std::wstring IfcUtil::path::from_utf8(const std::string& str) {
int buffer_size = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, 0, 0);
wchar_t* buffer = new wchar_t[buffer_size];
MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, buffer, buffer_size);
std::wstring str_wide(buffer);
delete[] buffer;
return str_wide;
}
IFC_PARSE_API bool IfcUtil::path::rename_file(const std::string& old_filename, const std::string& new_filename) {
std::wstring old_filename_w = from_utf8(old_filename);
std::wstring new_filename_w = from_utf8(new_filename);
delete_file(new_filename);
const bool success = !!MoveFileW(old_filename_w.c_str(), new_filename_w.c_str());
return success;
}
IFC_PARSE_API bool IfcUtil::path::delete_file(const std::string& filename) {
std::wstring filename_w = from_utf8(filename);
const bool success = !!DeleteFileW(filename_w.c_str());
return success;
}
#else
IFC_PARSE_API bool IfcUtil::path::rename_file(const std::string& old_filename, const std::string& new_filename) {
// Whether or not rename() replaces an existing file is implementation-specific,
// so remove() possible existing file always.
delete_file(new_filename);
return std::rename(old_filename.c_str(), new_filename.c_str()) == 0;
}
IFC_PARSE_API bool IfcUtil::path::delete_file(const std::string& filename) {
return std::remove(filename.c_str());
}
#endif
+4 -4
View File
@@ -47,7 +47,7 @@ protected:
node_type type_;
IfcUtil::IfcBaseClass* inst_;
int idx_;
const IfcParse::entity::inverse_attribute* inv_;
const IfcParse::inverse_attribute* inv_;
std::string tagname_;
std::string id_in_file_;
const IfcParse::parameter_type* aggregate_elem_type_;
@@ -92,7 +92,7 @@ public:
return n;
}
static stack_node inverse(IfcUtil::IfcBaseClass* inst, const IfcParse::entity::inverse_attribute* inv) {
static stack_node inverse(IfcUtil::IfcBaseClass* inst, const IfcParse::inverse_attribute* inv) {
stack_node n;
n.type_ = node_inverse;
n.inst_ = inst;
@@ -125,7 +125,7 @@ public:
IfcUtil::IfcBaseClass* inst() const { return inst_; }
int idx() const { return idx_; }
const IfcParse::entity::inverse_attribute* inv_attr() const { return inv_; }
const IfcParse::inverse_attribute* inv_attr() const { return inv_; }
const std::string& tagname() const { return tagname_; }
const std::string& id_in_file() const { return id_in_file_; }
const IfcParse::parameter_type* aggregate_elem_type() const { return aggregate_elem_type_; }
@@ -483,7 +483,7 @@ static void start_element(void* user, const xmlChar* tag, const xmlChar** attrs)
auto idx = current->attribute_index(tagname);
if (idx == -1) {
auto inverses = current->all_inverse_attributes();
auto found = std::find_if(inverses.begin(), inverses.end(), [&tagname](const IfcParse::entity::inverse_attribute* attr) {
auto found = std::find_if(inverses.begin(), inverses.end(), [&tagname](const IfcParse::inverse_attribute* attr) {
return attr->name() == tagname;
});
if (found == inverses.end()) {
+59
View File
@@ -0,0 +1,59 @@
/********************************************************************************
* *
* This file is part of IfcOpenShell. *
* *
* IfcOpenShell is free software: you can redistribute it and/or modify *
* it under the terms of the Lesser GNU General Public License as published by *
* the Free Software Foundation, either version 3.0 of the License, or *
* (at your option) any later version. *
* *
* IfcOpenShell is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* Lesser GNU General Public License for more details. *
* *
* You should have received a copy of the Lesser GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
********************************************************************************/
#include "../ifcparse/ifc_parse_api.h"
#include <string>
#ifndef IFCPARSE_UTILS_H
#define IFCPARSE_UTILS_H
namespace IfcUtil {
/// Replaces spaces and potentially other problem causing characters with underscores.
IFC_PARSE_API void sanitate_material_name(std::string &str);
IFC_PARSE_API void escape_xml(std::string &str);
IFC_PARSE_API void unescape_xml(std::string &str);
namespace path {
IFC_PARSE_API bool delete_file(const std::string& filename);
IFC_PARSE_API bool rename_file(const std::string& old_filename, const std::string& new_filename);
#ifdef _MSC_VER
/// Uses windows.h string conversion functions
IFC_PARSE_API std::string to_utf8(const std::wstring& str);
/// Uses windows.h string conversion functions
IFC_PARSE_API std::wstring from_utf8(const std::string& str);
#else
/// Identity operation
IFC_PARSE_API inline std::string to_utf8(const std::string& str) { return str; }
/// Identity operation
IFC_PARSE_API inline std::string from_utf8(const std::string& str) { return str; }
#endif
}
}
#endif