Use constant time parent enumeration lookup

This commit is contained in:
Thomas Krijnen
2016-03-18 11:14:14 +01:00
parent 28560d164c
commit 0ceef8fe67
10 changed files with 103 additions and 1292 deletions
+9 -6
View File
@@ -167,12 +167,15 @@ class Implementation(codegen.Base):
'name' : name,
'padding' : ' ' * (max_len - len(name))
} for name in enumerable_types]
enumeration_index_by_str = dict((j,i) for i,j in enumerate(enumerable_types))
def get_parent_id(s):
e = mapping.schema.entities.get(s)
if e and e.supertypes:
return enumeration_index_by_str[e.supertypes[0]]
else: return -1
parent_type_statements = [templates.parent_type_stmt % {
'name' : name,
'parent' : type.supertypes[0],
'padding' : ' ' * (max_len - len(name))
} for name, type in mapping.schema.entities.items() if type.supertypes and len(type.supertypes) == 1]
parent_type_statements = ",".join(map(str, map(get_parent_id, enumerable_types)))
max_id = len(enumerable_types)
@@ -225,7 +228,7 @@ class Implementation(codegen.Base):
'type_name_strings' : type_name_strings,
'string_map_statements' : catnl(string_map_statements),
'simple_type_statement' : simple_type_statements,
'parent_type_statements' : catnl(parent_type_statements),
'parent_type_statements' : parent_type_statements,
'entity_implementations' : catnl(entity_implementations),
'simple_type_impl' : catnl(simple_type_impl)
}
+25 -7
View File
@@ -62,6 +62,8 @@ enum_header = """
#ifndef %(schema_name_upper)sENUM_H
#define %(schema_name_upper)sENUM_H
#include <boost/optional.hpp>
#define IfcSchema %(schema_name)s
namespace %(schema_name)s {
@@ -70,7 +72,7 @@ namespace Type {
typedef enum {
%(types)s, UNDEFINED
} Enum;
Enum Parent(Enum v);
boost::optional<Enum> Parent(Enum v);
Enum FromString(const std::string& s);
std::string ToString(Enum v);
bool IsSimple(Enum v);
@@ -146,10 +148,14 @@ Type::Enum Type::FromString(const std::string& s) {
else return it->second;
}
Type::Enum Type::Parent(Enum v){
if (v < 0 || v >= %(max_id)d) return (Enum)-1;
%(parent_type_statements)s
return (Enum)-1;
static int parent_map[] = {%(parent_type_statements)s};
boost::optional<Type::Enum> Type::Parent(Enum v){
const int p = parent_map[static_cast<int>(v)];
if (p >= 0) {
return static_cast<Type::Enum>(p);
} else {
return boost::none;
}
}
bool Type::IsSimple(Enum v) {
@@ -282,7 +288,13 @@ std::pair<Type::Enum, unsigned> Type::GetInverseAttribute(Enum t, const std::str
return jt->second;
}
}
if ((t = Parent(t)) == -1) break;
boost::optional<Enum> pt = Parent(t);
if (pt) {
t = *pt;
}
else {
break;
}
}
throw IfcException("Attribute not found");
}
@@ -301,7 +313,13 @@ std::set<std::string> Type::GetInverseAttributeNames(Enum t) {
return_value.insert(jt->first);
}
}
if ((t = Parent(t)) == -1) break;
boost::optional<Enum> pt = Parent(t);
if (pt) {
t = *pt;
}
else {
break;
}
}
return return_value;
+14 -2
View File
@@ -4258,7 +4258,13 @@ std::pair<Type::Enum, unsigned> Type::GetInverseAttribute(Enum t, const std::str
return jt->second;
}
}
if ((t = Parent(t)) == -1) break;
boost::optional<Enum> pt = Parent(t);
if (pt) {
t = *pt;
}
else {
break;
}
}
throw IfcException("Attribute not found");
}
@@ -4277,7 +4283,13 @@ std::set<std::string> Type::GetInverseAttributeNames(Enum t) {
return_value.insert(jt->first);
}
}
if ((t = Parent(t)) == -1) break;
boost::optional<Enum> pt = Parent(t);
if (pt) {
t = *pt;
}
else {
break;
}
}
return return_value;
+8 -555
View File
@@ -1810,561 +1810,14 @@ Type::Enum Type::FromString(const std::string& s) {
else return it->second;
}
Type::Enum Type::Parent(Enum v){
if (v < 0 || v >= 980) return (Enum)-1;
if(v==Ifc2DCompositeCurve ) { return IfcCompositeCurve; }
if(v==IfcActionRequest ) { return IfcControl; }
if(v==IfcActor ) { return IfcObject; }
if(v==IfcActuatorType ) { return IfcDistributionControlElementType; }
if(v==IfcAirTerminalBoxType ) { return IfcFlowControllerType; }
if(v==IfcAirTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcAirToAirHeatRecoveryType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcAlarmType ) { return IfcDistributionControlElementType; }
if(v==IfcAngularDimension ) { return IfcDimensionCurveDirectedCallout; }
if(v==IfcAnnotation ) { return IfcProduct; }
if(v==IfcAnnotationCurveOccurrence ) { return IfcAnnotationOccurrence; }
if(v==IfcAnnotationFillArea ) { return IfcGeometricRepresentationItem; }
if(v==IfcAnnotationFillAreaOccurrence ) { return IfcAnnotationOccurrence; }
if(v==IfcAnnotationOccurrence ) { return IfcStyledItem; }
if(v==IfcAnnotationSurface ) { return IfcGeometricRepresentationItem; }
if(v==IfcAnnotationSurfaceOccurrence ) { return IfcAnnotationOccurrence; }
if(v==IfcAnnotationSymbolOccurrence ) { return IfcAnnotationOccurrence; }
if(v==IfcAnnotationTextOccurrence ) { return IfcAnnotationOccurrence; }
if(v==IfcArbitraryClosedProfileDef ) { return IfcProfileDef; }
if(v==IfcArbitraryOpenProfileDef ) { return IfcProfileDef; }
if(v==IfcArbitraryProfileDefWithVoids ) { return IfcArbitraryClosedProfileDef; }
if(v==IfcAsset ) { return IfcGroup; }
if(v==IfcAsymmetricIShapeProfileDef ) { return IfcIShapeProfileDef; }
if(v==IfcAxis1Placement ) { return IfcPlacement; }
if(v==IfcAxis2Placement2D ) { return IfcPlacement; }
if(v==IfcAxis2Placement3D ) { return IfcPlacement; }
if(v==IfcBSplineCurve ) { return IfcBoundedCurve; }
if(v==IfcBeam ) { return IfcBuildingElement; }
if(v==IfcBeamType ) { return IfcBuildingElementType; }
if(v==IfcBezierCurve ) { return IfcBSplineCurve; }
if(v==IfcBlobTexture ) { return IfcSurfaceTexture; }
if(v==IfcBlock ) { return IfcCsgPrimitive3D; }
if(v==IfcBoilerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcBooleanClippingResult ) { return IfcBooleanResult; }
if(v==IfcBooleanResult ) { return IfcGeometricRepresentationItem; }
if(v==IfcBoundaryEdgeCondition ) { return IfcBoundaryCondition; }
if(v==IfcBoundaryFaceCondition ) { return IfcBoundaryCondition; }
if(v==IfcBoundaryNodeCondition ) { return IfcBoundaryCondition; }
if(v==IfcBoundaryNodeConditionWarping ) { return IfcBoundaryNodeCondition; }
if(v==IfcBoundedCurve ) { return IfcCurve; }
if(v==IfcBoundedSurface ) { return IfcSurface; }
if(v==IfcBoundingBox ) { return IfcGeometricRepresentationItem; }
if(v==IfcBoxedHalfSpace ) { return IfcHalfSpaceSolid; }
if(v==IfcBuilding ) { return IfcSpatialStructureElement; }
if(v==IfcBuildingElement ) { return IfcElement; }
if(v==IfcBuildingElementComponent ) { return IfcBuildingElement; }
if(v==IfcBuildingElementPart ) { return IfcBuildingElementComponent; }
if(v==IfcBuildingElementProxy ) { return IfcBuildingElement; }
if(v==IfcBuildingElementProxyType ) { return IfcBuildingElementType; }
if(v==IfcBuildingElementType ) { return IfcElementType; }
if(v==IfcBuildingStorey ) { return IfcSpatialStructureElement; }
if(v==IfcCShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcCableCarrierFittingType ) { return IfcFlowFittingType; }
if(v==IfcCableCarrierSegmentType ) { return IfcFlowSegmentType; }
if(v==IfcCableSegmentType ) { return IfcFlowSegmentType; }
if(v==IfcCartesianPoint ) { return IfcPoint; }
if(v==IfcCartesianTransformationOperator ) { return IfcGeometricRepresentationItem; }
if(v==IfcCartesianTransformationOperator2D ) { return IfcCartesianTransformationOperator; }
if(v==IfcCartesianTransformationOperator2DnonUniform) { return IfcCartesianTransformationOperator2D; }
if(v==IfcCartesianTransformationOperator3D ) { return IfcCartesianTransformationOperator; }
if(v==IfcCartesianTransformationOperator3DnonUniform) { return IfcCartesianTransformationOperator3D; }
if(v==IfcCenterLineProfileDef ) { return IfcArbitraryOpenProfileDef; }
if(v==IfcChamferEdgeFeature ) { return IfcEdgeFeature; }
if(v==IfcChillerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcCircle ) { return IfcConic; }
if(v==IfcCircleHollowProfileDef ) { return IfcCircleProfileDef; }
if(v==IfcCircleProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcClassificationReference ) { return IfcExternalReference; }
if(v==IfcClosedShell ) { return IfcConnectedFaceSet; }
if(v==IfcCoilType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcColourRgb ) { return IfcColourSpecification; }
if(v==IfcColumn ) { return IfcBuildingElement; }
if(v==IfcColumnType ) { return IfcBuildingElementType; }
if(v==IfcComplexProperty ) { return IfcProperty; }
if(v==IfcCompositeCurve ) { return IfcBoundedCurve; }
if(v==IfcCompositeCurveSegment ) { return IfcGeometricRepresentationItem; }
if(v==IfcCompositeProfileDef ) { return IfcProfileDef; }
if(v==IfcCompressorType ) { return IfcFlowMovingDeviceType; }
if(v==IfcCondenserType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcCondition ) { return IfcGroup; }
if(v==IfcConditionCriterion ) { return IfcControl; }
if(v==IfcConic ) { return IfcCurve; }
if(v==IfcConnectedFaceSet ) { return IfcTopologicalRepresentationItem; }
if(v==IfcConnectionCurveGeometry ) { return IfcConnectionGeometry; }
if(v==IfcConnectionPointEccentricity ) { return IfcConnectionPointGeometry; }
if(v==IfcConnectionPointGeometry ) { return IfcConnectionGeometry; }
if(v==IfcConnectionPortGeometry ) { return IfcConnectionGeometry; }
if(v==IfcConnectionSurfaceGeometry ) { return IfcConnectionGeometry; }
if(v==IfcConstructionEquipmentResource ) { return IfcConstructionResource; }
if(v==IfcConstructionMaterialResource ) { return IfcConstructionResource; }
if(v==IfcConstructionProductResource ) { return IfcConstructionResource; }
if(v==IfcConstructionResource ) { return IfcResource; }
if(v==IfcContextDependentUnit ) { return IfcNamedUnit; }
if(v==IfcControl ) { return IfcObject; }
if(v==IfcControllerType ) { return IfcDistributionControlElementType; }
if(v==IfcConversionBasedUnit ) { return IfcNamedUnit; }
if(v==IfcCooledBeamType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcCoolingTowerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcCostItem ) { return IfcControl; }
if(v==IfcCostSchedule ) { return IfcControl; }
if(v==IfcCostValue ) { return IfcAppliedValue; }
if(v==IfcCovering ) { return IfcBuildingElement; }
if(v==IfcCoveringType ) { return IfcBuildingElementType; }
if(v==IfcCraneRailAShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcCraneRailFShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcCrewResource ) { return IfcConstructionResource; }
if(v==IfcCsgPrimitive3D ) { return IfcGeometricRepresentationItem; }
if(v==IfcCsgSolid ) { return IfcSolidModel; }
if(v==IfcCurtainWall ) { return IfcBuildingElement; }
if(v==IfcCurtainWallType ) { return IfcBuildingElementType; }
if(v==IfcCurve ) { return IfcGeometricRepresentationItem; }
if(v==IfcCurveBoundedPlane ) { return IfcBoundedSurface; }
if(v==IfcCurveStyle ) { return IfcPresentationStyle; }
if(v==IfcDamperType ) { return IfcFlowControllerType; }
if(v==IfcDefinedSymbol ) { return IfcGeometricRepresentationItem; }
if(v==IfcDerivedProfileDef ) { return IfcProfileDef; }
if(v==IfcDiameterDimension ) { return IfcDimensionCurveDirectedCallout; }
if(v==IfcDimensionCalloutRelationship ) { return IfcDraughtingCalloutRelationship; }
if(v==IfcDimensionCurve ) { return IfcAnnotationCurveOccurrence; }
if(v==IfcDimensionCurveDirectedCallout ) { return IfcDraughtingCallout; }
if(v==IfcDimensionCurveTerminator ) { return IfcTerminatorSymbol; }
if(v==IfcDimensionPair ) { return IfcDraughtingCalloutRelationship; }
if(v==IfcDirection ) { return IfcGeometricRepresentationItem; }
if(v==IfcDiscreteAccessory ) { return IfcElementComponent; }
if(v==IfcDiscreteAccessoryType ) { return IfcElementComponentType; }
if(v==IfcDistributionChamberElement ) { return IfcDistributionFlowElement; }
if(v==IfcDistributionChamberElementType ) { return IfcDistributionFlowElementType; }
if(v==IfcDistributionControlElement ) { return IfcDistributionElement; }
if(v==IfcDistributionControlElementType ) { return IfcDistributionElementType; }
if(v==IfcDistributionElement ) { return IfcElement; }
if(v==IfcDistributionElementType ) { return IfcElementType; }
if(v==IfcDistributionFlowElement ) { return IfcDistributionElement; }
if(v==IfcDistributionFlowElementType ) { return IfcDistributionElementType; }
if(v==IfcDistributionPort ) { return IfcPort; }
if(v==IfcDocumentReference ) { return IfcExternalReference; }
if(v==IfcDoor ) { return IfcBuildingElement; }
if(v==IfcDoorLiningProperties ) { return IfcPropertySetDefinition; }
if(v==IfcDoorPanelProperties ) { return IfcPropertySetDefinition; }
if(v==IfcDoorStyle ) { return IfcTypeProduct; }
if(v==IfcDraughtingCallout ) { return IfcGeometricRepresentationItem; }
if(v==IfcDraughtingPreDefinedColour ) { return IfcPreDefinedColour; }
if(v==IfcDraughtingPreDefinedCurveFont ) { return IfcPreDefinedCurveFont; }
if(v==IfcDraughtingPreDefinedTextFont ) { return IfcPreDefinedTextFont; }
if(v==IfcDuctFittingType ) { return IfcFlowFittingType; }
if(v==IfcDuctSegmentType ) { return IfcFlowSegmentType; }
if(v==IfcDuctSilencerType ) { return IfcFlowTreatmentDeviceType; }
if(v==IfcEdge ) { return IfcTopologicalRepresentationItem; }
if(v==IfcEdgeCurve ) { return IfcEdge; }
if(v==IfcEdgeFeature ) { return IfcFeatureElementSubtraction; }
if(v==IfcEdgeLoop ) { return IfcLoop; }
if(v==IfcElectricApplianceType ) { return IfcFlowTerminalType; }
if(v==IfcElectricDistributionPoint ) { return IfcFlowController; }
if(v==IfcElectricFlowStorageDeviceType ) { return IfcFlowStorageDeviceType; }
if(v==IfcElectricGeneratorType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcElectricHeaterType ) { return IfcFlowTerminalType; }
if(v==IfcElectricMotorType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcElectricTimeControlType ) { return IfcFlowControllerType; }
if(v==IfcElectricalBaseProperties ) { return IfcEnergyProperties; }
if(v==IfcElectricalCircuit ) { return IfcSystem; }
if(v==IfcElectricalElement ) { return IfcElement; }
if(v==IfcElement ) { return IfcProduct; }
if(v==IfcElementAssembly ) { return IfcElement; }
if(v==IfcElementComponent ) { return IfcElement; }
if(v==IfcElementComponentType ) { return IfcElementType; }
if(v==IfcElementQuantity ) { return IfcPropertySetDefinition; }
if(v==IfcElementType ) { return IfcTypeProduct; }
if(v==IfcElementarySurface ) { return IfcSurface; }
if(v==IfcEllipse ) { return IfcConic; }
if(v==IfcEllipseProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcEnergyConversionDevice ) { return IfcDistributionFlowElement; }
if(v==IfcEnergyConversionDeviceType ) { return IfcDistributionFlowElementType; }
if(v==IfcEnergyProperties ) { return IfcPropertySetDefinition; }
if(v==IfcEnvironmentalImpactValue ) { return IfcAppliedValue; }
if(v==IfcEquipmentElement ) { return IfcElement; }
if(v==IfcEquipmentStandard ) { return IfcControl; }
if(v==IfcEvaporativeCoolerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcEvaporatorType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcExtendedMaterialProperties ) { return IfcMaterialProperties; }
if(v==IfcExternallyDefinedHatchStyle ) { return IfcExternalReference; }
if(v==IfcExternallyDefinedSurfaceStyle ) { return IfcExternalReference; }
if(v==IfcExternallyDefinedSymbol ) { return IfcExternalReference; }
if(v==IfcExternallyDefinedTextFont ) { return IfcExternalReference; }
if(v==IfcExtrudedAreaSolid ) { return IfcSweptAreaSolid; }
if(v==IfcFace ) { return IfcTopologicalRepresentationItem; }
if(v==IfcFaceBasedSurfaceModel ) { return IfcGeometricRepresentationItem; }
if(v==IfcFaceBound ) { return IfcTopologicalRepresentationItem; }
if(v==IfcFaceOuterBound ) { return IfcFaceBound; }
if(v==IfcFaceSurface ) { return IfcFace; }
if(v==IfcFacetedBrep ) { return IfcManifoldSolidBrep; }
if(v==IfcFacetedBrepWithVoids ) { return IfcManifoldSolidBrep; }
if(v==IfcFailureConnectionCondition ) { return IfcStructuralConnectionCondition; }
if(v==IfcFanType ) { return IfcFlowMovingDeviceType; }
if(v==IfcFastener ) { return IfcElementComponent; }
if(v==IfcFastenerType ) { return IfcElementComponentType; }
if(v==IfcFeatureElement ) { return IfcElement; }
if(v==IfcFeatureElementAddition ) { return IfcFeatureElement; }
if(v==IfcFeatureElementSubtraction ) { return IfcFeatureElement; }
if(v==IfcFillAreaStyle ) { return IfcPresentationStyle; }
if(v==IfcFillAreaStyleHatching ) { return IfcGeometricRepresentationItem; }
if(v==IfcFillAreaStyleTileSymbolWithStyle ) { return IfcGeometricRepresentationItem; }
if(v==IfcFillAreaStyleTiles ) { return IfcGeometricRepresentationItem; }
if(v==IfcFilterType ) { return IfcFlowTreatmentDeviceType; }
if(v==IfcFireSuppressionTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcFlowController ) { return IfcDistributionFlowElement; }
if(v==IfcFlowControllerType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowFitting ) { return IfcDistributionFlowElement; }
if(v==IfcFlowFittingType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowInstrumentType ) { return IfcDistributionControlElementType; }
if(v==IfcFlowMeterType ) { return IfcFlowControllerType; }
if(v==IfcFlowMovingDevice ) { return IfcDistributionFlowElement; }
if(v==IfcFlowMovingDeviceType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowSegment ) { return IfcDistributionFlowElement; }
if(v==IfcFlowSegmentType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowStorageDevice ) { return IfcDistributionFlowElement; }
if(v==IfcFlowStorageDeviceType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowTerminal ) { return IfcDistributionFlowElement; }
if(v==IfcFlowTerminalType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowTreatmentDevice ) { return IfcDistributionFlowElement; }
if(v==IfcFlowTreatmentDeviceType ) { return IfcDistributionFlowElementType; }
if(v==IfcFluidFlowProperties ) { return IfcPropertySetDefinition; }
if(v==IfcFooting ) { return IfcBuildingElement; }
if(v==IfcFuelProperties ) { return IfcMaterialProperties; }
if(v==IfcFurnishingElement ) { return IfcElement; }
if(v==IfcFurnishingElementType ) { return IfcElementType; }
if(v==IfcFurnitureStandard ) { return IfcControl; }
if(v==IfcFurnitureType ) { return IfcFurnishingElementType; }
if(v==IfcGasTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcGeneralMaterialProperties ) { return IfcMaterialProperties; }
if(v==IfcGeneralProfileProperties ) { return IfcProfileProperties; }
if(v==IfcGeometricCurveSet ) { return IfcGeometricSet; }
if(v==IfcGeometricRepresentationContext ) { return IfcRepresentationContext; }
if(v==IfcGeometricRepresentationItem ) { return IfcRepresentationItem; }
if(v==IfcGeometricRepresentationSubContext ) { return IfcGeometricRepresentationContext; }
if(v==IfcGeometricSet ) { return IfcGeometricRepresentationItem; }
if(v==IfcGrid ) { return IfcProduct; }
if(v==IfcGridPlacement ) { return IfcObjectPlacement; }
if(v==IfcGroup ) { return IfcObject; }
if(v==IfcHalfSpaceSolid ) { return IfcGeometricRepresentationItem; }
if(v==IfcHeatExchangerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcHumidifierType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcHygroscopicMaterialProperties ) { return IfcMaterialProperties; }
if(v==IfcIShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcImageTexture ) { return IfcSurfaceTexture; }
if(v==IfcInventory ) { return IfcGroup; }
if(v==IfcIrregularTimeSeries ) { return IfcTimeSeries; }
if(v==IfcJunctionBoxType ) { return IfcFlowFittingType; }
if(v==IfcLShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcLaborResource ) { return IfcConstructionResource; }
if(v==IfcLampType ) { return IfcFlowTerminalType; }
if(v==IfcLibraryReference ) { return IfcExternalReference; }
if(v==IfcLightFixtureType ) { return IfcFlowTerminalType; }
if(v==IfcLightSource ) { return IfcGeometricRepresentationItem; }
if(v==IfcLightSourceAmbient ) { return IfcLightSource; }
if(v==IfcLightSourceDirectional ) { return IfcLightSource; }
if(v==IfcLightSourceGoniometric ) { return IfcLightSource; }
if(v==IfcLightSourcePositional ) { return IfcLightSource; }
if(v==IfcLightSourceSpot ) { return IfcLightSourcePositional; }
if(v==IfcLine ) { return IfcCurve; }
if(v==IfcLinearDimension ) { return IfcDimensionCurveDirectedCallout; }
if(v==IfcLocalPlacement ) { return IfcObjectPlacement; }
if(v==IfcLoop ) { return IfcTopologicalRepresentationItem; }
if(v==IfcManifoldSolidBrep ) { return IfcSolidModel; }
if(v==IfcMappedItem ) { return IfcRepresentationItem; }
if(v==IfcMaterialDefinitionRepresentation ) { return IfcProductRepresentation; }
if(v==IfcMechanicalConcreteMaterialProperties ) { return IfcMechanicalMaterialProperties; }
if(v==IfcMechanicalFastener ) { return IfcFastener; }
if(v==IfcMechanicalFastenerType ) { return IfcFastenerType; }
if(v==IfcMechanicalMaterialProperties ) { return IfcMaterialProperties; }
if(v==IfcMechanicalSteelMaterialProperties ) { return IfcMechanicalMaterialProperties; }
if(v==IfcMember ) { return IfcBuildingElement; }
if(v==IfcMemberType ) { return IfcBuildingElementType; }
if(v==IfcMetric ) { return IfcConstraint; }
if(v==IfcMotorConnectionType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcMove ) { return IfcTask; }
if(v==IfcObject ) { return IfcObjectDefinition; }
if(v==IfcObjectDefinition ) { return IfcRoot; }
if(v==IfcObjective ) { return IfcConstraint; }
if(v==IfcOccupant ) { return IfcActor; }
if(v==IfcOffsetCurve2D ) { return IfcCurve; }
if(v==IfcOffsetCurve3D ) { return IfcCurve; }
if(v==IfcOneDirectionRepeatFactor ) { return IfcGeometricRepresentationItem; }
if(v==IfcOpenShell ) { return IfcConnectedFaceSet; }
if(v==IfcOpeningElement ) { return IfcFeatureElementSubtraction; }
if(v==IfcOpticalMaterialProperties ) { return IfcMaterialProperties; }
if(v==IfcOrderAction ) { return IfcTask; }
if(v==IfcOrientedEdge ) { return IfcEdge; }
if(v==IfcOutletType ) { return IfcFlowTerminalType; }
if(v==IfcParameterizedProfileDef ) { return IfcProfileDef; }
if(v==IfcPath ) { return IfcTopologicalRepresentationItem; }
if(v==IfcPerformanceHistory ) { return IfcControl; }
if(v==IfcPermeableCoveringProperties ) { return IfcPropertySetDefinition; }
if(v==IfcPermit ) { return IfcControl; }
if(v==IfcPhysicalComplexQuantity ) { return IfcPhysicalQuantity; }
if(v==IfcPhysicalSimpleQuantity ) { return IfcPhysicalQuantity; }
if(v==IfcPile ) { return IfcBuildingElement; }
if(v==IfcPipeFittingType ) { return IfcFlowFittingType; }
if(v==IfcPipeSegmentType ) { return IfcFlowSegmentType; }
if(v==IfcPixelTexture ) { return IfcSurfaceTexture; }
if(v==IfcPlacement ) { return IfcGeometricRepresentationItem; }
if(v==IfcPlanarBox ) { return IfcPlanarExtent; }
if(v==IfcPlanarExtent ) { return IfcGeometricRepresentationItem; }
if(v==IfcPlane ) { return IfcElementarySurface; }
if(v==IfcPlate ) { return IfcBuildingElement; }
if(v==IfcPlateType ) { return IfcBuildingElementType; }
if(v==IfcPoint ) { return IfcGeometricRepresentationItem; }
if(v==IfcPointOnCurve ) { return IfcPoint; }
if(v==IfcPointOnSurface ) { return IfcPoint; }
if(v==IfcPolyLoop ) { return IfcLoop; }
if(v==IfcPolygonalBoundedHalfSpace ) { return IfcHalfSpaceSolid; }
if(v==IfcPolyline ) { return IfcBoundedCurve; }
if(v==IfcPort ) { return IfcProduct; }
if(v==IfcPostalAddress ) { return IfcAddress; }
if(v==IfcPreDefinedColour ) { return IfcPreDefinedItem; }
if(v==IfcPreDefinedCurveFont ) { return IfcPreDefinedItem; }
if(v==IfcPreDefinedDimensionSymbol ) { return IfcPreDefinedSymbol; }
if(v==IfcPreDefinedPointMarkerSymbol ) { return IfcPreDefinedSymbol; }
if(v==IfcPreDefinedSymbol ) { return IfcPreDefinedItem; }
if(v==IfcPreDefinedTerminatorSymbol ) { return IfcPreDefinedSymbol; }
if(v==IfcPreDefinedTextFont ) { return IfcPreDefinedItem; }
if(v==IfcPresentationLayerWithStyle ) { return IfcPresentationLayerAssignment; }
if(v==IfcProcedure ) { return IfcProcess; }
if(v==IfcProcess ) { return IfcObject; }
if(v==IfcProduct ) { return IfcObject; }
if(v==IfcProductDefinitionShape ) { return IfcProductRepresentation; }
if(v==IfcProductsOfCombustionProperties ) { return IfcMaterialProperties; }
if(v==IfcProject ) { return IfcObject; }
if(v==IfcProjectOrder ) { return IfcControl; }
if(v==IfcProjectOrderRecord ) { return IfcControl; }
if(v==IfcProjectionCurve ) { return IfcAnnotationCurveOccurrence; }
if(v==IfcProjectionElement ) { return IfcFeatureElementAddition; }
if(v==IfcPropertyBoundedValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyDefinition ) { return IfcRoot; }
if(v==IfcPropertyEnumeratedValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyListValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyReferenceValue ) { return IfcSimpleProperty; }
if(v==IfcPropertySet ) { return IfcPropertySetDefinition; }
if(v==IfcPropertySetDefinition ) { return IfcPropertyDefinition; }
if(v==IfcPropertySingleValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyTableValue ) { return IfcSimpleProperty; }
if(v==IfcProtectiveDeviceType ) { return IfcFlowControllerType; }
if(v==IfcProxy ) { return IfcProduct; }
if(v==IfcPumpType ) { return IfcFlowMovingDeviceType; }
if(v==IfcQuantityArea ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityCount ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityLength ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityTime ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityVolume ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityWeight ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcRadiusDimension ) { return IfcDimensionCurveDirectedCallout; }
if(v==IfcRailing ) { return IfcBuildingElement; }
if(v==IfcRailingType ) { return IfcBuildingElementType; }
if(v==IfcRamp ) { return IfcBuildingElement; }
if(v==IfcRampFlight ) { return IfcBuildingElement; }
if(v==IfcRampFlightType ) { return IfcBuildingElementType; }
if(v==IfcRationalBezierCurve ) { return IfcBezierCurve; }
if(v==IfcRectangleHollowProfileDef ) { return IfcRectangleProfileDef; }
if(v==IfcRectangleProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcRectangularPyramid ) { return IfcCsgPrimitive3D; }
if(v==IfcRectangularTrimmedSurface ) { return IfcBoundedSurface; }
if(v==IfcRegularTimeSeries ) { return IfcTimeSeries; }
if(v==IfcReinforcementDefinitionProperties ) { return IfcPropertySetDefinition; }
if(v==IfcReinforcingBar ) { return IfcReinforcingElement; }
if(v==IfcReinforcingElement ) { return IfcBuildingElementComponent; }
if(v==IfcReinforcingMesh ) { return IfcReinforcingElement; }
if(v==IfcRelAggregates ) { return IfcRelDecomposes; }
if(v==IfcRelAssigns ) { return IfcRelationship; }
if(v==IfcRelAssignsTasks ) { return IfcRelAssignsToControl; }
if(v==IfcRelAssignsToActor ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToControl ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToGroup ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToProcess ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToProduct ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToProjectOrder ) { return IfcRelAssignsToControl; }
if(v==IfcRelAssignsToResource ) { return IfcRelAssigns; }
if(v==IfcRelAssociates ) { return IfcRelationship; }
if(v==IfcRelAssociatesAppliedValue ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesApproval ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesClassification ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesConstraint ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesDocument ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesLibrary ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesMaterial ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesProfileProperties ) { return IfcRelAssociates; }
if(v==IfcRelConnects ) { return IfcRelationship; }
if(v==IfcRelConnectsElements ) { return IfcRelConnects; }
if(v==IfcRelConnectsPathElements ) { return IfcRelConnectsElements; }
if(v==IfcRelConnectsPortToElement ) { return IfcRelConnects; }
if(v==IfcRelConnectsPorts ) { return IfcRelConnects; }
if(v==IfcRelConnectsStructuralActivity ) { return IfcRelConnects; }
if(v==IfcRelConnectsStructuralElement ) { return IfcRelConnects; }
if(v==IfcRelConnectsStructuralMember ) { return IfcRelConnects; }
if(v==IfcRelConnectsWithEccentricity ) { return IfcRelConnectsStructuralMember; }
if(v==IfcRelConnectsWithRealizingElements ) { return IfcRelConnectsElements; }
if(v==IfcRelContainedInSpatialStructure ) { return IfcRelConnects; }
if(v==IfcRelCoversBldgElements ) { return IfcRelConnects; }
if(v==IfcRelCoversSpaces ) { return IfcRelConnects; }
if(v==IfcRelDecomposes ) { return IfcRelationship; }
if(v==IfcRelDefines ) { return IfcRelationship; }
if(v==IfcRelDefinesByProperties ) { return IfcRelDefines; }
if(v==IfcRelDefinesByType ) { return IfcRelDefines; }
if(v==IfcRelFillsElement ) { return IfcRelConnects; }
if(v==IfcRelFlowControlElements ) { return IfcRelConnects; }
if(v==IfcRelInteractionRequirements ) { return IfcRelConnects; }
if(v==IfcRelNests ) { return IfcRelDecomposes; }
if(v==IfcRelOccupiesSpaces ) { return IfcRelAssignsToActor; }
if(v==IfcRelOverridesProperties ) { return IfcRelDefinesByProperties; }
if(v==IfcRelProjectsElement ) { return IfcRelConnects; }
if(v==IfcRelReferencedInSpatialStructure ) { return IfcRelConnects; }
if(v==IfcRelSchedulesCostItems ) { return IfcRelAssignsToControl; }
if(v==IfcRelSequence ) { return IfcRelConnects; }
if(v==IfcRelServicesBuildings ) { return IfcRelConnects; }
if(v==IfcRelSpaceBoundary ) { return IfcRelConnects; }
if(v==IfcRelVoidsElement ) { return IfcRelConnects; }
if(v==IfcRelationship ) { return IfcRoot; }
if(v==IfcResource ) { return IfcObject; }
if(v==IfcRevolvedAreaSolid ) { return IfcSweptAreaSolid; }
if(v==IfcRibPlateProfileProperties ) { return IfcProfileProperties; }
if(v==IfcRightCircularCone ) { return IfcCsgPrimitive3D; }
if(v==IfcRightCircularCylinder ) { return IfcCsgPrimitive3D; }
if(v==IfcRoof ) { return IfcBuildingElement; }
if(v==IfcRoundedEdgeFeature ) { return IfcEdgeFeature; }
if(v==IfcRoundedRectangleProfileDef ) { return IfcRectangleProfileDef; }
if(v==IfcSIUnit ) { return IfcNamedUnit; }
if(v==IfcSanitaryTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcScheduleTimeControl ) { return IfcControl; }
if(v==IfcSectionedSpine ) { return IfcGeometricRepresentationItem; }
if(v==IfcSensorType ) { return IfcDistributionControlElementType; }
if(v==IfcServiceLife ) { return IfcControl; }
if(v==IfcServiceLifeFactor ) { return IfcPropertySetDefinition; }
if(v==IfcShapeModel ) { return IfcRepresentation; }
if(v==IfcShapeRepresentation ) { return IfcShapeModel; }
if(v==IfcShellBasedSurfaceModel ) { return IfcGeometricRepresentationItem; }
if(v==IfcSimpleProperty ) { return IfcProperty; }
if(v==IfcSite ) { return IfcSpatialStructureElement; }
if(v==IfcSlab ) { return IfcBuildingElement; }
if(v==IfcSlabType ) { return IfcBuildingElementType; }
if(v==IfcSlippageConnectionCondition ) { return IfcStructuralConnectionCondition; }
if(v==IfcSolidModel ) { return IfcGeometricRepresentationItem; }
if(v==IfcSoundProperties ) { return IfcPropertySetDefinition; }
if(v==IfcSoundValue ) { return IfcPropertySetDefinition; }
if(v==IfcSpace ) { return IfcSpatialStructureElement; }
if(v==IfcSpaceHeaterType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcSpaceProgram ) { return IfcControl; }
if(v==IfcSpaceThermalLoadProperties ) { return IfcPropertySetDefinition; }
if(v==IfcSpaceType ) { return IfcSpatialStructureElementType; }
if(v==IfcSpatialStructureElement ) { return IfcProduct; }
if(v==IfcSpatialStructureElementType ) { return IfcElementType; }
if(v==IfcSphere ) { return IfcCsgPrimitive3D; }
if(v==IfcStackTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcStair ) { return IfcBuildingElement; }
if(v==IfcStairFlight ) { return IfcBuildingElement; }
if(v==IfcStairFlightType ) { return IfcBuildingElementType; }
if(v==IfcStructuralAction ) { return IfcStructuralActivity; }
if(v==IfcStructuralActivity ) { return IfcProduct; }
if(v==IfcStructuralAnalysisModel ) { return IfcSystem; }
if(v==IfcStructuralConnection ) { return IfcStructuralItem; }
if(v==IfcStructuralCurveConnection ) { return IfcStructuralConnection; }
if(v==IfcStructuralCurveMember ) { return IfcStructuralMember; }
if(v==IfcStructuralCurveMemberVarying ) { return IfcStructuralCurveMember; }
if(v==IfcStructuralItem ) { return IfcProduct; }
if(v==IfcStructuralLinearAction ) { return IfcStructuralAction; }
if(v==IfcStructuralLinearActionVarying ) { return IfcStructuralLinearAction; }
if(v==IfcStructuralLoadGroup ) { return IfcGroup; }
if(v==IfcStructuralLoadLinearForce ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralLoadPlanarForce ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralLoadSingleDisplacement ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralLoadSingleDisplacementDistortion ) { return IfcStructuralLoadSingleDisplacement; }
if(v==IfcStructuralLoadSingleForce ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralLoadSingleForceWarping ) { return IfcStructuralLoadSingleForce; }
if(v==IfcStructuralLoadStatic ) { return IfcStructuralLoad; }
if(v==IfcStructuralLoadTemperature ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralMember ) { return IfcStructuralItem; }
if(v==IfcStructuralPlanarAction ) { return IfcStructuralAction; }
if(v==IfcStructuralPlanarActionVarying ) { return IfcStructuralPlanarAction; }
if(v==IfcStructuralPointAction ) { return IfcStructuralAction; }
if(v==IfcStructuralPointConnection ) { return IfcStructuralConnection; }
if(v==IfcStructuralPointReaction ) { return IfcStructuralReaction; }
if(v==IfcStructuralProfileProperties ) { return IfcGeneralProfileProperties; }
if(v==IfcStructuralReaction ) { return IfcStructuralActivity; }
if(v==IfcStructuralResultGroup ) { return IfcGroup; }
if(v==IfcStructuralSteelProfileProperties ) { return IfcStructuralProfileProperties; }
if(v==IfcStructuralSurfaceConnection ) { return IfcStructuralConnection; }
if(v==IfcStructuralSurfaceMember ) { return IfcStructuralMember; }
if(v==IfcStructuralSurfaceMemberVarying ) { return IfcStructuralSurfaceMember; }
if(v==IfcStructuredDimensionCallout ) { return IfcDraughtingCallout; }
if(v==IfcStyleModel ) { return IfcRepresentation; }
if(v==IfcStyledItem ) { return IfcRepresentationItem; }
if(v==IfcStyledRepresentation ) { return IfcStyleModel; }
if(v==IfcSubContractResource ) { return IfcConstructionResource; }
if(v==IfcSubedge ) { return IfcEdge; }
if(v==IfcSurface ) { return IfcGeometricRepresentationItem; }
if(v==IfcSurfaceCurveSweptAreaSolid ) { return IfcSweptAreaSolid; }
if(v==IfcSurfaceOfLinearExtrusion ) { return IfcSweptSurface; }
if(v==IfcSurfaceOfRevolution ) { return IfcSweptSurface; }
if(v==IfcSurfaceStyle ) { return IfcPresentationStyle; }
if(v==IfcSurfaceStyleRendering ) { return IfcSurfaceStyleShading; }
if(v==IfcSweptAreaSolid ) { return IfcSolidModel; }
if(v==IfcSweptDiskSolid ) { return IfcSolidModel; }
if(v==IfcSweptSurface ) { return IfcSurface; }
if(v==IfcSwitchingDeviceType ) { return IfcFlowControllerType; }
if(v==IfcSymbolStyle ) { return IfcPresentationStyle; }
if(v==IfcSystem ) { return IfcGroup; }
if(v==IfcSystemFurnitureElementType ) { return IfcFurnishingElementType; }
if(v==IfcTShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcTankType ) { return IfcFlowStorageDeviceType; }
if(v==IfcTask ) { return IfcProcess; }
if(v==IfcTelecomAddress ) { return IfcAddress; }
if(v==IfcTendon ) { return IfcReinforcingElement; }
if(v==IfcTendonAnchor ) { return IfcReinforcingElement; }
if(v==IfcTerminatorSymbol ) { return IfcAnnotationSymbolOccurrence; }
if(v==IfcTextLiteral ) { return IfcGeometricRepresentationItem; }
if(v==IfcTextLiteralWithExtent ) { return IfcTextLiteral; }
if(v==IfcTextStyle ) { return IfcPresentationStyle; }
if(v==IfcTextStyleFontModel ) { return IfcPreDefinedTextFont; }
if(v==IfcTextureCoordinateGenerator ) { return IfcTextureCoordinate; }
if(v==IfcTextureMap ) { return IfcTextureCoordinate; }
if(v==IfcThermalMaterialProperties ) { return IfcMaterialProperties; }
if(v==IfcTimeSeriesSchedule ) { return IfcControl; }
if(v==IfcTopologicalRepresentationItem ) { return IfcRepresentationItem; }
if(v==IfcTopologyRepresentation ) { return IfcShapeModel; }
if(v==IfcTransformerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcTransportElement ) { return IfcElement; }
if(v==IfcTransportElementType ) { return IfcElementType; }
if(v==IfcTrapeziumProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcTrimmedCurve ) { return IfcBoundedCurve; }
if(v==IfcTubeBundleType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcTwoDirectionRepeatFactor ) { return IfcOneDirectionRepeatFactor; }
if(v==IfcTypeObject ) { return IfcObjectDefinition; }
if(v==IfcTypeProduct ) { return IfcTypeObject; }
if(v==IfcUShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcUnitaryEquipmentType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcValveType ) { return IfcFlowControllerType; }
if(v==IfcVector ) { return IfcGeometricRepresentationItem; }
if(v==IfcVertex ) { return IfcTopologicalRepresentationItem; }
if(v==IfcVertexLoop ) { return IfcLoop; }
if(v==IfcVertexPoint ) { return IfcVertex; }
if(v==IfcVibrationIsolatorType ) { return IfcDiscreteAccessoryType; }
if(v==IfcVirtualElement ) { return IfcElement; }
if(v==IfcWall ) { return IfcBuildingElement; }
if(v==IfcWallStandardCase ) { return IfcWall; }
if(v==IfcWallType ) { return IfcBuildingElementType; }
if(v==IfcWasteTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcWaterProperties ) { return IfcMaterialProperties; }
if(v==IfcWindow ) { return IfcBuildingElement; }
if(v==IfcWindowLiningProperties ) { return IfcPropertySetDefinition; }
if(v==IfcWindowPanelProperties ) { return IfcPropertySetDefinition; }
if(v==IfcWindowStyle ) { return IfcTypeProduct; }
if(v==IfcWorkControl ) { return IfcControl; }
if(v==IfcWorkPlan ) { return IfcWorkControl; }
if(v==IfcWorkSchedule ) { return IfcWorkControl; }
if(v==IfcZShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcZone ) { return IfcGroup; }
return (Enum)-1;
static int parent_map[] = {133,-1,-1,164,-1,-1,515,-1,-1,234,-1,-1,-1,-1,354,-1,369,-1,309,-1,234,-1,-1,-1,-1,221,-1,600,31,392,31,840,392,31,31,31,-1,-1,-1,-1,-1,-1,-1,-1,604,604,44,-1,-1,-1,401,412,560,-1,560,560,77,-1,83,89,-1,-1,56,857,184,309,-1,-1,71,-1,-1,392,-1,72,72,72,75,193,844,392,-1,402,786,297,83,84,83,89,-1,304,786,540,357,-1,365,-1,365,-1,-1,569,392,100,101,100,103,45,271,-1,-1,309,-1,144,113,540,-1,-1,-1,-1,-1,-1,322,145,309,-1,-1,-1,127,-1,83,89,-1,-1,615,77,392,604,-1,363,-1,309,-1,401,164,-1,193,916,147,-1,149,147,147,147,-1,-1,-1,-1,-1,-1,161,161,161,722,-1,511,515,234,-1,511,309,-1,309,-1,-1,164,164,-1,37,-1,83,89,-1,540,540,161,392,-1,773,-1,-1,83,89,-1,-1,392,78,-1,-1,593,-1,-1,-1,-1,354,-1,-1,-1,-1,-1,-1,392,-1,-1,604,-1,-1,-1,-1,221,258,-1,28,256,879,-1,258,-1,392,-1,300,301,237,238,-1,235,236,297,304,235,236,576,-1,-1,-1,-1,322,-1,-1,83,625,-1,-1,625,933,-1,-1,-1,392,-1,-1,582,583,589,357,-1,365,-1,371,-1,-1,916,269,342,464,369,-1,-1,-1,-1,-1,-1,353,-1,367,-1,309,-1,369,-1,309,-1,-1,354,-1,-1,311,866,297,600,297,-1,297,304,-1,625,933,844,144,540,237,238,-1,625,-1,-1,37,297,164,309,-1,309,-1,483,-1,322,322,322,322,859,916,392,916,330,328,470,470,806,363,-1,300,301,297,340,340,593,392,-1,392,392,-1,371,-1,369,-1,237,238,-1,237,238,234,-1,354,-1,237,238,237,238,237,238,237,238,237,238,625,-1,-1,-1,83,-1,-1,-1,483,297,304,164,382,369,-1,483,605,394,-1,719,720,391,392,-1,-1,-1,600,-1,517,515,392,-1,309,-1,-1,-1,-1,309,-1,483,540,-1,-1,857,-1,-1,-1,-1,401,-1,-1,909,-1,-1,357,-1,-1,540,-1,161,369,-1,-1,-1,-1,-1,322,-1,-1,-1,-1,-1,369,-1,-1,392,447,447,447,447,451,193,221,-1,-1,-1,-1,-1,517,-1,-1,-1,916,-1,-1,-1,-1,-1,773,720,-1,-1,-1,-1,-1,-1,602,-1,-1,-1,-1,-1,-1,-1,-1,490,338,339,483,490,83,89,-1,153,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,309,-1,873,-1,-1,-1,-1,516,732,-1,-1,-1,153,-1,6,-1,193,193,392,145,342,483,873,-1,-1,-1,269,369,-1,-1,-1,-1,604,916,164,-1,625,164,-1,-1,550,-1,-1,550,83,-1,-1,357,-1,365,-1,857,392,562,392,-1,305,-1,83,89,-1,392,569,569,-1,464,402,77,600,-1,-1,-1,11,-1,585,585,587,-1,587,585,587,585,-1,-1,591,-1,-1,-1,-1,599,-1,515,515,602,-1,483,-1,-1,-1,515,164,164,-1,-1,-1,28,341,-1,764,-1,732,-1,764,-1,764,764,625,618,764,-1,764,354,-1,600,363,-1,551,551,551,551,551,551,-1,221,83,89,-1,83,83,89,-1,-1,-1,62,-1,654,540,184,78,-1,-1,909,-1,625,665,-1,-1,84,665,699,716,671,668,668,668,668,668,671,668,716,677,677,677,677,677,677,677,677,716,686,687,686,686,686,686,686,693,687,686,686,686,716,716,700,700,686,686,686,699,670,701,686,686,671,686,686,686,686,732,-1,-1,-1,-1,-1,515,-1,859,-1,605,184,184,-1,83,-1,-1,-1,-1,-1,271,654,-1,511,-1,369,-1,164,-1,-1,-1,-1,-1,-1,392,234,-1,-1,164,625,-1,-1,-1,718,759,-1,-1,392,615,-1,786,-1,83,89,-1,806,-1,392,-1,-1,625,-1,625,786,309,-1,164,625,787,-1,600,304,-1,-1,-1,-1,184,369,-1,83,83,89,-1,-1,-1,802,600,-1,866,811,-1,805,824,808,-1,600,801,812,-1,401,822,822,822,818,822,820,814,822,811,801,825,801,805,831,388,802,401,830,805,824,835,-1,256,718,720,839,161,269,392,859,861,861,-1,-1,593,-1,-1,-1,855,-1,-1,-1,-1,773,773,844,354,-1,593,-1,401,382,540,-1,-1,367,-1,599,11,-1,665,665,-1,34,-1,-1,-1,-1,-1,392,885,-1,593,589,-1,-1,-1,-1,-1,-1,895,895,-1,-1,-1,-1,-1,-1,483,-1,-1,-1,-1,-1,-1,-1,164,-1,-1,-1,720,759,-1,309,-1,-1,297,304,-1,540,77,-1,-1,309,-1,526,516,932,540,-1,-1,-1,309,-1,-1,354,-1,-1,392,-1,916,-1,464,946,229,-1,297,-1,-1,-1,83,956,89,-1,-1,-1,369,-1,483,83,625,-1,-1,625,933,-1,-1,164,-1,973,973,-1,540,401};
boost::optional<Type::Enum> Type::Parent(Enum v){
const int p = parent_map[static_cast<int>(v)];
if (p >= 0) {
return static_cast<Type::Enum>(p);
} else {
return boost::none;
}
}
bool Type::IsSimple(Enum v) {
File diff suppressed because one or more lines are too long
+14 -2
View File
@@ -4952,7 +4952,13 @@ std::pair<Type::Enum, unsigned> Type::GetInverseAttribute(Enum t, const std::str
return jt->second;
}
}
if ((t = Parent(t)) == -1) break;
boost::optional<Enum> pt = Parent(t);
if (pt) {
t = *pt;
}
else {
break;
}
}
throw IfcException("Attribute not found");
}
@@ -4971,7 +4977,13 @@ std::set<std::string> Type::GetInverseAttributeNames(Enum t) {
return_value.insert(jt->first);
}
}
if ((t = Parent(t)) == -1) break;
boost::optional<Enum> pt = Parent(t);
if (pt) {
t = *pt;
}
else {
break;
}
}
return return_value;
+8 -710
View File
@@ -2109,716 +2109,14 @@ Type::Enum Type::FromString(const std::string& s) {
else return it->second;
}
Type::Enum Type::Parent(Enum v){
if (v < 0 || v >= 1157) return (Enum)-1;
if(v==IfcActionRequest ) { return IfcControl; }
if(v==IfcActor ) { return IfcObject; }
if(v==IfcActuator ) { return IfcDistributionControlElement; }
if(v==IfcActuatorType ) { return IfcDistributionControlElementType; }
if(v==IfcAdvancedBrep ) { return IfcManifoldSolidBrep; }
if(v==IfcAdvancedBrepWithVoids ) { return IfcAdvancedBrep; }
if(v==IfcAdvancedFace ) { return IfcFaceSurface; }
if(v==IfcAirTerminal ) { return IfcFlowTerminal; }
if(v==IfcAirTerminalBox ) { return IfcFlowController; }
if(v==IfcAirTerminalBoxType ) { return IfcFlowControllerType; }
if(v==IfcAirTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcAirToAirHeatRecovery ) { return IfcEnergyConversionDevice; }
if(v==IfcAirToAirHeatRecoveryType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcAlarm ) { return IfcDistributionControlElement; }
if(v==IfcAlarmType ) { return IfcDistributionControlElementType; }
if(v==IfcAnnotation ) { return IfcProduct; }
if(v==IfcAnnotationFillArea ) { return IfcGeometricRepresentationItem; }
if(v==IfcApprovalRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcArbitraryClosedProfileDef ) { return IfcProfileDef; }
if(v==IfcArbitraryOpenProfileDef ) { return IfcProfileDef; }
if(v==IfcArbitraryProfileDefWithVoids ) { return IfcArbitraryClosedProfileDef; }
if(v==IfcAsset ) { return IfcGroup; }
if(v==IfcAsymmetricIShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcAudioVisualAppliance ) { return IfcFlowTerminal; }
if(v==IfcAudioVisualApplianceType ) { return IfcFlowTerminalType; }
if(v==IfcAxis1Placement ) { return IfcPlacement; }
if(v==IfcAxis2Placement2D ) { return IfcPlacement; }
if(v==IfcAxis2Placement3D ) { return IfcPlacement; }
if(v==IfcBSplineCurve ) { return IfcBoundedCurve; }
if(v==IfcBSplineCurveWithKnots ) { return IfcBSplineCurve; }
if(v==IfcBSplineSurface ) { return IfcBoundedSurface; }
if(v==IfcBSplineSurfaceWithKnots ) { return IfcBSplineSurface; }
if(v==IfcBeam ) { return IfcBuildingElement; }
if(v==IfcBeamStandardCase ) { return IfcBeam; }
if(v==IfcBeamType ) { return IfcBuildingElementType; }
if(v==IfcBlobTexture ) { return IfcSurfaceTexture; }
if(v==IfcBlock ) { return IfcCsgPrimitive3D; }
if(v==IfcBoiler ) { return IfcEnergyConversionDevice; }
if(v==IfcBoilerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcBooleanClippingResult ) { return IfcBooleanResult; }
if(v==IfcBooleanResult ) { return IfcGeometricRepresentationItem; }
if(v==IfcBoundaryCurve ) { return IfcCompositeCurveOnSurface; }
if(v==IfcBoundaryEdgeCondition ) { return IfcBoundaryCondition; }
if(v==IfcBoundaryFaceCondition ) { return IfcBoundaryCondition; }
if(v==IfcBoundaryNodeCondition ) { return IfcBoundaryCondition; }
if(v==IfcBoundaryNodeConditionWarping ) { return IfcBoundaryNodeCondition; }
if(v==IfcBoundedCurve ) { return IfcCurve; }
if(v==IfcBoundedSurface ) { return IfcSurface; }
if(v==IfcBoundingBox ) { return IfcGeometricRepresentationItem; }
if(v==IfcBoxedHalfSpace ) { return IfcHalfSpaceSolid; }
if(v==IfcBuilding ) { return IfcSpatialStructureElement; }
if(v==IfcBuildingElement ) { return IfcElement; }
if(v==IfcBuildingElementPart ) { return IfcElementComponent; }
if(v==IfcBuildingElementPartType ) { return IfcElementComponentType; }
if(v==IfcBuildingElementProxy ) { return IfcBuildingElement; }
if(v==IfcBuildingElementProxyType ) { return IfcBuildingElementType; }
if(v==IfcBuildingElementType ) { return IfcElementType; }
if(v==IfcBuildingStorey ) { return IfcSpatialStructureElement; }
if(v==IfcBuildingSystem ) { return IfcSystem; }
if(v==IfcBurner ) { return IfcEnergyConversionDevice; }
if(v==IfcBurnerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcCShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcCableCarrierFitting ) { return IfcFlowFitting; }
if(v==IfcCableCarrierFittingType ) { return IfcFlowFittingType; }
if(v==IfcCableCarrierSegment ) { return IfcFlowSegment; }
if(v==IfcCableCarrierSegmentType ) { return IfcFlowSegmentType; }
if(v==IfcCableFitting ) { return IfcFlowFitting; }
if(v==IfcCableFittingType ) { return IfcFlowFittingType; }
if(v==IfcCableSegment ) { return IfcFlowSegment; }
if(v==IfcCableSegmentType ) { return IfcFlowSegmentType; }
if(v==IfcCartesianPoint ) { return IfcPoint; }
if(v==IfcCartesianPointList ) { return IfcGeometricRepresentationItem; }
if(v==IfcCartesianPointList3D ) { return IfcCartesianPointList; }
if(v==IfcCartesianTransformationOperator ) { return IfcGeometricRepresentationItem; }
if(v==IfcCartesianTransformationOperator2D ) { return IfcCartesianTransformationOperator; }
if(v==IfcCartesianTransformationOperator2DnonUniform ) { return IfcCartesianTransformationOperator2D; }
if(v==IfcCartesianTransformationOperator3D ) { return IfcCartesianTransformationOperator; }
if(v==IfcCartesianTransformationOperator3DnonUniform ) { return IfcCartesianTransformationOperator3D; }
if(v==IfcCenterLineProfileDef ) { return IfcArbitraryOpenProfileDef; }
if(v==IfcChiller ) { return IfcEnergyConversionDevice; }
if(v==IfcChillerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcChimney ) { return IfcBuildingElement; }
if(v==IfcChimneyType ) { return IfcBuildingElementType; }
if(v==IfcCircle ) { return IfcConic; }
if(v==IfcCircleHollowProfileDef ) { return IfcCircleProfileDef; }
if(v==IfcCircleProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcCivilElement ) { return IfcElement; }
if(v==IfcCivilElementType ) { return IfcElementType; }
if(v==IfcClassification ) { return IfcExternalInformation; }
if(v==IfcClassificationReference ) { return IfcExternalReference; }
if(v==IfcClosedShell ) { return IfcConnectedFaceSet; }
if(v==IfcCoil ) { return IfcEnergyConversionDevice; }
if(v==IfcCoilType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcColourRgb ) { return IfcColourSpecification; }
if(v==IfcColourRgbList ) { return IfcPresentationItem; }
if(v==IfcColourSpecification ) { return IfcPresentationItem; }
if(v==IfcColumn ) { return IfcBuildingElement; }
if(v==IfcColumnStandardCase ) { return IfcColumn; }
if(v==IfcColumnType ) { return IfcBuildingElementType; }
if(v==IfcCommunicationsAppliance ) { return IfcFlowTerminal; }
if(v==IfcCommunicationsApplianceType ) { return IfcFlowTerminalType; }
if(v==IfcComplexProperty ) { return IfcProperty; }
if(v==IfcComplexPropertyTemplate ) { return IfcPropertyTemplate; }
if(v==IfcCompositeCurve ) { return IfcBoundedCurve; }
if(v==IfcCompositeCurveOnSurface ) { return IfcCompositeCurve; }
if(v==IfcCompositeCurveSegment ) { return IfcGeometricRepresentationItem; }
if(v==IfcCompositeProfileDef ) { return IfcProfileDef; }
if(v==IfcCompressor ) { return IfcFlowMovingDevice; }
if(v==IfcCompressorType ) { return IfcFlowMovingDeviceType; }
if(v==IfcCondenser ) { return IfcEnergyConversionDevice; }
if(v==IfcCondenserType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcConic ) { return IfcCurve; }
if(v==IfcConnectedFaceSet ) { return IfcTopologicalRepresentationItem; }
if(v==IfcConnectionCurveGeometry ) { return IfcConnectionGeometry; }
if(v==IfcConnectionPointEccentricity ) { return IfcConnectionPointGeometry; }
if(v==IfcConnectionPointGeometry ) { return IfcConnectionGeometry; }
if(v==IfcConnectionSurfaceGeometry ) { return IfcConnectionGeometry; }
if(v==IfcConnectionVolumeGeometry ) { return IfcConnectionGeometry; }
if(v==IfcConstructionEquipmentResource ) { return IfcConstructionResource; }
if(v==IfcConstructionEquipmentResourceType ) { return IfcConstructionResourceType; }
if(v==IfcConstructionMaterialResource ) { return IfcConstructionResource; }
if(v==IfcConstructionMaterialResourceType ) { return IfcConstructionResourceType; }
if(v==IfcConstructionProductResource ) { return IfcConstructionResource; }
if(v==IfcConstructionProductResourceType ) { return IfcConstructionResourceType; }
if(v==IfcConstructionResource ) { return IfcResource; }
if(v==IfcConstructionResourceType ) { return IfcTypeResource; }
if(v==IfcContext ) { return IfcObjectDefinition; }
if(v==IfcContextDependentUnit ) { return IfcNamedUnit; }
if(v==IfcControl ) { return IfcObject; }
if(v==IfcController ) { return IfcDistributionControlElement; }
if(v==IfcControllerType ) { return IfcDistributionControlElementType; }
if(v==IfcConversionBasedUnit ) { return IfcNamedUnit; }
if(v==IfcConversionBasedUnitWithOffset ) { return IfcConversionBasedUnit; }
if(v==IfcCooledBeam ) { return IfcEnergyConversionDevice; }
if(v==IfcCooledBeamType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcCoolingTower ) { return IfcEnergyConversionDevice; }
if(v==IfcCoolingTowerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcCostItem ) { return IfcControl; }
if(v==IfcCostSchedule ) { return IfcControl; }
if(v==IfcCostValue ) { return IfcAppliedValue; }
if(v==IfcCovering ) { return IfcBuildingElement; }
if(v==IfcCoveringType ) { return IfcBuildingElementType; }
if(v==IfcCrewResource ) { return IfcConstructionResource; }
if(v==IfcCrewResourceType ) { return IfcConstructionResourceType; }
if(v==IfcCsgPrimitive3D ) { return IfcGeometricRepresentationItem; }
if(v==IfcCsgSolid ) { return IfcSolidModel; }
if(v==IfcCurrencyRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcCurtainWall ) { return IfcBuildingElement; }
if(v==IfcCurtainWallType ) { return IfcBuildingElementType; }
if(v==IfcCurve ) { return IfcGeometricRepresentationItem; }
if(v==IfcCurveBoundedPlane ) { return IfcBoundedSurface; }
if(v==IfcCurveBoundedSurface ) { return IfcBoundedSurface; }
if(v==IfcCurveStyle ) { return IfcPresentationStyle; }
if(v==IfcCurveStyleFont ) { return IfcPresentationItem; }
if(v==IfcCurveStyleFontAndScaling ) { return IfcPresentationItem; }
if(v==IfcCurveStyleFontPattern ) { return IfcPresentationItem; }
if(v==IfcCylindricalSurface ) { return IfcElementarySurface; }
if(v==IfcDamper ) { return IfcFlowController; }
if(v==IfcDamperType ) { return IfcFlowControllerType; }
if(v==IfcDerivedProfileDef ) { return IfcProfileDef; }
if(v==IfcDirection ) { return IfcGeometricRepresentationItem; }
if(v==IfcDiscreteAccessory ) { return IfcElementComponent; }
if(v==IfcDiscreteAccessoryType ) { return IfcElementComponentType; }
if(v==IfcDistributionChamberElement ) { return IfcDistributionFlowElement; }
if(v==IfcDistributionChamberElementType ) { return IfcDistributionFlowElementType; }
if(v==IfcDistributionCircuit ) { return IfcDistributionSystem; }
if(v==IfcDistributionControlElement ) { return IfcDistributionElement; }
if(v==IfcDistributionControlElementType ) { return IfcDistributionElementType; }
if(v==IfcDistributionElement ) { return IfcElement; }
if(v==IfcDistributionElementType ) { return IfcElementType; }
if(v==IfcDistributionFlowElement ) { return IfcDistributionElement; }
if(v==IfcDistributionFlowElementType ) { return IfcDistributionElementType; }
if(v==IfcDistributionPort ) { return IfcPort; }
if(v==IfcDistributionSystem ) { return IfcSystem; }
if(v==IfcDocumentInformation ) { return IfcExternalInformation; }
if(v==IfcDocumentInformationRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcDocumentReference ) { return IfcExternalReference; }
if(v==IfcDoor ) { return IfcBuildingElement; }
if(v==IfcDoorLiningProperties ) { return IfcPreDefinedPropertySet; }
if(v==IfcDoorPanelProperties ) { return IfcPreDefinedPropertySet; }
if(v==IfcDoorStandardCase ) { return IfcDoor; }
if(v==IfcDoorStyle ) { return IfcTypeProduct; }
if(v==IfcDoorType ) { return IfcBuildingElementType; }
if(v==IfcDraughtingPreDefinedColour ) { return IfcPreDefinedColour; }
if(v==IfcDraughtingPreDefinedCurveFont ) { return IfcPreDefinedCurveFont; }
if(v==IfcDuctFitting ) { return IfcFlowFitting; }
if(v==IfcDuctFittingType ) { return IfcFlowFittingType; }
if(v==IfcDuctSegment ) { return IfcFlowSegment; }
if(v==IfcDuctSegmentType ) { return IfcFlowSegmentType; }
if(v==IfcDuctSilencer ) { return IfcFlowTreatmentDevice; }
if(v==IfcDuctSilencerType ) { return IfcFlowTreatmentDeviceType; }
if(v==IfcEdge ) { return IfcTopologicalRepresentationItem; }
if(v==IfcEdgeCurve ) { return IfcEdge; }
if(v==IfcEdgeLoop ) { return IfcLoop; }
if(v==IfcElectricAppliance ) { return IfcFlowTerminal; }
if(v==IfcElectricApplianceType ) { return IfcFlowTerminalType; }
if(v==IfcElectricDistributionBoard ) { return IfcFlowController; }
if(v==IfcElectricDistributionBoardType ) { return IfcFlowControllerType; }
if(v==IfcElectricFlowStorageDevice ) { return IfcFlowStorageDevice; }
if(v==IfcElectricFlowStorageDeviceType ) { return IfcFlowStorageDeviceType; }
if(v==IfcElectricGenerator ) { return IfcEnergyConversionDevice; }
if(v==IfcElectricGeneratorType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcElectricMotor ) { return IfcEnergyConversionDevice; }
if(v==IfcElectricMotorType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcElectricTimeControl ) { return IfcFlowController; }
if(v==IfcElectricTimeControlType ) { return IfcFlowControllerType; }
if(v==IfcElement ) { return IfcProduct; }
if(v==IfcElementAssembly ) { return IfcElement; }
if(v==IfcElementAssemblyType ) { return IfcElementType; }
if(v==IfcElementComponent ) { return IfcElement; }
if(v==IfcElementComponentType ) { return IfcElementType; }
if(v==IfcElementQuantity ) { return IfcQuantitySet; }
if(v==IfcElementType ) { return IfcTypeProduct; }
if(v==IfcElementarySurface ) { return IfcSurface; }
if(v==IfcEllipse ) { return IfcConic; }
if(v==IfcEllipseProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcEnergyConversionDevice ) { return IfcDistributionFlowElement; }
if(v==IfcEnergyConversionDeviceType ) { return IfcDistributionFlowElementType; }
if(v==IfcEngine ) { return IfcEnergyConversionDevice; }
if(v==IfcEngineType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcEvaporativeCooler ) { return IfcEnergyConversionDevice; }
if(v==IfcEvaporativeCoolerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcEvaporator ) { return IfcEnergyConversionDevice; }
if(v==IfcEvaporatorType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcEvent ) { return IfcProcess; }
if(v==IfcEventTime ) { return IfcSchedulingTime; }
if(v==IfcEventType ) { return IfcTypeProcess; }
if(v==IfcExtendedProperties ) { return IfcPropertyAbstraction; }
if(v==IfcExternalReferenceRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcExternalSpatialElement ) { return IfcExternalSpatialStructureElement; }
if(v==IfcExternalSpatialStructureElement ) { return IfcSpatialElement; }
if(v==IfcExternallyDefinedHatchStyle ) { return IfcExternalReference; }
if(v==IfcExternallyDefinedSurfaceStyle ) { return IfcExternalReference; }
if(v==IfcExternallyDefinedTextFont ) { return IfcExternalReference; }
if(v==IfcExtrudedAreaSolid ) { return IfcSweptAreaSolid; }
if(v==IfcExtrudedAreaSolidTapered ) { return IfcExtrudedAreaSolid; }
if(v==IfcFace ) { return IfcTopologicalRepresentationItem; }
if(v==IfcFaceBasedSurfaceModel ) { return IfcGeometricRepresentationItem; }
if(v==IfcFaceBound ) { return IfcTopologicalRepresentationItem; }
if(v==IfcFaceOuterBound ) { return IfcFaceBound; }
if(v==IfcFaceSurface ) { return IfcFace; }
if(v==IfcFacetedBrep ) { return IfcManifoldSolidBrep; }
if(v==IfcFacetedBrepWithVoids ) { return IfcFacetedBrep; }
if(v==IfcFailureConnectionCondition ) { return IfcStructuralConnectionCondition; }
if(v==IfcFan ) { return IfcFlowMovingDevice; }
if(v==IfcFanType ) { return IfcFlowMovingDeviceType; }
if(v==IfcFastener ) { return IfcElementComponent; }
if(v==IfcFastenerType ) { return IfcElementComponentType; }
if(v==IfcFeatureElement ) { return IfcElement; }
if(v==IfcFeatureElementAddition ) { return IfcFeatureElement; }
if(v==IfcFeatureElementSubtraction ) { return IfcFeatureElement; }
if(v==IfcFillAreaStyle ) { return IfcPresentationStyle; }
if(v==IfcFillAreaStyleHatching ) { return IfcGeometricRepresentationItem; }
if(v==IfcFillAreaStyleTiles ) { return IfcGeometricRepresentationItem; }
if(v==IfcFilter ) { return IfcFlowTreatmentDevice; }
if(v==IfcFilterType ) { return IfcFlowTreatmentDeviceType; }
if(v==IfcFireSuppressionTerminal ) { return IfcFlowTerminal; }
if(v==IfcFireSuppressionTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcFixedReferenceSweptAreaSolid ) { return IfcSweptAreaSolid; }
if(v==IfcFlowController ) { return IfcDistributionFlowElement; }
if(v==IfcFlowControllerType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowFitting ) { return IfcDistributionFlowElement; }
if(v==IfcFlowFittingType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowInstrument ) { return IfcDistributionControlElement; }
if(v==IfcFlowInstrumentType ) { return IfcDistributionControlElementType; }
if(v==IfcFlowMeter ) { return IfcFlowController; }
if(v==IfcFlowMeterType ) { return IfcFlowControllerType; }
if(v==IfcFlowMovingDevice ) { return IfcDistributionFlowElement; }
if(v==IfcFlowMovingDeviceType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowSegment ) { return IfcDistributionFlowElement; }
if(v==IfcFlowSegmentType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowStorageDevice ) { return IfcDistributionFlowElement; }
if(v==IfcFlowStorageDeviceType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowTerminal ) { return IfcDistributionFlowElement; }
if(v==IfcFlowTerminalType ) { return IfcDistributionFlowElementType; }
if(v==IfcFlowTreatmentDevice ) { return IfcDistributionFlowElement; }
if(v==IfcFlowTreatmentDeviceType ) { return IfcDistributionFlowElementType; }
if(v==IfcFooting ) { return IfcBuildingElement; }
if(v==IfcFootingType ) { return IfcBuildingElementType; }
if(v==IfcFurnishingElement ) { return IfcElement; }
if(v==IfcFurnishingElementType ) { return IfcElementType; }
if(v==IfcFurniture ) { return IfcFurnishingElement; }
if(v==IfcFurnitureType ) { return IfcFurnishingElementType; }
if(v==IfcGeographicElement ) { return IfcElement; }
if(v==IfcGeographicElementType ) { return IfcElementType; }
if(v==IfcGeometricCurveSet ) { return IfcGeometricSet; }
if(v==IfcGeometricRepresentationContext ) { return IfcRepresentationContext; }
if(v==IfcGeometricRepresentationItem ) { return IfcRepresentationItem; }
if(v==IfcGeometricRepresentationSubContext ) { return IfcGeometricRepresentationContext; }
if(v==IfcGeometricSet ) { return IfcGeometricRepresentationItem; }
if(v==IfcGrid ) { return IfcProduct; }
if(v==IfcGridPlacement ) { return IfcObjectPlacement; }
if(v==IfcGroup ) { return IfcObject; }
if(v==IfcHalfSpaceSolid ) { return IfcGeometricRepresentationItem; }
if(v==IfcHeatExchanger ) { return IfcEnergyConversionDevice; }
if(v==IfcHeatExchangerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcHumidifier ) { return IfcEnergyConversionDevice; }
if(v==IfcHumidifierType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcIShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcImageTexture ) { return IfcSurfaceTexture; }
if(v==IfcIndexedColourMap ) { return IfcPresentationItem; }
if(v==IfcIndexedTextureMap ) { return IfcTextureCoordinate; }
if(v==IfcIndexedTriangleTextureMap ) { return IfcIndexedTextureMap; }
if(v==IfcInterceptor ) { return IfcFlowTreatmentDevice; }
if(v==IfcInterceptorType ) { return IfcFlowTreatmentDeviceType; }
if(v==IfcInventory ) { return IfcGroup; }
if(v==IfcIrregularTimeSeries ) { return IfcTimeSeries; }
if(v==IfcJunctionBox ) { return IfcFlowFitting; }
if(v==IfcJunctionBoxType ) { return IfcFlowFittingType; }
if(v==IfcLShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcLaborResource ) { return IfcConstructionResource; }
if(v==IfcLaborResourceType ) { return IfcConstructionResourceType; }
if(v==IfcLagTime ) { return IfcSchedulingTime; }
if(v==IfcLamp ) { return IfcFlowTerminal; }
if(v==IfcLampType ) { return IfcFlowTerminalType; }
if(v==IfcLibraryInformation ) { return IfcExternalInformation; }
if(v==IfcLibraryReference ) { return IfcExternalReference; }
if(v==IfcLightFixture ) { return IfcFlowTerminal; }
if(v==IfcLightFixtureType ) { return IfcFlowTerminalType; }
if(v==IfcLightSource ) { return IfcGeometricRepresentationItem; }
if(v==IfcLightSourceAmbient ) { return IfcLightSource; }
if(v==IfcLightSourceDirectional ) { return IfcLightSource; }
if(v==IfcLightSourceGoniometric ) { return IfcLightSource; }
if(v==IfcLightSourcePositional ) { return IfcLightSource; }
if(v==IfcLightSourceSpot ) { return IfcLightSourcePositional; }
if(v==IfcLine ) { return IfcCurve; }
if(v==IfcLocalPlacement ) { return IfcObjectPlacement; }
if(v==IfcLoop ) { return IfcTopologicalRepresentationItem; }
if(v==IfcManifoldSolidBrep ) { return IfcSolidModel; }
if(v==IfcMapConversion ) { return IfcCoordinateOperation; }
if(v==IfcMappedItem ) { return IfcRepresentationItem; }
if(v==IfcMaterial ) { return IfcMaterialDefinition; }
if(v==IfcMaterialConstituent ) { return IfcMaterialDefinition; }
if(v==IfcMaterialConstituentSet ) { return IfcMaterialDefinition; }
if(v==IfcMaterialDefinitionRepresentation ) { return IfcProductRepresentation; }
if(v==IfcMaterialLayer ) { return IfcMaterialDefinition; }
if(v==IfcMaterialLayerSet ) { return IfcMaterialDefinition; }
if(v==IfcMaterialLayerSetUsage ) { return IfcMaterialUsageDefinition; }
if(v==IfcMaterialLayerWithOffsets ) { return IfcMaterialLayer; }
if(v==IfcMaterialProfile ) { return IfcMaterialDefinition; }
if(v==IfcMaterialProfileSet ) { return IfcMaterialDefinition; }
if(v==IfcMaterialProfileSetUsage ) { return IfcMaterialUsageDefinition; }
if(v==IfcMaterialProfileSetUsageTapering ) { return IfcMaterialProfileSetUsage; }
if(v==IfcMaterialProfileWithOffsets ) { return IfcMaterialProfile; }
if(v==IfcMaterialProperties ) { return IfcExtendedProperties; }
if(v==IfcMaterialRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcMechanicalFastener ) { return IfcElementComponent; }
if(v==IfcMechanicalFastenerType ) { return IfcElementComponentType; }
if(v==IfcMedicalDevice ) { return IfcFlowTerminal; }
if(v==IfcMedicalDeviceType ) { return IfcFlowTerminalType; }
if(v==IfcMember ) { return IfcBuildingElement; }
if(v==IfcMemberStandardCase ) { return IfcMember; }
if(v==IfcMemberType ) { return IfcBuildingElementType; }
if(v==IfcMetric ) { return IfcConstraint; }
if(v==IfcMirroredProfileDef ) { return IfcDerivedProfileDef; }
if(v==IfcMotorConnection ) { return IfcEnergyConversionDevice; }
if(v==IfcMotorConnectionType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcObject ) { return IfcObjectDefinition; }
if(v==IfcObjectDefinition ) { return IfcRoot; }
if(v==IfcObjective ) { return IfcConstraint; }
if(v==IfcOccupant ) { return IfcActor; }
if(v==IfcOffsetCurve2D ) { return IfcCurve; }
if(v==IfcOffsetCurve3D ) { return IfcCurve; }
if(v==IfcOpenShell ) { return IfcConnectedFaceSet; }
if(v==IfcOpeningElement ) { return IfcFeatureElementSubtraction; }
if(v==IfcOpeningStandardCase ) { return IfcOpeningElement; }
if(v==IfcOrganizationRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcOrientedEdge ) { return IfcEdge; }
if(v==IfcOuterBoundaryCurve ) { return IfcBoundaryCurve; }
if(v==IfcOutlet ) { return IfcFlowTerminal; }
if(v==IfcOutletType ) { return IfcFlowTerminalType; }
if(v==IfcParameterizedProfileDef ) { return IfcProfileDef; }
if(v==IfcPath ) { return IfcTopologicalRepresentationItem; }
if(v==IfcPcurve ) { return IfcCurve; }
if(v==IfcPerformanceHistory ) { return IfcControl; }
if(v==IfcPermeableCoveringProperties ) { return IfcPreDefinedPropertySet; }
if(v==IfcPermit ) { return IfcControl; }
if(v==IfcPhysicalComplexQuantity ) { return IfcPhysicalQuantity; }
if(v==IfcPhysicalSimpleQuantity ) { return IfcPhysicalQuantity; }
if(v==IfcPile ) { return IfcBuildingElement; }
if(v==IfcPileType ) { return IfcBuildingElementType; }
if(v==IfcPipeFitting ) { return IfcFlowFitting; }
if(v==IfcPipeFittingType ) { return IfcFlowFittingType; }
if(v==IfcPipeSegment ) { return IfcFlowSegment; }
if(v==IfcPipeSegmentType ) { return IfcFlowSegmentType; }
if(v==IfcPixelTexture ) { return IfcSurfaceTexture; }
if(v==IfcPlacement ) { return IfcGeometricRepresentationItem; }
if(v==IfcPlanarBox ) { return IfcPlanarExtent; }
if(v==IfcPlanarExtent ) { return IfcGeometricRepresentationItem; }
if(v==IfcPlane ) { return IfcElementarySurface; }
if(v==IfcPlate ) { return IfcBuildingElement; }
if(v==IfcPlateStandardCase ) { return IfcPlate; }
if(v==IfcPlateType ) { return IfcBuildingElementType; }
if(v==IfcPoint ) { return IfcGeometricRepresentationItem; }
if(v==IfcPointOnCurve ) { return IfcPoint; }
if(v==IfcPointOnSurface ) { return IfcPoint; }
if(v==IfcPolyLoop ) { return IfcLoop; }
if(v==IfcPolygonalBoundedHalfSpace ) { return IfcHalfSpaceSolid; }
if(v==IfcPolyline ) { return IfcBoundedCurve; }
if(v==IfcPort ) { return IfcProduct; }
if(v==IfcPostalAddress ) { return IfcAddress; }
if(v==IfcPreDefinedColour ) { return IfcPreDefinedItem; }
if(v==IfcPreDefinedCurveFont ) { return IfcPreDefinedItem; }
if(v==IfcPreDefinedItem ) { return IfcPresentationItem; }
if(v==IfcPreDefinedProperties ) { return IfcPropertyAbstraction; }
if(v==IfcPreDefinedPropertySet ) { return IfcPropertySetDefinition; }
if(v==IfcPreDefinedTextFont ) { return IfcPreDefinedItem; }
if(v==IfcPresentationLayerWithStyle ) { return IfcPresentationLayerAssignment; }
if(v==IfcProcedure ) { return IfcProcess; }
if(v==IfcProcedureType ) { return IfcTypeProcess; }
if(v==IfcProcess ) { return IfcObject; }
if(v==IfcProduct ) { return IfcObject; }
if(v==IfcProductDefinitionShape ) { return IfcProductRepresentation; }
if(v==IfcProfileProperties ) { return IfcExtendedProperties; }
if(v==IfcProject ) { return IfcContext; }
if(v==IfcProjectLibrary ) { return IfcContext; }
if(v==IfcProjectOrder ) { return IfcControl; }
if(v==IfcProjectedCRS ) { return IfcCoordinateReferenceSystem; }
if(v==IfcProjectionElement ) { return IfcFeatureElementAddition; }
if(v==IfcProperty ) { return IfcPropertyAbstraction; }
if(v==IfcPropertyBoundedValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyDefinition ) { return IfcRoot; }
if(v==IfcPropertyDependencyRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcPropertyEnumeratedValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyEnumeration ) { return IfcPropertyAbstraction; }
if(v==IfcPropertyListValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyReferenceValue ) { return IfcSimpleProperty; }
if(v==IfcPropertySet ) { return IfcPropertySetDefinition; }
if(v==IfcPropertySetDefinition ) { return IfcPropertyDefinition; }
if(v==IfcPropertySetTemplate ) { return IfcPropertyTemplateDefinition; }
if(v==IfcPropertySingleValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyTableValue ) { return IfcSimpleProperty; }
if(v==IfcPropertyTemplate ) { return IfcPropertyTemplateDefinition; }
if(v==IfcPropertyTemplateDefinition ) { return IfcPropertyDefinition; }
if(v==IfcProtectiveDevice ) { return IfcFlowController; }
if(v==IfcProtectiveDeviceTrippingUnit ) { return IfcDistributionControlElement; }
if(v==IfcProtectiveDeviceTrippingUnitType ) { return IfcDistributionControlElementType; }
if(v==IfcProtectiveDeviceType ) { return IfcFlowControllerType; }
if(v==IfcProxy ) { return IfcProduct; }
if(v==IfcPump ) { return IfcFlowMovingDevice; }
if(v==IfcPumpType ) { return IfcFlowMovingDeviceType; }
if(v==IfcQuantityArea ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityCount ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityLength ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantitySet ) { return IfcPropertySetDefinition; }
if(v==IfcQuantityTime ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityVolume ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcQuantityWeight ) { return IfcPhysicalSimpleQuantity; }
if(v==IfcRailing ) { return IfcBuildingElement; }
if(v==IfcRailingType ) { return IfcBuildingElementType; }
if(v==IfcRamp ) { return IfcBuildingElement; }
if(v==IfcRampFlight ) { return IfcBuildingElement; }
if(v==IfcRampFlightType ) { return IfcBuildingElementType; }
if(v==IfcRampType ) { return IfcBuildingElementType; }
if(v==IfcRationalBSplineCurveWithKnots ) { return IfcBSplineCurveWithKnots; }
if(v==IfcRationalBSplineSurfaceWithKnots ) { return IfcBSplineSurfaceWithKnots; }
if(v==IfcRectangleHollowProfileDef ) { return IfcRectangleProfileDef; }
if(v==IfcRectangleProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcRectangularPyramid ) { return IfcCsgPrimitive3D; }
if(v==IfcRectangularTrimmedSurface ) { return IfcBoundedSurface; }
if(v==IfcRegularTimeSeries ) { return IfcTimeSeries; }
if(v==IfcReinforcementBarProperties ) { return IfcPreDefinedProperties; }
if(v==IfcReinforcementDefinitionProperties ) { return IfcPreDefinedPropertySet; }
if(v==IfcReinforcingBar ) { return IfcReinforcingElement; }
if(v==IfcReinforcingBarType ) { return IfcReinforcingElementType; }
if(v==IfcReinforcingElement ) { return IfcElementComponent; }
if(v==IfcReinforcingElementType ) { return IfcElementComponentType; }
if(v==IfcReinforcingMesh ) { return IfcReinforcingElement; }
if(v==IfcReinforcingMeshType ) { return IfcReinforcingElementType; }
if(v==IfcRelAggregates ) { return IfcRelDecomposes; }
if(v==IfcRelAssigns ) { return IfcRelationship; }
if(v==IfcRelAssignsToActor ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToControl ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToGroup ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToGroupByFactor ) { return IfcRelAssignsToGroup; }
if(v==IfcRelAssignsToProcess ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToProduct ) { return IfcRelAssigns; }
if(v==IfcRelAssignsToResource ) { return IfcRelAssigns; }
if(v==IfcRelAssociates ) { return IfcRelationship; }
if(v==IfcRelAssociatesApproval ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesClassification ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesConstraint ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesDocument ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesLibrary ) { return IfcRelAssociates; }
if(v==IfcRelAssociatesMaterial ) { return IfcRelAssociates; }
if(v==IfcRelConnects ) { return IfcRelationship; }
if(v==IfcRelConnectsElements ) { return IfcRelConnects; }
if(v==IfcRelConnectsPathElements ) { return IfcRelConnectsElements; }
if(v==IfcRelConnectsPortToElement ) { return IfcRelConnects; }
if(v==IfcRelConnectsPorts ) { return IfcRelConnects; }
if(v==IfcRelConnectsStructuralActivity ) { return IfcRelConnects; }
if(v==IfcRelConnectsStructuralMember ) { return IfcRelConnects; }
if(v==IfcRelConnectsWithEccentricity ) { return IfcRelConnectsStructuralMember; }
if(v==IfcRelConnectsWithRealizingElements ) { return IfcRelConnectsElements; }
if(v==IfcRelContainedInSpatialStructure ) { return IfcRelConnects; }
if(v==IfcRelCoversBldgElements ) { return IfcRelConnects; }
if(v==IfcRelCoversSpaces ) { return IfcRelConnects; }
if(v==IfcRelDeclares ) { return IfcRelationship; }
if(v==IfcRelDecomposes ) { return IfcRelationship; }
if(v==IfcRelDefines ) { return IfcRelationship; }
if(v==IfcRelDefinesByObject ) { return IfcRelDefines; }
if(v==IfcRelDefinesByProperties ) { return IfcRelDefines; }
if(v==IfcRelDefinesByTemplate ) { return IfcRelDefines; }
if(v==IfcRelDefinesByType ) { return IfcRelDefines; }
if(v==IfcRelFillsElement ) { return IfcRelConnects; }
if(v==IfcRelFlowControlElements ) { return IfcRelConnects; }
if(v==IfcRelInterferesElements ) { return IfcRelConnects; }
if(v==IfcRelNests ) { return IfcRelDecomposes; }
if(v==IfcRelProjectsElement ) { return IfcRelDecomposes; }
if(v==IfcRelReferencedInSpatialStructure ) { return IfcRelConnects; }
if(v==IfcRelSequence ) { return IfcRelConnects; }
if(v==IfcRelServicesBuildings ) { return IfcRelConnects; }
if(v==IfcRelSpaceBoundary ) { return IfcRelConnects; }
if(v==IfcRelSpaceBoundary1stLevel ) { return IfcRelSpaceBoundary; }
if(v==IfcRelSpaceBoundary2ndLevel ) { return IfcRelSpaceBoundary1stLevel; }
if(v==IfcRelVoidsElement ) { return IfcRelDecomposes; }
if(v==IfcRelationship ) { return IfcRoot; }
if(v==IfcReparametrisedCompositeCurveSegment ) { return IfcCompositeCurveSegment; }
if(v==IfcResource ) { return IfcObject; }
if(v==IfcResourceApprovalRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcResourceConstraintRelationship ) { return IfcResourceLevelRelationship; }
if(v==IfcResourceTime ) { return IfcSchedulingTime; }
if(v==IfcRevolvedAreaSolid ) { return IfcSweptAreaSolid; }
if(v==IfcRevolvedAreaSolidTapered ) { return IfcRevolvedAreaSolid; }
if(v==IfcRightCircularCone ) { return IfcCsgPrimitive3D; }
if(v==IfcRightCircularCylinder ) { return IfcCsgPrimitive3D; }
if(v==IfcRoof ) { return IfcBuildingElement; }
if(v==IfcRoofType ) { return IfcBuildingElementType; }
if(v==IfcRoundedRectangleProfileDef ) { return IfcRectangleProfileDef; }
if(v==IfcSIUnit ) { return IfcNamedUnit; }
if(v==IfcSanitaryTerminal ) { return IfcFlowTerminal; }
if(v==IfcSanitaryTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcSectionProperties ) { return IfcPreDefinedProperties; }
if(v==IfcSectionReinforcementProperties ) { return IfcPreDefinedProperties; }
if(v==IfcSectionedSpine ) { return IfcGeometricRepresentationItem; }
if(v==IfcSensor ) { return IfcDistributionControlElement; }
if(v==IfcSensorType ) { return IfcDistributionControlElementType; }
if(v==IfcShadingDevice ) { return IfcBuildingElement; }
if(v==IfcShadingDeviceType ) { return IfcBuildingElementType; }
if(v==IfcShapeModel ) { return IfcRepresentation; }
if(v==IfcShapeRepresentation ) { return IfcShapeModel; }
if(v==IfcShellBasedSurfaceModel ) { return IfcGeometricRepresentationItem; }
if(v==IfcSimpleProperty ) { return IfcProperty; }
if(v==IfcSimplePropertyTemplate ) { return IfcPropertyTemplate; }
if(v==IfcSite ) { return IfcSpatialStructureElement; }
if(v==IfcSlab ) { return IfcBuildingElement; }
if(v==IfcSlabElementedCase ) { return IfcSlab; }
if(v==IfcSlabStandardCase ) { return IfcSlab; }
if(v==IfcSlabType ) { return IfcBuildingElementType; }
if(v==IfcSlippageConnectionCondition ) { return IfcStructuralConnectionCondition; }
if(v==IfcSolarDevice ) { return IfcEnergyConversionDevice; }
if(v==IfcSolarDeviceType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcSolidModel ) { return IfcGeometricRepresentationItem; }
if(v==IfcSpace ) { return IfcSpatialStructureElement; }
if(v==IfcSpaceHeater ) { return IfcFlowTerminal; }
if(v==IfcSpaceHeaterType ) { return IfcFlowTerminalType; }
if(v==IfcSpaceType ) { return IfcSpatialStructureElementType; }
if(v==IfcSpatialElement ) { return IfcProduct; }
if(v==IfcSpatialElementType ) { return IfcTypeProduct; }
if(v==IfcSpatialStructureElement ) { return IfcSpatialElement; }
if(v==IfcSpatialStructureElementType ) { return IfcSpatialElementType; }
if(v==IfcSpatialZone ) { return IfcSpatialElement; }
if(v==IfcSpatialZoneType ) { return IfcSpatialElementType; }
if(v==IfcSphere ) { return IfcCsgPrimitive3D; }
if(v==IfcStackTerminal ) { return IfcFlowTerminal; }
if(v==IfcStackTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcStair ) { return IfcBuildingElement; }
if(v==IfcStairFlight ) { return IfcBuildingElement; }
if(v==IfcStairFlightType ) { return IfcBuildingElementType; }
if(v==IfcStairType ) { return IfcBuildingElementType; }
if(v==IfcStructuralAction ) { return IfcStructuralActivity; }
if(v==IfcStructuralActivity ) { return IfcProduct; }
if(v==IfcStructuralAnalysisModel ) { return IfcSystem; }
if(v==IfcStructuralConnection ) { return IfcStructuralItem; }
if(v==IfcStructuralCurveAction ) { return IfcStructuralAction; }
if(v==IfcStructuralCurveConnection ) { return IfcStructuralConnection; }
if(v==IfcStructuralCurveMember ) { return IfcStructuralMember; }
if(v==IfcStructuralCurveMemberVarying ) { return IfcStructuralCurveMember; }
if(v==IfcStructuralCurveReaction ) { return IfcStructuralReaction; }
if(v==IfcStructuralItem ) { return IfcProduct; }
if(v==IfcStructuralLinearAction ) { return IfcStructuralCurveAction; }
if(v==IfcStructuralLoadCase ) { return IfcStructuralLoadGroup; }
if(v==IfcStructuralLoadConfiguration ) { return IfcStructuralLoad; }
if(v==IfcStructuralLoadGroup ) { return IfcGroup; }
if(v==IfcStructuralLoadLinearForce ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralLoadOrResult ) { return IfcStructuralLoad; }
if(v==IfcStructuralLoadPlanarForce ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralLoadSingleDisplacement ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralLoadSingleDisplacementDistortion ) { return IfcStructuralLoadSingleDisplacement; }
if(v==IfcStructuralLoadSingleForce ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralLoadSingleForceWarping ) { return IfcStructuralLoadSingleForce; }
if(v==IfcStructuralLoadStatic ) { return IfcStructuralLoadOrResult; }
if(v==IfcStructuralLoadTemperature ) { return IfcStructuralLoadStatic; }
if(v==IfcStructuralMember ) { return IfcStructuralItem; }
if(v==IfcStructuralPlanarAction ) { return IfcStructuralSurfaceAction; }
if(v==IfcStructuralPointAction ) { return IfcStructuralAction; }
if(v==IfcStructuralPointConnection ) { return IfcStructuralConnection; }
if(v==IfcStructuralPointReaction ) { return IfcStructuralReaction; }
if(v==IfcStructuralReaction ) { return IfcStructuralActivity; }
if(v==IfcStructuralResultGroup ) { return IfcGroup; }
if(v==IfcStructuralSurfaceAction ) { return IfcStructuralAction; }
if(v==IfcStructuralSurfaceConnection ) { return IfcStructuralConnection; }
if(v==IfcStructuralSurfaceMember ) { return IfcStructuralMember; }
if(v==IfcStructuralSurfaceMemberVarying ) { return IfcStructuralSurfaceMember; }
if(v==IfcStructuralSurfaceReaction ) { return IfcStructuralReaction; }
if(v==IfcStyleModel ) { return IfcRepresentation; }
if(v==IfcStyledItem ) { return IfcRepresentationItem; }
if(v==IfcStyledRepresentation ) { return IfcStyleModel; }
if(v==IfcSubContractResource ) { return IfcConstructionResource; }
if(v==IfcSubContractResourceType ) { return IfcConstructionResourceType; }
if(v==IfcSubedge ) { return IfcEdge; }
if(v==IfcSurface ) { return IfcGeometricRepresentationItem; }
if(v==IfcSurfaceCurveSweptAreaSolid ) { return IfcSweptAreaSolid; }
if(v==IfcSurfaceFeature ) { return IfcFeatureElement; }
if(v==IfcSurfaceOfLinearExtrusion ) { return IfcSweptSurface; }
if(v==IfcSurfaceOfRevolution ) { return IfcSweptSurface; }
if(v==IfcSurfaceReinforcementArea ) { return IfcStructuralLoadOrResult; }
if(v==IfcSurfaceStyle ) { return IfcPresentationStyle; }
if(v==IfcSurfaceStyleLighting ) { return IfcPresentationItem; }
if(v==IfcSurfaceStyleRefraction ) { return IfcPresentationItem; }
if(v==IfcSurfaceStyleRendering ) { return IfcSurfaceStyleShading; }
if(v==IfcSurfaceStyleShading ) { return IfcPresentationItem; }
if(v==IfcSurfaceStyleWithTextures ) { return IfcPresentationItem; }
if(v==IfcSurfaceTexture ) { return IfcPresentationItem; }
if(v==IfcSweptAreaSolid ) { return IfcSolidModel; }
if(v==IfcSweptDiskSolid ) { return IfcSolidModel; }
if(v==IfcSweptDiskSolidPolygonal ) { return IfcSweptDiskSolid; }
if(v==IfcSweptSurface ) { return IfcSurface; }
if(v==IfcSwitchingDevice ) { return IfcFlowController; }
if(v==IfcSwitchingDeviceType ) { return IfcFlowControllerType; }
if(v==IfcSystem ) { return IfcGroup; }
if(v==IfcSystemFurnitureElement ) { return IfcFurnishingElement; }
if(v==IfcSystemFurnitureElementType ) { return IfcFurnishingElementType; }
if(v==IfcTShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcTank ) { return IfcFlowStorageDevice; }
if(v==IfcTankType ) { return IfcFlowStorageDeviceType; }
if(v==IfcTask ) { return IfcProcess; }
if(v==IfcTaskTime ) { return IfcSchedulingTime; }
if(v==IfcTaskTimeRecurring ) { return IfcTaskTime; }
if(v==IfcTaskType ) { return IfcTypeProcess; }
if(v==IfcTelecomAddress ) { return IfcAddress; }
if(v==IfcTendon ) { return IfcReinforcingElement; }
if(v==IfcTendonAnchor ) { return IfcReinforcingElement; }
if(v==IfcTendonAnchorType ) { return IfcReinforcingElementType; }
if(v==IfcTendonType ) { return IfcReinforcingElementType; }
if(v==IfcTessellatedFaceSet ) { return IfcTessellatedItem; }
if(v==IfcTessellatedItem ) { return IfcGeometricRepresentationItem; }
if(v==IfcTextLiteral ) { return IfcGeometricRepresentationItem; }
if(v==IfcTextLiteralWithExtent ) { return IfcTextLiteral; }
if(v==IfcTextStyle ) { return IfcPresentationStyle; }
if(v==IfcTextStyleFontModel ) { return IfcPreDefinedTextFont; }
if(v==IfcTextStyleForDefinedFont ) { return IfcPresentationItem; }
if(v==IfcTextStyleTextModel ) { return IfcPresentationItem; }
if(v==IfcTextureCoordinate ) { return IfcPresentationItem; }
if(v==IfcTextureCoordinateGenerator ) { return IfcTextureCoordinate; }
if(v==IfcTextureMap ) { return IfcTextureCoordinate; }
if(v==IfcTextureVertex ) { return IfcPresentationItem; }
if(v==IfcTextureVertexList ) { return IfcPresentationItem; }
if(v==IfcTopologicalRepresentationItem ) { return IfcRepresentationItem; }
if(v==IfcTopologyRepresentation ) { return IfcShapeModel; }
if(v==IfcTransformer ) { return IfcEnergyConversionDevice; }
if(v==IfcTransformerType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcTransportElement ) { return IfcElement; }
if(v==IfcTransportElementType ) { return IfcElementType; }
if(v==IfcTrapeziumProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcTriangulatedFaceSet ) { return IfcTessellatedFaceSet; }
if(v==IfcTrimmedCurve ) { return IfcBoundedCurve; }
if(v==IfcTubeBundle ) { return IfcEnergyConversionDevice; }
if(v==IfcTubeBundleType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcTypeObject ) { return IfcObjectDefinition; }
if(v==IfcTypeProcess ) { return IfcTypeObject; }
if(v==IfcTypeProduct ) { return IfcTypeObject; }
if(v==IfcTypeResource ) { return IfcTypeObject; }
if(v==IfcUShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcUnitaryControlElement ) { return IfcDistributionControlElement; }
if(v==IfcUnitaryControlElementType ) { return IfcDistributionControlElementType; }
if(v==IfcUnitaryEquipment ) { return IfcEnergyConversionDevice; }
if(v==IfcUnitaryEquipmentType ) { return IfcEnergyConversionDeviceType; }
if(v==IfcValve ) { return IfcFlowController; }
if(v==IfcValveType ) { return IfcFlowControllerType; }
if(v==IfcVector ) { return IfcGeometricRepresentationItem; }
if(v==IfcVertex ) { return IfcTopologicalRepresentationItem; }
if(v==IfcVertexLoop ) { return IfcLoop; }
if(v==IfcVertexPoint ) { return IfcVertex; }
if(v==IfcVibrationIsolator ) { return IfcElementComponent; }
if(v==IfcVibrationIsolatorType ) { return IfcElementComponentType; }
if(v==IfcVirtualElement ) { return IfcElement; }
if(v==IfcVoidingFeature ) { return IfcFeatureElementSubtraction; }
if(v==IfcWall ) { return IfcBuildingElement; }
if(v==IfcWallElementedCase ) { return IfcWall; }
if(v==IfcWallStandardCase ) { return IfcWall; }
if(v==IfcWallType ) { return IfcBuildingElementType; }
if(v==IfcWasteTerminal ) { return IfcFlowTerminal; }
if(v==IfcWasteTerminalType ) { return IfcFlowTerminalType; }
if(v==IfcWindow ) { return IfcBuildingElement; }
if(v==IfcWindowLiningProperties ) { return IfcPreDefinedPropertySet; }
if(v==IfcWindowPanelProperties ) { return IfcPreDefinedPropertySet; }
if(v==IfcWindowStandardCase ) { return IfcWindow; }
if(v==IfcWindowStyle ) { return IfcTypeProduct; }
if(v==IfcWindowType ) { return IfcBuildingElementType; }
if(v==IfcWorkCalendar ) { return IfcControl; }
if(v==IfcWorkControl ) { return IfcControl; }
if(v==IfcWorkPlan ) { return IfcWorkControl; }
if(v==IfcWorkSchedule ) { return IfcWorkControl; }
if(v==IfcWorkTime ) { return IfcSchedulingTime; }
if(v==IfcZShapeProfileDef ) { return IfcParameterizedProfileDef; }
if(v==IfcZone ) { return IfcSystem; }
return (Enum)-1;
static int parent_map[] = {-1,-1,199,-1,-1,-1,606,-1,-1,273,274,-1,-1,-1,543,14,387,428,411,412,-1,429,-1,354,355,-1,273,274,-1,-1,-1,-1,-1,699,451,-1,-1,-1,-1,842,704,704,40,-1,-1,-1,-1,462,631,428,429,-1,657,-1,657,657,84,-1,56,85,-1,59,90,62,97,-1,-1,-1,1003,226,354,355,-1,-1,77,-1,-1,451,-1,164,78,78,78,82,234,987,451,-1,463,917,342,346,347,-1,90,97,-1,350,917,1011,-1,354,355,-1,631,414,415,-1,424,425,-1,414,415,-1,424,425,-1,-1,667,451,119,451,121,122,121,124,41,-1,354,355,-1,90,97,-1,174,136,631,342,350,372,373,-1,-1,175,354,355,-1,-1,-1,151,687,687,90,152,97,-1,428,429,-1,-1,715,732,-1,84,163,451,704,-1,422,423,-1,354,355,-1,234,1071,177,-1,179,177,177,-1,177,-1,-1,194,195,-1,194,195,-1,194,195,-1,839,1093,607,-1,601,606,273,274,-1,601,203,354,355,-1,354,355,-1,-1,-1,-1,199,-1,199,-1,36,-1,90,97,-1,194,195,-1,451,-1,902,842,90,97,-1,-1,451,85,85,-1,-1,-1,-1,690,687,687,687,-1,351,411,412,-1,-1,-1,-1,-1,-1,-1,-1,704,-1,-1,-1,-1,-1,-1,451,-1,346,347,-1,277,278,-1,281,275,276,342,350,275,276,674,-1,1011,-1,-1,372,842,373,-1,-1,90,684,-1,-1,684,289,1092,-1,-1,97,-1,-1,-1,680,681,414,415,-1,424,425,-1,430,431,-1,-1,-1,1071,315,537,428,429,-1,-1,-1,-1,-1,411,412,-1,426,427,-1,354,355,-1,354,355,-1,-1,411,412,-1,-1,699,342,350,-1,342,350,-1,747,1092,987,174,631,277,278,-1,354,355,-1,354,355,-1,354,355,-1,697,866,-1,1091,-1,716,-1,-1,842,377,-1,915,373,373,373,1004,381,1071,451,1071,385,383,543,388,942,422,423,-1,346,347,-1,342,397,397,690,451,451,-1,430,431,-1,428,429,-1,1004,277,278,-1,277,278,273,274,-1,411,412,-1,277,278,277,278,277,278,277,278,277,278,-1,-1,-1,90,97,-1,-1,-1,342,350,440,441,-1,342,350,-1,453,-1,836,837,450,451,-1,-1,-1,699,-1,608,-1,-1,606,451,-1,354,355,-1,-1,-1,354,355,-1,631,-1,-1,1003,687,1052,478,-1,-1,-1,430,431,-1,-1,462,-1,-1,1067,-1,-1,414,415,-1,-1,-1,631,-1,194,195,-1,866,428,429,-1,-1,-1,-1,-1,372,373,-1,-1,-1,-1,-1,428,429,-1,-1,451,522,522,522,522,526,234,-1,-1,-1,-1,-1,608,-1,-1,1071,-1,-1,-1,-1,-1,902,211,837,-1,-1,-1,-1,554,-1,554,554,-1,701,554,554,569,556,-1,554,554,569,563,561,371,842,-1,-1,-1,-1,346,347,-1,428,429,-1,90,578,97,-1,183,-1,257,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,354,355,-1,-1,-1,-1,-1,-1,607,854,-1,-1,-1,183,-1,6,-1,234,234,175,399,-1,618,-1,842,315,79,428,429,-1,-1,-1,-1,704,1071,234,199,-1,-1,684,199,-1,-1,-1,644,-1,-1,644,90,-1,97,-1,414,415,-1,424,425,-1,1003,451,659,451,-1,351,-1,90,663,97,-1,451,667,667,-1,537,463,84,699,-1,-1,-1,12,-1,682,682,687,716,725,682,-1,-1,-1,688,-1,-1,-1,-1,697,1091,-1,606,-1,606,701,-1,-1,-1,-1,371,-1,196,196,199,-1,212,-1,398,-1,716,-1,886,854,842,886,716,886,886,725,718,-1,-1,733,-1,886,886,733,718,411,273,274,-1,412,-1,699,422,423,-1,645,645,645,725,645,645,645,-1,90,97,-1,90,90,97,-1,97,-1,-1,58,61,-1,766,631,226,85,-1,-1,-1,-1,1067,683,684,781,-1,-1,782,-1,346,347,781,782,-1,815,833,787,787,787,790,787,787,787,833,795,795,795,795,795,795,833,802,803,802,802,802,802,808,803,802,802,802,833,833,833,816,816,816,816,802,802,802,815,815,802,802,802,802,829,830,815,854,165,-1,-1,-1,-1,606,842,842,-1,-1,-1,866,1004,846,226,226,-1,90,97,-1,-1,-1,-1,-1,-1,766,-1,601,-1,428,429,-1,-1,-1,683,683,-1,-1,451,273,274,-1,-1,90,97,-1,-1,835,881,-1,-1,451,715,732,-1,-1,917,-1,90,892,892,97,-1,942,354,355,-1,-1,451,-1,-1,-1,-1,-1,917,-1,428,429,-1,918,-1,699,1092,915,916,915,916,-1,-1,-1,-1,-1,226,428,429,-1,90,90,97,-1,97,-1,-1,938,699,-1,1011,950,-1,937,-1,941,965,-1,946,970,699,943,-1,955,952,462,963,952,963,963,959,963,961,957,963,950,972,937,941,970,938,462,937,-1,941,965,-1,975,970,-1,835,837,980,194,195,-1,315,451,1004,397,-1,1007,1007,-1,957,-1,690,-1,687,687,1001,687,687,687,902,902,1005,987,411,412,-1,462,440,441,-1,631,-1,-1,-1,426,427,-1,697,-1,866,1024,1091,-1,12,-1,-1,781,781,782,-1,782,-1,1038,451,-1,-1,-1,-1,-1,451,1044,-1,690,685,687,687,-1,687,1052,1052,687,687,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,881,-1,354,355,-1,-1,-1,342,350,-1,631,1037,84,-1,-1,354,355,-1,607,1090,1090,1090,-1,631,-1,-1,-1,273,274,-1,354,355,-1,-1,411,412,-1,-1,451,-1,1071,537,1112,346,347,-1,342,-1,399,-1,-1,-1,90,1124,1124,97,-1,-1,-1,-1,428,429,-1,90,684,-1,-1,684,1135,1092,-1,-1,97,-1,-1,199,-1,199,1149,-1,1149,-1,866,631,1011};
boost::optional<Type::Enum> Type::Parent(Enum v){
const int p = parent_map[static_cast<int>(v)];
if (p >= 0) {
return static_cast<Type::Enum>(p);
} else {
return boost::none;
}
}
bool Type::IsSimple(Enum v) {
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -68,8 +68,8 @@ unsigned int IfcParse::IfcLateBoundEntity::id() const {
bool IfcParse::IfcLateBoundEntity::is(IfcSchema::Type::Enum v) const {
IfcSchema::Type::Enum _ty = _type;
if (v == _ty) return true;
while (_ty != -1) {
_ty = IfcSchema::Type::Parent(_ty);
while (IfcSchema::Type::Parent(_ty)) {
_ty = *IfcSchema::Type::Parent(_ty);
if (v == _ty) return true;
}
return false;
+17 -6
View File
@@ -985,15 +985,20 @@ bool IfcFile::Init(IfcParse::IfcSpfStream* s) {
}
IfcSchema::Type::Enum ty = entity->type();
do {
for (;;) {
IfcEntityList::ptr instances_by_type = entitiesByType(ty);
if (!instances_by_type) {
instances_by_type = IfcEntityList::ptr(new IfcEntityList());
bytype[ty] = instances_by_type;
}
instances_by_type->push(entity);
ty = IfcSchema::Type::Parent(ty);
} while ( ty > -1 );
boost::optional<IfcSchema::Type::Enum> pt = IfcSchema::Type::Parent(ty);
if (pt) {
ty = *pt;
} else {
break;
}
}
if ( byid.find(currentId) != byid.end() ) {
std::stringstream ss;
@@ -1191,15 +1196,21 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) {
// The mapping by entity type is updated.
IfcSchema::Type::Enum ty = entity->type();
do {
for (;;) {
IfcEntityList::ptr instances_by_type = entitiesByType(ty);
if (!instances_by_type) {
instances_by_type = IfcEntityList::ptr(new IfcEntityList());
bytype[ty] = instances_by_type;
}
instances_by_type->push(entity);
ty = IfcSchema::Type::Parent(ty);
} while ( ty > -1 );
boost::optional<IfcSchema::Type::Enum> pt = IfcSchema::Type::Parent(ty);
if (pt) {
ty = *pt;
}
else {
break;
}
}
int new_id = -1;
if (entity->entity->isWritable() && !entity->entity->file) {