diff --git a/src/examples/IfcParseExamples.cpp b/src/examples/IfcParseExamples.cpp index a4741d78e8..2441565fc1 100644 --- a/src/examples/IfcParseExamples.cpp +++ b/src/examples/IfcParseExamples.cpp @@ -56,7 +56,7 @@ int main(int argc, char** argv) { // defined for the window in question before accessing them. IfcBuildingElement::list::ptr elements = file.EntitiesByType(); - std::cout << "Found " << elements->Size() << " elements in " << argv[1] << ":" << std::endl; + std::cout << "Found " << elements->size() << " elements in " << argv[1] << ":" << std::endl; for ( IfcBuildingElement::list::it it = elements->begin(); it != elements->end(); ++ it ) { diff --git a/src/ifcexpressparser/implementation.py b/src/ifcexpressparser/implementation.py index 5dc5375291..94aed1a40f 100644 --- a/src/ifcexpressparser/implementation.py +++ b/src/ifcexpressparser/implementation.py @@ -128,13 +128,17 @@ class Implementation: 'index' : arg['index']-1, 'stmt' : impl} constructor_implementations.append(impl) + + def get_attribute_index(entity, attr_name): + related_entity = mapping.schema.entities[entity] + return [a['name'] for a in mapping.get_assignable_arguments(related_entity, include_derived=True)].index(attr_name) inverse = [templates.const_function % { 'class_name' : name, 'name' : i.name, 'arguments' : '', 'return_type' : '%s::list::ptr' % i.entity, - 'body' : templates.get_inverse % {'type': i.entity} + 'body' : templates.get_inverse % {'type': i.entity, 'index':get_attribute_index(i.entity, i.attribute)} } for i in (type.inverse.elements if type.inverse else [])] superclass = "%s((IfcAbstractEntity*)0)" % type.supertypes[0] if len(type.supertypes) == 1 else 'IfcUtil::IfcBaseEntity()' diff --git a/src/ifcexpressparser/templates.py b/src/ifcexpressparser/templates.py index 0f89f58c37..ad07b54be8 100644 --- a/src/ifcexpressparser/templates.py +++ b/src/ifcexpressparser/templates.py @@ -392,7 +392,7 @@ get_attr_stmt_entity = "return (%(type)s)((IfcUtil::IfcBaseClass*)(*entity->getA get_attr_stmt_array = "IfcEntityList::ptr es = *entity->getArgument(%(index)d); return es->as<%(list_instance_type)s>();" get_attr_stmt_nested_array = "IfcEntityListList::ptr es = *entity->getArgument(%(index)d); return es->as<%(list_instance_type)s>();" -get_inverse = "return entity->getInverse(Type::%(type)s)->as<%(type)s>();" +get_inverse = "return entity->getInverse(Type::%(type)s, %(index)d)->as<%(type)s>();" set_attr_stmt = "if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(%(index)d,v);" set_attr_stmt_enum = "if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(%(index)d,v,%(type)s::ToString(v));" diff --git a/src/ifcgeom/IfcGeomFaces.cpp b/src/ifcgeom/IfcGeomFaces.cpp index 6e90ea84bc..de87c68e47 100644 --- a/src/ifcgeom/IfcGeomFaces.cpp +++ b/src/ifcgeom/IfcGeomFaces.cpp @@ -113,7 +113,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcFace* l, TopoDS_Shape& face) { er = mf.Error(); } if ( er != BRepBuilderAPI_FaceDone ) return false; - if ( bounds->Size() == 1 ) { + if ( bounds->size() == 1 ) { face = mf.Face(); } else { for( ++it; it != bounds->end(); ++ it) { @@ -807,7 +807,7 @@ bool convert_surf(IfcSchema::IfcBSplineSurfaceWithKnots* l, Handle_Geom_Surface& std::vector umults = l->UMultiplicities(); std::vector vmults = l->VMultiplicities(); - TColgp_Array2OfPnt Poles (0, cps->Size() - 1, 0, (*cps->begin()).size() - 1); + TColgp_Array2OfPnt Poles (0, cps->size() - 1, 0, (*cps->begin()).size() - 1); TColStd_Array1OfReal UKnots(0, uknots.size() - 1); TColStd_Array1OfReal VKnots(0, vknots.size() - 1); TColStd_Array1OfInteger UMults(0, umults.size() - 1); diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 5f24a83dfa..9acee5abb7 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -871,7 +871,7 @@ IfcGeom::BRepElement

* IfcGeom::Kernel::create_brep_for_representation_and_pro const std::string product_type = IfcSchema::Type::ToString(product->type()); ElementSettings element_settings(settings, getValue(GV_LENGTH_UNIT), product_type); - if ( !settings.disable_opening_subtractions() && openings && openings->Size() ) { + if ( !settings.disable_opening_subtractions() && openings && openings->size() ) { IfcGeom::IfcRepresentationShapeItems opened_shapes; try { if ( settings.faster_booleans() ) { @@ -921,7 +921,7 @@ IfcSchema::IfcObjectDefinition* IfcGeom::Kernel::get_decomposing_entity(IfcSchem if ( product->is(IfcSchema::Type::IfcOpeningElement ) ) { IfcSchema::IfcOpeningElement* opening = (IfcSchema::IfcOpeningElement*)product; IfcSchema::IfcRelVoidsElement::list::ptr voids = opening->VoidsElements(); - if ( voids->Size() ) { + if ( voids->size() ) { IfcSchema::IfcRelVoidsElement* ifc_void = *voids->begin(); parent = ifc_void->RelatingBuildingElement(); } @@ -929,7 +929,7 @@ IfcSchema::IfcObjectDefinition* IfcGeom::Kernel::get_decomposing_entity(IfcSchem IfcSchema::IfcElement* element = (IfcSchema::IfcElement*)product; IfcSchema::IfcRelFillsElement::list::ptr fills = element->FillsVoids(); // Incase of a RelatedBuildingElement parent to the opening element - if ( fills->Size() ) { + if ( fills->size() ) { for ( IfcSchema::IfcRelFillsElement::list::it it = fills->begin(); it != fills->end(); ++ it ) { IfcSchema::IfcRelFillsElement* fill = *it; IfcSchema::IfcObjectDefinition* ifc_objectdef = fill->RelatingOpeningElement(); @@ -940,7 +940,7 @@ IfcSchema::IfcObjectDefinition* IfcGeom::Kernel::get_decomposing_entity(IfcSchem // Else simply parent to the containing structure if (!parent) { IfcSchema::IfcRelContainedInSpatialStructure::list::ptr parents = element->ContainedInStructure(); - if ( parents->Size() ) { + if ( parents->size() ) { IfcSchema::IfcRelContainedInSpatialStructure* container = *parents->begin(); parent = container->RelatingStructure(); } @@ -948,8 +948,8 @@ IfcSchema::IfcObjectDefinition* IfcGeom::Kernel::get_decomposing_entity(IfcSchem } // Parent decompositions to the RelatingObject if (!parent) { - IfcEntityList::ptr parents = product->entity->getInverse(IfcSchema::Type::IfcRelAggregates); - parents->push(product->entity->getInverse(IfcSchema::Type::IfcRelNests)); + IfcEntityList::ptr parents = product->entity->getInverse(IfcSchema::Type::IfcRelAggregates, -1); + parents->push(product->entity->getInverse(IfcSchema::Type::IfcRelNests, -1)); for ( IfcEntityList::it it = parents->begin(); it != parents->end(); ++ it ) { IfcSchema::IfcRelDecomposes* decompose = (IfcSchema::IfcRelDecomposes*)*it; IfcSchema::IfcObjectDefinition* ifc_objectdef; @@ -982,7 +982,7 @@ std::pair IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn try { IfcEntityList::ptr units = unit_assignment->Units(); - if (!units || !units->Size()) { + if (!units || !units->size()) { Logger::Message(Logger::LOG_ERROR, "No unit information found"); } else { for ( IfcEntityList::it it = units->begin(); it != units->end(); ++ it ) { diff --git a/src/ifcgeom/IfcGeomIterator.h b/src/ifcgeom/IfcGeomIterator.h index 71fd7f7336..3908b16eed 100644 --- a/src/ifcgeom/IfcGeomIterator.h +++ b/src/ifcgeom/IfcGeomIterator.h @@ -111,7 +111,7 @@ namespace IfcGeom { void initUnits() { IfcSchema::IfcProject::list::ptr projects = ifc_file->EntitiesByType(); - if (projects->Size() == 1) { + if (projects->size() == 1) { IfcSchema::IfcProject* project = *projects->begin(); std::pair length_unit = kernel.initializeUnits(project->UnitsInContext()); unit_name = length_unit.first; @@ -162,7 +162,7 @@ namespace IfcGeom { } } - if (filtered_contexts->Size() == 0) { + if (filtered_contexts->size() == 0) { filtered_contexts = contexts; } @@ -197,7 +197,7 @@ namespace IfcGeom { kernel.setValue(IfcGeom::Kernel::GV_PRECISION, 1.e-5); } - if (representations->Size() == 0) return false; + if (representations->size() == 0) return false; representation_iterator = representations->begin(); entities.reset(); @@ -207,7 +207,7 @@ namespace IfcGeom { } done = 0; - total = representations->Size(); + total = representations->size(); return true; } @@ -267,14 +267,14 @@ namespace IfcGeom { // IfcProductRepresentation also lacks the INVERSE relation to IfcProduct // Let's find the IfcProducts that reference the IfcProductRepresentation anyway - IfcEntityList::ptr products = (*it)->entity->getInverse(IfcSchema::Type::IfcProduct); + IfcEntityList::ptr products = (*it)->entity->getInverse(IfcSchema::Type::IfcProduct, -1); for ( IfcEntityList::it it = products->begin(); it != products->end(); ++ it ) { entities->push((IfcSchema::IfcProduct*)*it); } } } // Does this representation have any IfcProducts? - if ( ! entities->Size() ) { + if ( ! entities->size() ) { _nextShape(); continue; } diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 736fb6d760..f92dbc1a55 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -384,7 +384,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcBooleanResult* l, TopoDS_Shape bool IfcGeom::Kernel::convert(const IfcSchema::IfcConnectedFaceSet* l, TopoDS_Shape& shape) { IfcSchema::IfcFace::list::ptr faces = l->CfsFaces(); bool facesAdded = false; - const unsigned int num_faces = faces->Size(); + const unsigned int num_faces = faces->size(); bool valid_shell = false; if ( num_faces < getValue(GV_MAX_FACES_TO_SEW) ) { BRepOffsetAPI_Sewing builder; @@ -488,7 +488,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcMappedItem* l, IfcRepresentati bool IfcGeom::Kernel::convert(const IfcSchema::IfcShapeRepresentation* l, IfcRepresentationShapeItems& shapes) { IfcSchema::IfcRepresentationItem::list::ptr items = l->Items(); bool part_succes = false; - if ( items->Size() ) { + if ( items->size() ) { for ( IfcSchema::IfcRepresentationItem::list::it it = items->begin(); it != items->end(); ++ it ) { IfcSchema::IfcRepresentationItem* representation_item = *it; if ( is_shape_collection(representation_item) ) { @@ -507,7 +507,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcShapeRepresentation* l, IfcRep bool IfcGeom::Kernel::convert(const IfcSchema::IfcGeometricSet* l, IfcRepresentationShapeItems& shapes) { IfcEntityList::ptr elements = l->Elements(); - if ( !elements->Size() ) return false; + if ( !elements->size() ) return false; bool part_succes = false; const IfcGeom::SurfaceStyle* parent_style = get_style(l); for ( IfcEntityList::it it = elements->begin(); it != elements->end(); ++ it ) { diff --git a/src/ifcparse/Ifc2x3.cpp b/src/ifcparse/Ifc2x3.cpp index 84965d47ac..967b4b76e6 100644 --- a/src/ifcparse/Ifc2x3.cpp +++ b/src/ifcparse/Ifc2x3.cpp @@ -6511,7 +6511,7 @@ IfcActionRequest::IfcActionRequest(std::string v1_GlobalId, IfcOwnerHistory* v2_ // Function implementations for IfcActor IfcActorSelect* IfcActor::TheActor() const { return (IfcActorSelect*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(5))); } void IfcActor::setTheActor(IfcActorSelect* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcRelAssignsToActor::list::ptr IfcActor::IsActingUpon() const { return entity->getInverse(Type::IfcRelAssignsToActor)->as(); } +IfcRelAssignsToActor::list::ptr IfcActor::IsActingUpon() const { return entity->getInverse(Type::IfcRelAssignsToActor, 6)->as(); } bool IfcActor::is(Type::Enum v) const { return v == Type::IfcActor || IfcObject::is(v); } Type::Enum IfcActor::type() const { return Type::IfcActor; } Type::Enum IfcActor::Class() { return Type::IfcActor; } @@ -6552,8 +6552,8 @@ void IfcAddress::setDescription(std::string v) { if ( ! entity->isWritable() ) { bool IfcAddress::hasUserDefinedPurpose() const { return !entity->getArgument(2)->isNull(); } std::string IfcAddress::UserDefinedPurpose() const { return *entity->getArgument(2); } void IfcAddress::setUserDefinedPurpose(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcPerson::list::ptr IfcAddress::OfPerson() const { return entity->getInverse(Type::IfcPerson)->as(); } -IfcOrganization::list::ptr IfcAddress::OfOrganization() const { return entity->getInverse(Type::IfcOrganization)->as(); } +IfcPerson::list::ptr IfcAddress::OfPerson() const { return entity->getInverse(Type::IfcPerson, 7)->as(); } +IfcOrganization::list::ptr IfcAddress::OfOrganization() const { return entity->getInverse(Type::IfcOrganization, 4)->as(); } bool IfcAddress::is(Type::Enum v) const { return v == Type::IfcAddress; } Type::Enum IfcAddress::type() const { return Type::IfcAddress; } Type::Enum IfcAddress::Class() { return Type::IfcAddress; } @@ -6604,7 +6604,7 @@ IfcAngularDimension::IfcAngularDimension(IfcAbstractEntity* e) : IfcDimensionCur IfcAngularDimension::IfcAngularDimension(IfcEntityList::ptr v1_Contents) : IfcDimensionCurveDirectedCallout((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Contents)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcAnnotation -IfcRelContainedInSpatialStructure::list::ptr IfcAnnotation::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure)->as(); } +IfcRelContainedInSpatialStructure::list::ptr IfcAnnotation::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 4)->as(); } bool IfcAnnotation::is(Type::Enum v) const { return v == Type::IfcAnnotation || IfcProduct::is(v); } Type::Enum IfcAnnotation::type() const { return Type::IfcAnnotation; } Type::Enum IfcAnnotation::Class() { return Type::IfcAnnotation; } @@ -6717,9 +6717,9 @@ void IfcAppliedValue::setApplicableDate(IfcDateTimeSelect* v) { if ( ! entity->i bool IfcAppliedValue::hasFixedUntilDate() const { return !entity->getArgument(5)->isNull(); } IfcDateTimeSelect* IfcAppliedValue::FixedUntilDate() const { return (IfcDateTimeSelect*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(5))); } void IfcAppliedValue::setFixedUntilDate(IfcDateTimeSelect* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcReferencesValueDocument::list::ptr IfcAppliedValue::ValuesReferenced() const { return entity->getInverse(Type::IfcReferencesValueDocument)->as(); } -IfcAppliedValueRelationship::list::ptr IfcAppliedValue::ValueOfComponents() const { return entity->getInverse(Type::IfcAppliedValueRelationship)->as(); } -IfcAppliedValueRelationship::list::ptr IfcAppliedValue::IsComponentIn() const { return entity->getInverse(Type::IfcAppliedValueRelationship)->as(); } +IfcReferencesValueDocument::list::ptr IfcAppliedValue::ValuesReferenced() const { return entity->getInverse(Type::IfcReferencesValueDocument, 1)->as(); } +IfcAppliedValueRelationship::list::ptr IfcAppliedValue::ValueOfComponents() const { return entity->getInverse(Type::IfcAppliedValueRelationship, 0)->as(); } +IfcAppliedValueRelationship::list::ptr IfcAppliedValue::IsComponentIn() const { return entity->getInverse(Type::IfcAppliedValueRelationship, 1)->as(); } bool IfcAppliedValue::is(Type::Enum v) const { return v == Type::IfcAppliedValue; } Type::Enum IfcAppliedValue::type() const { return Type::IfcAppliedValue; } Type::Enum IfcAppliedValue::Class() { return Type::IfcAppliedValue; } @@ -6764,9 +6764,9 @@ std::string IfcApproval::Name() const { return *entity->getArgument(5); } void IfcApproval::setName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } std::string IfcApproval::Identifier() const { return *entity->getArgument(6); } void IfcApproval::setIdentifier(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcApprovalActorRelationship::list::ptr IfcApproval::Actors() const { return entity->getInverse(Type::IfcApprovalActorRelationship)->as(); } -IfcApprovalRelationship::list::ptr IfcApproval::IsRelatedWith() const { return entity->getInverse(Type::IfcApprovalRelationship)->as(); } -IfcApprovalRelationship::list::ptr IfcApproval::Relates() const { return entity->getInverse(Type::IfcApprovalRelationship)->as(); } +IfcApprovalActorRelationship::list::ptr IfcApproval::Actors() const { return entity->getInverse(Type::IfcApprovalActorRelationship, 1)->as(); } +IfcApprovalRelationship::list::ptr IfcApproval::IsRelatedWith() const { return entity->getInverse(Type::IfcApprovalRelationship, 0)->as(); } +IfcApprovalRelationship::list::ptr IfcApproval::Relates() const { return entity->getInverse(Type::IfcApprovalRelationship, 1)->as(); } bool IfcApproval::is(Type::Enum v) const { return v == Type::IfcApproval; } Type::Enum IfcApproval::type() const { return Type::IfcApproval; } Type::Enum IfcApproval::Class() { return Type::IfcApproval; } @@ -7402,7 +7402,7 @@ IfcCalendarDate* IfcClassification::EditionDate() const { return (IfcCalendarDat void IfcClassification::setEditionDate(IfcCalendarDate* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } std::string IfcClassification::Name() const { return *entity->getArgument(3); } void IfcClassification::setName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(3,v); } -IfcClassificationItem::list::ptr IfcClassification::Contains() const { return entity->getInverse(Type::IfcClassificationItem)->as(); } +IfcClassificationItem::list::ptr IfcClassification::Contains() const { return entity->getInverse(Type::IfcClassificationItem, 1)->as(); } bool IfcClassification::is(Type::Enum v) const { return v == Type::IfcClassification; } Type::Enum IfcClassification::type() const { return Type::IfcClassification; } Type::Enum IfcClassification::Class() { return Type::IfcClassification; } @@ -7417,8 +7417,8 @@ IfcClassification* IfcClassificationItem::ItemOf() const { return (IfcClassifica void IfcClassificationItem::setItemOf(IfcClassification* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } std::string IfcClassificationItem::Title() const { return *entity->getArgument(2); } void IfcClassificationItem::setTitle(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcClassificationItemRelationship::list::ptr IfcClassificationItem::IsClassifiedItemIn() const { return entity->getInverse(Type::IfcClassificationItemRelationship)->as(); } -IfcClassificationItemRelationship::list::ptr IfcClassificationItem::IsClassifyingItemIn() const { return entity->getInverse(Type::IfcClassificationItemRelationship)->as(); } +IfcClassificationItemRelationship::list::ptr IfcClassificationItem::IsClassifiedItemIn() const { return entity->getInverse(Type::IfcClassificationItemRelationship, 1)->as(); } +IfcClassificationItemRelationship::list::ptr IfcClassificationItem::IsClassifyingItemIn() const { return entity->getInverse(Type::IfcClassificationItemRelationship, 0)->as(); } bool IfcClassificationItem::is(Type::Enum v) const { return v == Type::IfcClassificationItem; } Type::Enum IfcClassificationItem::type() const { return Type::IfcClassificationItem; } Type::Enum IfcClassificationItem::Class() { return Type::IfcClassificationItem; } @@ -7548,7 +7548,7 @@ bool IfcCompositeCurveSegment::SameSense() const { return *entity->getArgument(1 void IfcCompositeCurveSegment::setSameSense(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } IfcCurve* IfcCompositeCurveSegment::ParentCurve() const { return (IfcCurve*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(2))); } void IfcCompositeCurveSegment::setParentCurve(IfcCurve* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcCompositeCurve::list::ptr IfcCompositeCurveSegment::UsingCurves() const { return entity->getInverse(Type::IfcCompositeCurve)->as(); } +IfcCompositeCurve::list::ptr IfcCompositeCurveSegment::UsingCurves() const { return entity->getInverse(Type::IfcCompositeCurve, 0)->as(); } bool IfcCompositeCurveSegment::is(Type::Enum v) const { return v == Type::IfcCompositeCurveSegment || IfcGeometricRepresentationItem::is(v); } Type::Enum IfcCompositeCurveSegment::type() const { return Type::IfcCompositeCurveSegment; } Type::Enum IfcCompositeCurveSegment::Class() { return Type::IfcCompositeCurveSegment; } @@ -7714,12 +7714,12 @@ void IfcConstraint::setCreationTime(IfcDateTimeSelect* v) { if ( ! entity->isWri bool IfcConstraint::hasUserDefinedGrade() const { return !entity->getArgument(6)->isNull(); } std::string IfcConstraint::UserDefinedGrade() const { return *entity->getArgument(6); } void IfcConstraint::setUserDefinedGrade(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcConstraintClassificationRelationship::list::ptr IfcConstraint::ClassifiedAs() const { return entity->getInverse(Type::IfcConstraintClassificationRelationship)->as(); } -IfcConstraintRelationship::list::ptr IfcConstraint::RelatesConstraints() const { return entity->getInverse(Type::IfcConstraintRelationship)->as(); } -IfcConstraintRelationship::list::ptr IfcConstraint::IsRelatedWith() const { return entity->getInverse(Type::IfcConstraintRelationship)->as(); } -IfcPropertyConstraintRelationship::list::ptr IfcConstraint::PropertiesForConstraint() const { return entity->getInverse(Type::IfcPropertyConstraintRelationship)->as(); } -IfcConstraintAggregationRelationship::list::ptr IfcConstraint::Aggregates() const { return entity->getInverse(Type::IfcConstraintAggregationRelationship)->as(); } -IfcConstraintAggregationRelationship::list::ptr IfcConstraint::IsAggregatedIn() const { return entity->getInverse(Type::IfcConstraintAggregationRelationship)->as(); } +IfcConstraintClassificationRelationship::list::ptr IfcConstraint::ClassifiedAs() const { return entity->getInverse(Type::IfcConstraintClassificationRelationship, 0)->as(); } +IfcConstraintRelationship::list::ptr IfcConstraint::RelatesConstraints() const { return entity->getInverse(Type::IfcConstraintRelationship, 2)->as(); } +IfcConstraintRelationship::list::ptr IfcConstraint::IsRelatedWith() const { return entity->getInverse(Type::IfcConstraintRelationship, 3)->as(); } +IfcPropertyConstraintRelationship::list::ptr IfcConstraint::PropertiesForConstraint() const { return entity->getInverse(Type::IfcPropertyConstraintRelationship, 0)->as(); } +IfcConstraintAggregationRelationship::list::ptr IfcConstraint::Aggregates() const { return entity->getInverse(Type::IfcConstraintAggregationRelationship, 2)->as(); } +IfcConstraintAggregationRelationship::list::ptr IfcConstraint::IsAggregatedIn() const { return entity->getInverse(Type::IfcConstraintAggregationRelationship, 3)->as(); } bool IfcConstraint::is(Type::Enum v) const { return v == Type::IfcConstraint; } Type::Enum IfcConstraint::type() const { return Type::IfcConstraint; } Type::Enum IfcConstraint::Class() { return Type::IfcConstraint; } @@ -7829,7 +7829,7 @@ IfcContextDependentUnit::IfcContextDependentUnit(IfcAbstractEntity* e) : IfcName IfcContextDependentUnit::IfcContextDependentUnit(IfcDimensionalExponents* v1_Dimensions, IfcUnitEnum::IfcUnitEnum v2_UnitType, std::string v3_Name) : IfcNamedUnit((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Dimensions)); e->setArgument(1,v2_UnitType,IfcUnitEnum::ToString(v2_UnitType)); e->setArgument(2,(v3_Name)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcControl -IfcRelAssignsToControl::list::ptr IfcControl::Controls() const { return entity->getInverse(Type::IfcRelAssignsToControl)->as(); } +IfcRelAssignsToControl::list::ptr IfcControl::Controls() const { return entity->getInverse(Type::IfcRelAssignsToControl, 6)->as(); } bool IfcControl::is(Type::Enum v) const { return v == Type::IfcControl || IfcObject::is(v); } Type::Enum IfcControl::type() const { return Type::IfcControl; } Type::Enum IfcControl::Class() { return Type::IfcControl; } @@ -7940,8 +7940,8 @@ IfcCostValue::IfcCostValue(boost::optional< std::string > v1_Name, boost::option bool IfcCovering::hasPredefinedType() const { return !entity->getArgument(8)->isNull(); } IfcCoveringTypeEnum::IfcCoveringTypeEnum IfcCovering::PredefinedType() const { return IfcCoveringTypeEnum::FromString(*entity->getArgument(8)); } void IfcCovering::setPredefinedType(IfcCoveringTypeEnum::IfcCoveringTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v,IfcCoveringTypeEnum::ToString(v)); } -IfcRelCoversSpaces::list::ptr IfcCovering::CoversSpaces() const { return entity->getInverse(Type::IfcRelCoversSpaces)->as(); } -IfcRelCoversBldgElements::list::ptr IfcCovering::Covers() const { return entity->getInverse(Type::IfcRelCoversBldgElements)->as(); } +IfcRelCoversSpaces::list::ptr IfcCovering::CoversSpaces() const { return entity->getInverse(Type::IfcRelCoversSpaces, 5)->as(); } +IfcRelCoversBldgElements::list::ptr IfcCovering::Covers() const { return entity->getInverse(Type::IfcRelCoversBldgElements, 5)->as(); } bool IfcCovering::is(Type::Enum v) const { return v == Type::IfcCovering || IfcBuildingElement::is(v); } Type::Enum IfcCovering::type() const { return Type::IfcCovering; } Type::Enum IfcCovering::Class() { return Type::IfcCovering; } @@ -8234,7 +8234,7 @@ IfcDimensionCalloutRelationship::IfcDimensionCalloutRelationship(IfcAbstractEnti IfcDimensionCalloutRelationship::IfcDimensionCalloutRelationship(boost::optional< std::string > v1_Name, boost::optional< std::string > v2_Description, IfcDraughtingCallout* v3_RelatingDraughtingCallout, IfcDraughtingCallout* v4_RelatedDraughtingCallout) : IfcDraughtingCalloutRelationship((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } e->setArgument(2,(v3_RelatingDraughtingCallout)); e->setArgument(3,(v4_RelatedDraughtingCallout)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcDimensionCurve -IfcTerminatorSymbol::list::ptr IfcDimensionCurve::AnnotatedBySymbols() const { return entity->getInverse(Type::IfcTerminatorSymbol)->as(); } +IfcTerminatorSymbol::list::ptr IfcDimensionCurve::AnnotatedBySymbols() const { return entity->getInverse(Type::IfcTerminatorSymbol, 3)->as(); } bool IfcDimensionCurve::is(Type::Enum v) const { return v == Type::IfcDimensionCurve || IfcAnnotationCurveOccurrence::is(v); } Type::Enum IfcDimensionCurve::type() const { return Type::IfcDimensionCurve; } Type::Enum IfcDimensionCurve::Class() { return Type::IfcDimensionCurve; } @@ -8328,7 +8328,7 @@ IfcDistributionChamberElementType::IfcDistributionChamberElementType(std::string bool IfcDistributionControlElement::hasControlElementId() const { return !entity->getArgument(8)->isNull(); } std::string IfcDistributionControlElement::ControlElementId() const { return *entity->getArgument(8); } void IfcDistributionControlElement::setControlElementId(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } -IfcRelFlowControlElements::list::ptr IfcDistributionControlElement::AssignedToFlowElement() const { return entity->getInverse(Type::IfcRelFlowControlElements)->as(); } +IfcRelFlowControlElements::list::ptr IfcDistributionControlElement::AssignedToFlowElement() const { return entity->getInverse(Type::IfcRelFlowControlElements, 4)->as(); } bool IfcDistributionControlElement::is(Type::Enum v) const { return v == Type::IfcDistributionControlElement || IfcDistributionElement::is(v); } Type::Enum IfcDistributionControlElement::type() const { return Type::IfcDistributionControlElement; } Type::Enum IfcDistributionControlElement::Class() { return Type::IfcDistributionControlElement; } @@ -8357,7 +8357,7 @@ IfcDistributionElementType::IfcDistributionElementType(IfcAbstractEntity* e) : I IfcDistributionElementType::IfcDistributionElementType(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType) : IfcElementType((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ApplicableOccurrence) { e->setArgument(4,(*v5_ApplicableOccurrence)); } else { e->setArgument(4); } if (v6_HasPropertySets) { e->setArgument(5,(*v6_HasPropertySets)->generalize()); } else { e->setArgument(5); } if (v7_RepresentationMaps) { e->setArgument(6,(*v7_RepresentationMaps)->generalize()); } else { e->setArgument(6); } if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } if (v9_ElementType) { e->setArgument(8,(*v9_ElementType)); } else { e->setArgument(8); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcDistributionFlowElement -IfcRelFlowControlElements::list::ptr IfcDistributionFlowElement::HasControlElements() const { return entity->getInverse(Type::IfcRelFlowControlElements)->as(); } +IfcRelFlowControlElements::list::ptr IfcDistributionFlowElement::HasControlElements() const { return entity->getInverse(Type::IfcRelFlowControlElements, 5)->as(); } bool IfcDistributionFlowElement::is(Type::Enum v) const { return v == Type::IfcDistributionFlowElement || IfcDistributionElement::is(v); } Type::Enum IfcDistributionFlowElement::type() const { return Type::IfcDistributionFlowElement; } Type::Enum IfcDistributionFlowElement::Class() { return Type::IfcDistributionFlowElement; } @@ -8447,8 +8447,8 @@ void IfcDocumentInformation::setConfidentiality(IfcDocumentConfidentialityEnum:: bool IfcDocumentInformation::hasStatus() const { return !entity->getArgument(16)->isNull(); } IfcDocumentStatusEnum::IfcDocumentStatusEnum IfcDocumentInformation::Status() const { return IfcDocumentStatusEnum::FromString(*entity->getArgument(16)); } void IfcDocumentInformation::setStatus(IfcDocumentStatusEnum::IfcDocumentStatusEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(16,v,IfcDocumentStatusEnum::ToString(v)); } -IfcDocumentInformationRelationship::list::ptr IfcDocumentInformation::IsPointedTo() const { return entity->getInverse(Type::IfcDocumentInformationRelationship)->as(); } -IfcDocumentInformationRelationship::list::ptr IfcDocumentInformation::IsPointer() const { return entity->getInverse(Type::IfcDocumentInformationRelationship)->as(); } +IfcDocumentInformationRelationship::list::ptr IfcDocumentInformation::IsPointedTo() const { return entity->getInverse(Type::IfcDocumentInformationRelationship, 1)->as(); } +IfcDocumentInformationRelationship::list::ptr IfcDocumentInformation::IsPointer() const { return entity->getInverse(Type::IfcDocumentInformationRelationship, 0)->as(); } bool IfcDocumentInformation::is(Type::Enum v) const { return v == Type::IfcDocumentInformation; } Type::Enum IfcDocumentInformation::type() const { return Type::IfcDocumentInformation; } Type::Enum IfcDocumentInformation::Class() { return Type::IfcDocumentInformation; } @@ -8470,7 +8470,7 @@ IfcDocumentInformationRelationship::IfcDocumentInformationRelationship(IfcAbstra IfcDocumentInformationRelationship::IfcDocumentInformationRelationship(IfcDocumentInformation* v1_RelatingDocument, IfcTemplatedEntityList< IfcDocumentInformation >::ptr v2_RelatedDocuments, boost::optional< std::string > v3_RelationshipType) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_RelatingDocument)); e->setArgument(1,(v2_RelatedDocuments)->generalize()); if (v3_RelationshipType) { e->setArgument(2,(*v3_RelationshipType)); } else { e->setArgument(2); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcDocumentReference -IfcDocumentInformation::list::ptr IfcDocumentReference::ReferenceToDocument() const { return entity->getInverse(Type::IfcDocumentInformation)->as(); } +IfcDocumentInformation::list::ptr IfcDocumentReference::ReferenceToDocument() const { return entity->getInverse(Type::IfcDocumentInformation, 3)->as(); } bool IfcDocumentReference::is(Type::Enum v) const { return v == Type::IfcDocumentReference || IfcExternalReference::is(v); } Type::Enum IfcDocumentReference::type() const { return Type::IfcDocumentReference; } Type::Enum IfcDocumentReference::Class() { return Type::IfcDocumentReference; } @@ -8568,8 +8568,8 @@ IfcDoorStyle::IfcDoorStyle(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHis // Function implementations for IfcDraughtingCallout IfcEntityList::ptr IfcDraughtingCallout::Contents() const { return *entity->getArgument(0); } void IfcDraughtingCallout::setContents(IfcEntityList::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } -IfcDraughtingCalloutRelationship::list::ptr IfcDraughtingCallout::IsRelatedFromCallout() const { return entity->getInverse(Type::IfcDraughtingCalloutRelationship)->as(); } -IfcDraughtingCalloutRelationship::list::ptr IfcDraughtingCallout::IsRelatedToCallout() const { return entity->getInverse(Type::IfcDraughtingCalloutRelationship)->as(); } +IfcDraughtingCalloutRelationship::list::ptr IfcDraughtingCallout::IsRelatedFromCallout() const { return entity->getInverse(Type::IfcDraughtingCalloutRelationship, 3)->as(); } +IfcDraughtingCalloutRelationship::list::ptr IfcDraughtingCallout::IsRelatedToCallout() const { return entity->getInverse(Type::IfcDraughtingCalloutRelationship, 2)->as(); } bool IfcDraughtingCallout::is(Type::Enum v) const { return v == Type::IfcDraughtingCallout || IfcGeometricRepresentationItem::is(v); } Type::Enum IfcDraughtingCallout::type() const { return Type::IfcDraughtingCallout; } Type::Enum IfcDraughtingCallout::Class() { return Type::IfcDraughtingCallout; } @@ -8794,18 +8794,18 @@ IfcElectricalElement::IfcElectricalElement(std::string v1_GlobalId, IfcOwnerHist bool IfcElement::hasTag() const { return !entity->getArgument(7)->isNull(); } std::string IfcElement::Tag() const { return *entity->getArgument(7); } void IfcElement::setTag(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcRelConnectsStructuralElement::list::ptr IfcElement::HasStructuralMember() const { return entity->getInverse(Type::IfcRelConnectsStructuralElement)->as(); } -IfcRelFillsElement::list::ptr IfcElement::FillsVoids() const { return entity->getInverse(Type::IfcRelFillsElement)->as(); } -IfcRelConnectsElements::list::ptr IfcElement::ConnectedTo() const { return entity->getInverse(Type::IfcRelConnectsElements)->as(); } -IfcRelCoversBldgElements::list::ptr IfcElement::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversBldgElements)->as(); } -IfcRelProjectsElement::list::ptr IfcElement::HasProjections() const { return entity->getInverse(Type::IfcRelProjectsElement)->as(); } -IfcRelReferencedInSpatialStructure::list::ptr IfcElement::ReferencedInStructures() const { return entity->getInverse(Type::IfcRelReferencedInSpatialStructure)->as(); } -IfcRelConnectsPortToElement::list::ptr IfcElement::HasPorts() const { return entity->getInverse(Type::IfcRelConnectsPortToElement)->as(); } -IfcRelVoidsElement::list::ptr IfcElement::HasOpenings() const { return entity->getInverse(Type::IfcRelVoidsElement)->as(); } -IfcRelConnectsWithRealizingElements::list::ptr IfcElement::IsConnectionRealization() const { return entity->getInverse(Type::IfcRelConnectsWithRealizingElements)->as(); } -IfcRelSpaceBoundary::list::ptr IfcElement::ProvidesBoundaries() const { return entity->getInverse(Type::IfcRelSpaceBoundary)->as(); } -IfcRelConnectsElements::list::ptr IfcElement::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsElements)->as(); } -IfcRelContainedInSpatialStructure::list::ptr IfcElement::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure)->as(); } +IfcRelConnectsStructuralElement::list::ptr IfcElement::HasStructuralMember() const { return entity->getInverse(Type::IfcRelConnectsStructuralElement, 4)->as(); } +IfcRelFillsElement::list::ptr IfcElement::FillsVoids() const { return entity->getInverse(Type::IfcRelFillsElement, 5)->as(); } +IfcRelConnectsElements::list::ptr IfcElement::ConnectedTo() const { return entity->getInverse(Type::IfcRelConnectsElements, 5)->as(); } +IfcRelCoversBldgElements::list::ptr IfcElement::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversBldgElements, 4)->as(); } +IfcRelProjectsElement::list::ptr IfcElement::HasProjections() const { return entity->getInverse(Type::IfcRelProjectsElement, 4)->as(); } +IfcRelReferencedInSpatialStructure::list::ptr IfcElement::ReferencedInStructures() const { return entity->getInverse(Type::IfcRelReferencedInSpatialStructure, 4)->as(); } +IfcRelConnectsPortToElement::list::ptr IfcElement::HasPorts() const { return entity->getInverse(Type::IfcRelConnectsPortToElement, 5)->as(); } +IfcRelVoidsElement::list::ptr IfcElement::HasOpenings() const { return entity->getInverse(Type::IfcRelVoidsElement, 4)->as(); } +IfcRelConnectsWithRealizingElements::list::ptr IfcElement::IsConnectionRealization() const { return entity->getInverse(Type::IfcRelConnectsWithRealizingElements, 7)->as(); } +IfcRelSpaceBoundary::list::ptr IfcElement::ProvidesBoundaries() const { return entity->getInverse(Type::IfcRelSpaceBoundary, 5)->as(); } +IfcRelConnectsElements::list::ptr IfcElement::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsElements, 6)->as(); } +IfcRelContainedInSpatialStructure::list::ptr IfcElement::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 4)->as(); } bool IfcElement::is(Type::Enum v) const { return v == Type::IfcElement || IfcProduct::is(v); } Type::Enum IfcElement::type() const { return Type::IfcElement; } Type::Enum IfcElement::Class() { return Type::IfcElement; } @@ -9152,7 +9152,7 @@ IfcFeatureElement::IfcFeatureElement(IfcAbstractEntity* e) : IfcElement((IfcAbst IfcFeatureElement::IfcFeatureElement(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag) : IfcElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcFeatureElementAddition -IfcRelProjectsElement::list::ptr IfcFeatureElementAddition::ProjectsElements() const { return entity->getInverse(Type::IfcRelProjectsElement)->as(); } +IfcRelProjectsElement::list::ptr IfcFeatureElementAddition::ProjectsElements() const { return entity->getInverse(Type::IfcRelProjectsElement, 5)->as(); } bool IfcFeatureElementAddition::is(Type::Enum v) const { return v == Type::IfcFeatureElementAddition || IfcFeatureElement::is(v); } Type::Enum IfcFeatureElementAddition::type() const { return Type::IfcFeatureElementAddition; } Type::Enum IfcFeatureElementAddition::Class() { return Type::IfcFeatureElementAddition; } @@ -9160,7 +9160,7 @@ IfcFeatureElementAddition::IfcFeatureElementAddition(IfcAbstractEntity* e) : Ifc IfcFeatureElementAddition::IfcFeatureElementAddition(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag) : IfcFeatureElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcFeatureElementSubtraction -IfcRelVoidsElement::list::ptr IfcFeatureElementSubtraction::VoidsElements() const { return entity->getInverse(Type::IfcRelVoidsElement)->as(); } +IfcRelVoidsElement::list::ptr IfcFeatureElementSubtraction::VoidsElements() const { return entity->getInverse(Type::IfcRelVoidsElement, 5)->as(); } bool IfcFeatureElementSubtraction::is(Type::Enum v) const { return v == Type::IfcFeatureElementSubtraction || IfcFeatureElement::is(v); } Type::Enum IfcFeatureElementSubtraction::type() const { return Type::IfcFeatureElementSubtraction; } Type::Enum IfcFeatureElementSubtraction::Class() { return Type::IfcFeatureElementSubtraction; } @@ -9524,7 +9524,7 @@ void IfcGeometricRepresentationContext::setWorldCoordinateSystem(IfcAxis2Placeme bool IfcGeometricRepresentationContext::hasTrueNorth() const { return !entity->getArgument(5)->isNull(); } IfcDirection* IfcGeometricRepresentationContext::TrueNorth() const { return (IfcDirection*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(5))); } void IfcGeometricRepresentationContext::setTrueNorth(IfcDirection* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcGeometricRepresentationSubContext::list::ptr IfcGeometricRepresentationContext::HasSubContexts() const { return entity->getInverse(Type::IfcGeometricRepresentationSubContext)->as(); } +IfcGeometricRepresentationSubContext::list::ptr IfcGeometricRepresentationContext::HasSubContexts() const { return entity->getInverse(Type::IfcGeometricRepresentationSubContext, 6)->as(); } bool IfcGeometricRepresentationContext::is(Type::Enum v) const { return v == Type::IfcGeometricRepresentationContext || IfcRepresentationContext::is(v); } Type::Enum IfcGeometricRepresentationContext::type() const { return Type::IfcGeometricRepresentationContext; } Type::Enum IfcGeometricRepresentationContext::Class() { return Type::IfcGeometricRepresentationContext; } @@ -9572,7 +9572,7 @@ void IfcGrid::setVAxes(IfcTemplatedEntityList< IfcGridAxis >::ptr v) { if ( ! en bool IfcGrid::hasWAxes() const { return !entity->getArgument(9)->isNull(); } IfcTemplatedEntityList< IfcGridAxis >::ptr IfcGrid::WAxes() const { IfcEntityList::ptr es = *entity->getArgument(9); return es->as(); } void IfcGrid::setWAxes(IfcTemplatedEntityList< IfcGridAxis >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v->generalize()); } -IfcRelContainedInSpatialStructure::list::ptr IfcGrid::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure)->as(); } +IfcRelContainedInSpatialStructure::list::ptr IfcGrid::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 4)->as(); } bool IfcGrid::is(Type::Enum v) const { return v == Type::IfcGrid || IfcProduct::is(v); } Type::Enum IfcGrid::type() const { return Type::IfcGrid; } Type::Enum IfcGrid::Class() { return Type::IfcGrid; } @@ -9587,10 +9587,10 @@ IfcCurve* IfcGridAxis::AxisCurve() const { return (IfcCurve*)((IfcUtil::IfcBaseC void IfcGridAxis::setAxisCurve(IfcCurve* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } bool IfcGridAxis::SameSense() const { return *entity->getArgument(2); } void IfcGridAxis::setSameSense(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcGrid::list::ptr IfcGridAxis::PartOfW() const { return entity->getInverse(Type::IfcGrid)->as(); } -IfcGrid::list::ptr IfcGridAxis::PartOfV() const { return entity->getInverse(Type::IfcGrid)->as(); } -IfcGrid::list::ptr IfcGridAxis::PartOfU() const { return entity->getInverse(Type::IfcGrid)->as(); } -IfcVirtualGridIntersection::list::ptr IfcGridAxis::HasIntersections() const { return entity->getInverse(Type::IfcVirtualGridIntersection)->as(); } +IfcGrid::list::ptr IfcGridAxis::PartOfW() const { return entity->getInverse(Type::IfcGrid, 9)->as(); } +IfcGrid::list::ptr IfcGridAxis::PartOfV() const { return entity->getInverse(Type::IfcGrid, 8)->as(); } +IfcGrid::list::ptr IfcGridAxis::PartOfU() const { return entity->getInverse(Type::IfcGrid, 7)->as(); } +IfcVirtualGridIntersection::list::ptr IfcGridAxis::HasIntersections() const { return entity->getInverse(Type::IfcVirtualGridIntersection, 0)->as(); } bool IfcGridAxis::is(Type::Enum v) const { return v == Type::IfcGridAxis; } Type::Enum IfcGridAxis::type() const { return Type::IfcGridAxis; } Type::Enum IfcGridAxis::Class() { return Type::IfcGridAxis; } @@ -9610,7 +9610,7 @@ IfcGridPlacement::IfcGridPlacement(IfcAbstractEntity* e) : IfcObjectPlacement((I IfcGridPlacement::IfcGridPlacement(IfcVirtualGridIntersection* v1_PlacementLocation, IfcVirtualGridIntersection* v2_PlacementRefDirection) : IfcObjectPlacement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_PlacementLocation)); e->setArgument(1,(v2_PlacementRefDirection)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcGroup -IfcRelAssignsToGroup::list::ptr IfcGroup::IsGroupedBy() const { return entity->getInverse(Type::IfcRelAssignsToGroup)->as(); } +IfcRelAssignsToGroup::list::ptr IfcGroup::IsGroupedBy() const { return entity->getInverse(Type::IfcRelAssignsToGroup, 6)->as(); } bool IfcGroup::is(Type::Enum v) const { return v == Type::IfcGroup || IfcObject::is(v); } Type::Enum IfcGroup::type() const { return Type::IfcGroup; } Type::Enum IfcGroup::Class() { return Type::IfcGroup; } @@ -9815,7 +9815,7 @@ IfcLibraryInformation::IfcLibraryInformation(IfcAbstractEntity* e) : IfcUtil::If IfcLibraryInformation::IfcLibraryInformation(std::string v1_Name, boost::optional< std::string > v2_Version, IfcOrganization* v3_Publisher, IfcCalendarDate* v4_VersionDate, boost::optional< IfcTemplatedEntityList< IfcLibraryReference >::ptr > v5_LibraryReference) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Name)); if (v2_Version) { e->setArgument(1,(*v2_Version)); } else { e->setArgument(1); } e->setArgument(2,(v3_Publisher)); e->setArgument(3,(v4_VersionDate)); if (v5_LibraryReference) { e->setArgument(4,(*v5_LibraryReference)->generalize()); } else { e->setArgument(4); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcLibraryReference -IfcLibraryInformation::list::ptr IfcLibraryReference::ReferenceIntoLibrary() const { return entity->getInverse(Type::IfcLibraryInformation)->as(); } +IfcLibraryInformation::list::ptr IfcLibraryReference::ReferenceIntoLibrary() const { return entity->getInverse(Type::IfcLibraryInformation, 4)->as(); } bool IfcLibraryReference::is(Type::Enum v) const { return v == Type::IfcLibraryReference || IfcExternalReference::is(v); } Type::Enum IfcLibraryReference::type() const { return Type::IfcLibraryReference; } Type::Enum IfcLibraryReference::Class() { return Type::IfcLibraryReference; } @@ -10023,8 +10023,8 @@ IfcMappedItem::IfcMappedItem(IfcRepresentationMap* v1_MappingSource, IfcCartesia // Function implementations for IfcMaterial std::string IfcMaterial::Name() const { return *entity->getArgument(0); } void IfcMaterial::setName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } -IfcMaterialDefinitionRepresentation::list::ptr IfcMaterial::HasRepresentation() const { return entity->getInverse(Type::IfcMaterialDefinitionRepresentation)->as(); } -IfcMaterialClassificationRelationship::list::ptr IfcMaterial::ClassifiedAs() const { return entity->getInverse(Type::IfcMaterialClassificationRelationship)->as(); } +IfcMaterialDefinitionRepresentation::list::ptr IfcMaterial::HasRepresentation() const { return entity->getInverse(Type::IfcMaterialDefinitionRepresentation, 3)->as(); } +IfcMaterialClassificationRelationship::list::ptr IfcMaterial::ClassifiedAs() const { return entity->getInverse(Type::IfcMaterialClassificationRelationship, 1)->as(); } bool IfcMaterial::is(Type::Enum v) const { return v == Type::IfcMaterial; } Type::Enum IfcMaterial::type() const { return Type::IfcMaterial; } Type::Enum IfcMaterial::Class() { return Type::IfcMaterial; } @@ -10060,7 +10060,7 @@ void IfcMaterialLayer::setLayerThickness(double v) { if ( ! entity->isWritable() bool IfcMaterialLayer::hasIsVentilated() const { return !entity->getArgument(2)->isNull(); } bool IfcMaterialLayer::IsVentilated() const { return *entity->getArgument(2); } void IfcMaterialLayer::setIsVentilated(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcMaterialLayerSet::list::ptr IfcMaterialLayer::ToMaterialLayerSet() const { return entity->getInverse(Type::IfcMaterialLayerSet)->as(); } +IfcMaterialLayerSet::list::ptr IfcMaterialLayer::ToMaterialLayerSet() const { return entity->getInverse(Type::IfcMaterialLayerSet, 0)->as(); } bool IfcMaterialLayer::is(Type::Enum v) const { return v == Type::IfcMaterialLayer; } Type::Enum IfcMaterialLayer::type() const { return Type::IfcMaterialLayer; } Type::Enum IfcMaterialLayer::Class() { return Type::IfcMaterialLayer; } @@ -10295,7 +10295,7 @@ IfcNamedUnit::IfcNamedUnit(IfcDimensionalExponents* v1_Dimensions, IfcUnitEnum:: bool IfcObject::hasObjectType() const { return !entity->getArgument(4)->isNull(); } std::string IfcObject::ObjectType() const { return *entity->getArgument(4); } void IfcObject::setObjectType(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(4,v); } -IfcRelDefines::list::ptr IfcObject::IsDefinedBy() const { return entity->getInverse(Type::IfcRelDefines)->as(); } +IfcRelDefines::list::ptr IfcObject::IsDefinedBy() const { return entity->getInverse(Type::IfcRelDefines, 4)->as(); } bool IfcObject::is(Type::Enum v) const { return v == Type::IfcObject || IfcObjectDefinition::is(v); } Type::Enum IfcObject::type() const { return Type::IfcObject; } Type::Enum IfcObject::Class() { return Type::IfcObject; } @@ -10303,10 +10303,10 @@ IfcObject::IfcObject(IfcAbstractEntity* e) : IfcObjectDefinition((IfcAbstractEnt IfcObject::IfcObject(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType) : IfcObjectDefinition((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcObjectDefinition -IfcRelAssigns::list::ptr IfcObjectDefinition::HasAssignments() const { return entity->getInverse(Type::IfcRelAssigns)->as(); } -IfcRelDecomposes::list::ptr IfcObjectDefinition::IsDecomposedBy() const { return entity->getInverse(Type::IfcRelDecomposes)->as(); } -IfcRelDecomposes::list::ptr IfcObjectDefinition::Decomposes() const { return entity->getInverse(Type::IfcRelDecomposes)->as(); } -IfcRelAssociates::list::ptr IfcObjectDefinition::HasAssociations() const { return entity->getInverse(Type::IfcRelAssociates)->as(); } +IfcRelAssigns::list::ptr IfcObjectDefinition::HasAssignments() const { return entity->getInverse(Type::IfcRelAssigns, 4)->as(); } +IfcRelDecomposes::list::ptr IfcObjectDefinition::IsDecomposedBy() const { return entity->getInverse(Type::IfcRelDecomposes, 4)->as(); } +IfcRelDecomposes::list::ptr IfcObjectDefinition::Decomposes() const { return entity->getInverse(Type::IfcRelDecomposes, 5)->as(); } +IfcRelAssociates::list::ptr IfcObjectDefinition::HasAssociations() const { return entity->getInverse(Type::IfcRelAssociates, 4)->as(); } bool IfcObjectDefinition::is(Type::Enum v) const { return v == Type::IfcObjectDefinition || IfcRoot::is(v); } Type::Enum IfcObjectDefinition::type() const { return Type::IfcObjectDefinition; } Type::Enum IfcObjectDefinition::Class() { return Type::IfcObjectDefinition; } @@ -10314,8 +10314,8 @@ IfcObjectDefinition::IfcObjectDefinition(IfcAbstractEntity* e) : IfcRoot((IfcAbs IfcObjectDefinition::IfcObjectDefinition(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description) : IfcRoot((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcObjectPlacement -IfcProduct::list::ptr IfcObjectPlacement::PlacesObject() const { return entity->getInverse(Type::IfcProduct)->as(); } -IfcLocalPlacement::list::ptr IfcObjectPlacement::ReferencedByPlacements() const { return entity->getInverse(Type::IfcLocalPlacement)->as(); } +IfcProduct::list::ptr IfcObjectPlacement::PlacesObject() const { return entity->getInverse(Type::IfcProduct, 5)->as(); } +IfcLocalPlacement::list::ptr IfcObjectPlacement::ReferencedByPlacements() const { return entity->getInverse(Type::IfcLocalPlacement, 0)->as(); } bool IfcObjectPlacement::is(Type::Enum v) const { return v == Type::IfcObjectPlacement; } Type::Enum IfcObjectPlacement::type() const { return Type::IfcObjectPlacement; } Type::Enum IfcObjectPlacement::Class() { return Type::IfcObjectPlacement; } @@ -10394,7 +10394,7 @@ IfcOpenShell::IfcOpenShell(IfcAbstractEntity* e) : IfcConnectedFaceSet((IfcAbstr IfcOpenShell::IfcOpenShell(IfcTemplatedEntityList< IfcFace >::ptr v1_CfsFaces) : IfcConnectedFaceSet((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_CfsFaces)->generalize()); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcOpeningElement -IfcRelFillsElement::list::ptr IfcOpeningElement::HasFillings() const { return entity->getInverse(Type::IfcRelFillsElement)->as(); } +IfcRelFillsElement::list::ptr IfcOpeningElement::HasFillings() const { return entity->getInverse(Type::IfcRelFillsElement, 4)->as(); } bool IfcOpeningElement::is(Type::Enum v) const { return v == Type::IfcOpeningElement || IfcFeatureElementSubtraction::is(v); } Type::Enum IfcOpeningElement::type() const { return Type::IfcOpeningElement; } Type::Enum IfcOpeningElement::Class() { return Type::IfcOpeningElement; } @@ -10459,9 +10459,9 @@ void IfcOrganization::setRoles(IfcTemplatedEntityList< IfcActorRole >::ptr v) { bool IfcOrganization::hasAddresses() const { return !entity->getArgument(4)->isNull(); } IfcTemplatedEntityList< IfcAddress >::ptr IfcOrganization::Addresses() const { IfcEntityList::ptr es = *entity->getArgument(4); return es->as(); } void IfcOrganization::setAddresses(IfcTemplatedEntityList< IfcAddress >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(4,v->generalize()); } -IfcOrganizationRelationship::list::ptr IfcOrganization::IsRelatedBy() const { return entity->getInverse(Type::IfcOrganizationRelationship)->as(); } -IfcOrganizationRelationship::list::ptr IfcOrganization::Relates() const { return entity->getInverse(Type::IfcOrganizationRelationship)->as(); } -IfcPersonAndOrganization::list::ptr IfcOrganization::Engages() const { return entity->getInverse(Type::IfcPersonAndOrganization)->as(); } +IfcOrganizationRelationship::list::ptr IfcOrganization::IsRelatedBy() const { return entity->getInverse(Type::IfcOrganizationRelationship, 3)->as(); } +IfcOrganizationRelationship::list::ptr IfcOrganization::Relates() const { return entity->getInverse(Type::IfcOrganizationRelationship, 2)->as(); } +IfcPersonAndOrganization::list::ptr IfcOrganization::Engages() const { return entity->getInverse(Type::IfcPersonAndOrganization, 1)->as(); } bool IfcOrganization::is(Type::Enum v) const { return v == Type::IfcOrganization; } Type::Enum IfcOrganization::type() const { return Type::IfcOrganization; } Type::Enum IfcOrganization::Class() { return Type::IfcOrganization; } @@ -10612,7 +10612,7 @@ void IfcPerson::setRoles(IfcTemplatedEntityList< IfcActorRole >::ptr v) { if ( ! bool IfcPerson::hasAddresses() const { return !entity->getArgument(7)->isNull(); } IfcTemplatedEntityList< IfcAddress >::ptr IfcPerson::Addresses() const { IfcEntityList::ptr es = *entity->getArgument(7); return es->as(); } void IfcPerson::setAddresses(IfcTemplatedEntityList< IfcAddress >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v->generalize()); } -IfcPersonAndOrganization::list::ptr IfcPerson::EngagedIn() const { return entity->getInverse(Type::IfcPersonAndOrganization)->as(); } +IfcPersonAndOrganization::list::ptr IfcPerson::EngagedIn() const { return entity->getInverse(Type::IfcPersonAndOrganization, 0)->as(); } bool IfcPerson::is(Type::Enum v) const { return v == Type::IfcPerson; } Type::Enum IfcPerson::type() const { return Type::IfcPerson; } Type::Enum IfcPerson::Class() { return Type::IfcPerson; } @@ -10656,7 +10656,7 @@ void IfcPhysicalQuantity::setName(std::string v) { if ( ! entity->isWritable() ) bool IfcPhysicalQuantity::hasDescription() const { return !entity->getArgument(1)->isNull(); } std::string IfcPhysicalQuantity::Description() const { return *entity->getArgument(1); } void IfcPhysicalQuantity::setDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcPhysicalComplexQuantity::list::ptr IfcPhysicalQuantity::PartOfComplex() const { return entity->getInverse(Type::IfcPhysicalComplexQuantity)->as(); } +IfcPhysicalComplexQuantity::list::ptr IfcPhysicalQuantity::PartOfComplex() const { return entity->getInverse(Type::IfcPhysicalComplexQuantity, 2)->as(); } bool IfcPhysicalQuantity::is(Type::Enum v) const { return v == Type::IfcPhysicalQuantity; } Type::Enum IfcPhysicalQuantity::type() const { return Type::IfcPhysicalQuantity; } Type::Enum IfcPhysicalQuantity::Class() { return Type::IfcPhysicalQuantity; } @@ -10829,9 +10829,9 @@ IfcPolyline::IfcPolyline(IfcAbstractEntity* e) : IfcBoundedCurve((IfcAbstractEnt IfcPolyline::IfcPolyline(IfcTemplatedEntityList< IfcCartesianPoint >::ptr v1_Points) : IfcBoundedCurve((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Points)->generalize()); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcPort -IfcRelConnectsPortToElement::list::ptr IfcPort::ContainedIn() const { return entity->getInverse(Type::IfcRelConnectsPortToElement)->as(); } -IfcRelConnectsPorts::list::ptr IfcPort::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsPorts)->as(); } -IfcRelConnectsPorts::list::ptr IfcPort::ConnectedTo() const { return entity->getInverse(Type::IfcRelConnectsPorts)->as(); } +IfcRelConnectsPortToElement::list::ptr IfcPort::ContainedIn() const { return entity->getInverse(Type::IfcRelConnectsPortToElement, 4)->as(); } +IfcRelConnectsPorts::list::ptr IfcPort::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsPorts, 5)->as(); } +IfcRelConnectsPorts::list::ptr IfcPort::ConnectedTo() const { return entity->getInverse(Type::IfcRelConnectsPorts, 4)->as(); } bool IfcPort::is(Type::Enum v) const { return v == Type::IfcPort || IfcProduct::is(v); } Type::Enum IfcPort::type() const { return Type::IfcPort; } Type::Enum IfcPort::Class() { return Type::IfcPort; } @@ -10990,9 +10990,9 @@ IfcProcedure::IfcProcedure(IfcAbstractEntity* e) : IfcProcess((IfcAbstractEntity IfcProcedure::IfcProcedure(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, std::string v6_ProcedureID, IfcProcedureTypeEnum::IfcProcedureTypeEnum v7_ProcedureType, boost::optional< std::string > v8_UserDefinedProcedureType) : IfcProcess((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ProcedureID)); e->setArgument(6,v7_ProcedureType,IfcProcedureTypeEnum::ToString(v7_ProcedureType)); if (v8_UserDefinedProcedureType) { e->setArgument(7,(*v8_UserDefinedProcedureType)); } else { e->setArgument(7); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcProcess -IfcRelAssignsToProcess::list::ptr IfcProcess::OperatesOn() const { return entity->getInverse(Type::IfcRelAssignsToProcess)->as(); } -IfcRelSequence::list::ptr IfcProcess::IsSuccessorFrom() const { return entity->getInverse(Type::IfcRelSequence)->as(); } -IfcRelSequence::list::ptr IfcProcess::IsPredecessorTo() const { return entity->getInverse(Type::IfcRelSequence)->as(); } +IfcRelAssignsToProcess::list::ptr IfcProcess::OperatesOn() const { return entity->getInverse(Type::IfcRelAssignsToProcess, 6)->as(); } +IfcRelSequence::list::ptr IfcProcess::IsSuccessorFrom() const { return entity->getInverse(Type::IfcRelSequence, 5)->as(); } +IfcRelSequence::list::ptr IfcProcess::IsPredecessorTo() const { return entity->getInverse(Type::IfcRelSequence, 4)->as(); } bool IfcProcess::is(Type::Enum v) const { return v == Type::IfcProcess || IfcObject::is(v); } Type::Enum IfcProcess::type() const { return Type::IfcProcess; } Type::Enum IfcProcess::Class() { return Type::IfcProcess; } @@ -11006,7 +11006,7 @@ void IfcProduct::setObjectPlacement(IfcObjectPlacement* v) { if ( ! entity->isWr bool IfcProduct::hasRepresentation() const { return !entity->getArgument(6)->isNull(); } IfcProductRepresentation* IfcProduct::Representation() const { return (IfcProductRepresentation*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(6))); } void IfcProduct::setRepresentation(IfcProductRepresentation* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcRelAssignsToProduct::list::ptr IfcProduct::ReferencedBy() const { return entity->getInverse(Type::IfcRelAssignsToProduct)->as(); } +IfcRelAssignsToProduct::list::ptr IfcProduct::ReferencedBy() const { return entity->getInverse(Type::IfcRelAssignsToProduct, 6)->as(); } bool IfcProduct::is(Type::Enum v) const { return v == Type::IfcProduct || IfcObject::is(v); } Type::Enum IfcProduct::type() const { return Type::IfcProduct; } Type::Enum IfcProduct::Class() { return Type::IfcProduct; } @@ -11014,8 +11014,8 @@ IfcProduct::IfcProduct(IfcAbstractEntity* e) : IfcObject((IfcAbstractEntity*)0) IfcProduct::IfcProduct(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation) : IfcObject((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcProductDefinitionShape -IfcProduct::list::ptr IfcProductDefinitionShape::ShapeOfProduct() const { return entity->getInverse(Type::IfcProduct)->as(); } -IfcShapeAspect::list::ptr IfcProductDefinitionShape::HasShapeAspects() const { return entity->getInverse(Type::IfcShapeAspect)->as(); } +IfcProduct::list::ptr IfcProductDefinitionShape::ShapeOfProduct() const { return entity->getInverse(Type::IfcProduct, 6)->as(); } +IfcShapeAspect::list::ptr IfcProductDefinitionShape::HasShapeAspects() const { return entity->getInverse(Type::IfcShapeAspect, 4)->as(); } bool IfcProductDefinitionShape::is(Type::Enum v) const { return v == Type::IfcProductDefinitionShape || IfcProductRepresentation::is(v); } Type::Enum IfcProductDefinitionShape::type() const { return Type::IfcProductDefinitionShape; } Type::Enum IfcProductDefinitionShape::Class() { return Type::IfcProductDefinitionShape; } @@ -11143,9 +11143,9 @@ void IfcProperty::setName(std::string v) { if ( ! entity->isWritable() ) { entit bool IfcProperty::hasDescription() const { return !entity->getArgument(1)->isNull(); } std::string IfcProperty::Description() const { return *entity->getArgument(1); } void IfcProperty::setDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyForDependance() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship)->as(); } -IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyDependsOn() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship)->as(); } -IfcComplexProperty::list::ptr IfcProperty::PartOfComplex() const { return entity->getInverse(Type::IfcComplexProperty)->as(); } +IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyForDependance() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship, 0)->as(); } +IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyDependsOn() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship, 1)->as(); } +IfcComplexProperty::list::ptr IfcProperty::PartOfComplex() const { return entity->getInverse(Type::IfcComplexProperty, 3)->as(); } bool IfcProperty::is(Type::Enum v) const { return v == Type::IfcProperty; } Type::Enum IfcProperty::type() const { return Type::IfcProperty; } Type::Enum IfcProperty::Class() { return Type::IfcProperty; } @@ -11186,7 +11186,7 @@ IfcPropertyConstraintRelationship::IfcPropertyConstraintRelationship(IfcAbstract IfcPropertyConstraintRelationship::IfcPropertyConstraintRelationship(IfcConstraint* v1_RelatingConstraint, IfcTemplatedEntityList< IfcProperty >::ptr v2_RelatedProperties, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_RelatingConstraint)); e->setArgument(1,(v2_RelatedProperties)->generalize()); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcPropertyDefinition -IfcRelAssociates::list::ptr IfcPropertyDefinition::HasAssociations() const { return entity->getInverse(Type::IfcRelAssociates)->as(); } +IfcRelAssociates::list::ptr IfcPropertyDefinition::HasAssociations() const { return entity->getInverse(Type::IfcRelAssociates, 4)->as(); } bool IfcPropertyDefinition::is(Type::Enum v) const { return v == Type::IfcPropertyDefinition || IfcRoot::is(v); } Type::Enum IfcPropertyDefinition::type() const { return Type::IfcPropertyDefinition; } Type::Enum IfcPropertyDefinition::Class() { return Type::IfcPropertyDefinition; } @@ -11273,8 +11273,8 @@ IfcPropertySet::IfcPropertySet(IfcAbstractEntity* e) : IfcPropertySetDefinition( IfcPropertySet::IfcPropertySet(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, IfcTemplatedEntityList< IfcProperty >::ptr v5_HasProperties) : IfcPropertySetDefinition((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } e->setArgument(4,(v5_HasProperties)->generalize()); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcPropertySetDefinition -IfcRelDefinesByProperties::list::ptr IfcPropertySetDefinition::PropertyDefinitionOf() const { return entity->getInverse(Type::IfcRelDefinesByProperties)->as(); } -IfcTypeObject::list::ptr IfcPropertySetDefinition::DefinesType() const { return entity->getInverse(Type::IfcTypeObject)->as(); } +IfcRelDefinesByProperties::list::ptr IfcPropertySetDefinition::PropertyDefinitionOf() const { return entity->getInverse(Type::IfcRelDefinesByProperties, 5)->as(); } +IfcTypeObject::list::ptr IfcPropertySetDefinition::DefinesType() const { return entity->getInverse(Type::IfcTypeObject, 5)->as(); } bool IfcPropertySetDefinition::is(Type::Enum v) const { return v == Type::IfcPropertySetDefinition || IfcPropertyDefinition::is(v); } Type::Enum IfcPropertySetDefinition::type() const { return Type::IfcPropertySetDefinition; } Type::Enum IfcPropertySetDefinition::Class() { return Type::IfcPropertySetDefinition; } @@ -12197,9 +12197,9 @@ std::string IfcRepresentation::RepresentationType() const { return *entity->getA void IfcRepresentation::setRepresentationType(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } IfcTemplatedEntityList< IfcRepresentationItem >::ptr IfcRepresentation::Items() const { IfcEntityList::ptr es = *entity->getArgument(3); return es->as(); } void IfcRepresentation::setItems(IfcTemplatedEntityList< IfcRepresentationItem >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(3,v->generalize()); } -IfcRepresentationMap::list::ptr IfcRepresentation::RepresentationMap() const { return entity->getInverse(Type::IfcRepresentationMap)->as(); } -IfcPresentationLayerAssignment::list::ptr IfcRepresentation::LayerAssignments() const { return entity->getInverse(Type::IfcPresentationLayerAssignment)->as(); } -IfcProductRepresentation::list::ptr IfcRepresentation::OfProductRepresentation() const { return entity->getInverse(Type::IfcProductRepresentation)->as(); } +IfcRepresentationMap::list::ptr IfcRepresentation::RepresentationMap() const { return entity->getInverse(Type::IfcRepresentationMap, 1)->as(); } +IfcPresentationLayerAssignment::list::ptr IfcRepresentation::LayerAssignments() const { return entity->getInverse(Type::IfcPresentationLayerAssignment, 2)->as(); } +IfcProductRepresentation::list::ptr IfcRepresentation::OfProductRepresentation() const { return entity->getInverse(Type::IfcProductRepresentation, 2)->as(); } bool IfcRepresentation::is(Type::Enum v) const { return v == Type::IfcRepresentation; } Type::Enum IfcRepresentation::type() const { return Type::IfcRepresentation; } Type::Enum IfcRepresentation::Class() { return Type::IfcRepresentation; } @@ -12213,7 +12213,7 @@ void IfcRepresentationContext::setContextIdentifier(std::string v) { if ( ! enti bool IfcRepresentationContext::hasContextType() const { return !entity->getArgument(1)->isNull(); } std::string IfcRepresentationContext::ContextType() const { return *entity->getArgument(1); } void IfcRepresentationContext::setContextType(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcRepresentation::list::ptr IfcRepresentationContext::RepresentationsInContext() const { return entity->getInverse(Type::IfcRepresentation)->as(); } +IfcRepresentation::list::ptr IfcRepresentationContext::RepresentationsInContext() const { return entity->getInverse(Type::IfcRepresentation, 0)->as(); } bool IfcRepresentationContext::is(Type::Enum v) const { return v == Type::IfcRepresentationContext; } Type::Enum IfcRepresentationContext::type() const { return Type::IfcRepresentationContext; } Type::Enum IfcRepresentationContext::Class() { return Type::IfcRepresentationContext; } @@ -12221,8 +12221,8 @@ IfcRepresentationContext::IfcRepresentationContext(IfcAbstractEntity* e) : IfcUt IfcRepresentationContext::IfcRepresentationContext(boost::optional< std::string > v1_ContextIdentifier, boost::optional< std::string > v2_ContextType) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_ContextIdentifier) { e->setArgument(0,(*v1_ContextIdentifier)); } else { e->setArgument(0); } if (v2_ContextType) { e->setArgument(1,(*v2_ContextType)); } else { e->setArgument(1); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcRepresentationItem -IfcPresentationLayerAssignment::list::ptr IfcRepresentationItem::LayerAssignments() const { return entity->getInverse(Type::IfcPresentationLayerAssignment)->as(); } -IfcStyledItem::list::ptr IfcRepresentationItem::StyledByItem() const { return entity->getInverse(Type::IfcStyledItem)->as(); } +IfcPresentationLayerAssignment::list::ptr IfcRepresentationItem::LayerAssignments() const { return entity->getInverse(Type::IfcPresentationLayerAssignment, 2)->as(); } +IfcStyledItem::list::ptr IfcRepresentationItem::StyledByItem() const { return entity->getInverse(Type::IfcStyledItem, 0)->as(); } bool IfcRepresentationItem::is(Type::Enum v) const { return v == Type::IfcRepresentationItem; } Type::Enum IfcRepresentationItem::type() const { return Type::IfcRepresentationItem; } Type::Enum IfcRepresentationItem::Class() { return Type::IfcRepresentationItem; } @@ -12234,7 +12234,7 @@ IfcAxis2Placement* IfcRepresentationMap::MappingOrigin() const { return (IfcAxis void IfcRepresentationMap::setMappingOrigin(IfcAxis2Placement* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } IfcRepresentation* IfcRepresentationMap::MappedRepresentation() const { return (IfcRepresentation*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(1))); } void IfcRepresentationMap::setMappedRepresentation(IfcRepresentation* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcMappedItem::list::ptr IfcRepresentationMap::MapUsage() const { return entity->getInverse(Type::IfcMappedItem)->as(); } +IfcMappedItem::list::ptr IfcRepresentationMap::MapUsage() const { return entity->getInverse(Type::IfcMappedItem, 0)->as(); } bool IfcRepresentationMap::is(Type::Enum v) const { return v == Type::IfcRepresentationMap; } Type::Enum IfcRepresentationMap::type() const { return Type::IfcRepresentationMap; } Type::Enum IfcRepresentationMap::Class() { return Type::IfcRepresentationMap; } @@ -12242,7 +12242,7 @@ IfcRepresentationMap::IfcRepresentationMap(IfcAbstractEntity* e) : IfcUtil::IfcB IfcRepresentationMap::IfcRepresentationMap(IfcAxis2Placement* v1_MappingOrigin, IfcRepresentation* v2_MappedRepresentation) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_MappingOrigin)); e->setArgument(1,(v2_MappedRepresentation)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcResource -IfcRelAssignsToResource::list::ptr IfcResource::ResourceOf() const { return entity->getInverse(Type::IfcRelAssignsToResource)->as(); } +IfcRelAssignsToResource::list::ptr IfcResource::ResourceOf() const { return entity->getInverse(Type::IfcRelAssignsToResource, 6)->as(); } bool IfcResource::is(Type::Enum v) const { return v == Type::IfcResource || IfcObject::is(v); } Type::Enum IfcResource::type() const { return Type::IfcResource; } Type::Enum IfcResource::Class() { return Type::IfcResource; } @@ -12424,7 +12424,7 @@ void IfcScheduleTimeControl::setFinishFloat(double v) { if ( ! entity->isWritabl bool IfcScheduleTimeControl::hasCompletion() const { return !entity->getArgument(22)->isNull(); } double IfcScheduleTimeControl::Completion() const { return *entity->getArgument(22); } void IfcScheduleTimeControl::setCompletion(double v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(22,v); } -IfcRelAssignsTasks::list::ptr IfcScheduleTimeControl::ScheduleTimeControlAssigned() const { return entity->getInverse(Type::IfcRelAssignsTasks)->as(); } +IfcRelAssignsTasks::list::ptr IfcScheduleTimeControl::ScheduleTimeControlAssigned() const { return entity->getInverse(Type::IfcRelAssignsTasks, 7)->as(); } bool IfcScheduleTimeControl::is(Type::Enum v) const { return v == Type::IfcScheduleTimeControl || IfcControl::is(v); } Type::Enum IfcScheduleTimeControl::type() const { return Type::IfcScheduleTimeControl; } Type::Enum IfcScheduleTimeControl::Class() { return Type::IfcScheduleTimeControl; } @@ -12535,7 +12535,7 @@ IfcShapeAspect::IfcShapeAspect(IfcAbstractEntity* e) : IfcUtil::IfcBaseEntity() IfcShapeAspect::IfcShapeAspect(IfcTemplatedEntityList< IfcShapeModel >::ptr v1_ShapeRepresentations, boost::optional< std::string > v2_Name, boost::optional< std::string > v3_Description, bool v4_ProductDefinitional, IfcProductDefinitionShape* v5_PartOfProductDefinitionShape) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_ShapeRepresentations)->generalize()); if (v2_Name) { e->setArgument(1,(*v2_Name)); } else { e->setArgument(1); } if (v3_Description) { e->setArgument(2,(*v3_Description)); } else { e->setArgument(2); } e->setArgument(3,(v4_ProductDefinitional)); e->setArgument(4,(v5_PartOfProductDefinitionShape)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcShapeModel -IfcShapeAspect::list::ptr IfcShapeModel::OfShapeAspect() const { return entity->getInverse(Type::IfcShapeAspect)->as(); } +IfcShapeAspect::list::ptr IfcShapeModel::OfShapeAspect() const { return entity->getInverse(Type::IfcShapeAspect, 0)->as(); } bool IfcShapeModel::is(Type::Enum v) const { return v == Type::IfcShapeModel || IfcRepresentation::is(v); } Type::Enum IfcShapeModel::type() const { return Type::IfcShapeModel; } Type::Enum IfcShapeModel::Class() { return Type::IfcShapeModel; } @@ -12664,8 +12664,8 @@ void IfcSpace::setInteriorOrExteriorSpace(IfcInternalOrExternalEnum::IfcInternal bool IfcSpace::hasElevationWithFlooring() const { return !entity->getArgument(10)->isNull(); } double IfcSpace::ElevationWithFlooring() const { return *entity->getArgument(10); } void IfcSpace::setElevationWithFlooring(double v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(10,v); } -IfcRelCoversSpaces::list::ptr IfcSpace::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversSpaces)->as(); } -IfcRelSpaceBoundary::list::ptr IfcSpace::BoundedBy() const { return entity->getInverse(Type::IfcRelSpaceBoundary)->as(); } +IfcRelCoversSpaces::list::ptr IfcSpace::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversSpaces, 4)->as(); } +IfcRelSpaceBoundary::list::ptr IfcSpace::BoundedBy() const { return entity->getInverse(Type::IfcRelSpaceBoundary, 4)->as(); } bool IfcSpace::is(Type::Enum v) const { return v == Type::IfcSpace || IfcSpatialStructureElement::is(v); } Type::Enum IfcSpace::type() const { return Type::IfcSpace; } Type::Enum IfcSpace::Class() { return Type::IfcSpace; } @@ -12695,8 +12695,8 @@ IfcSpatialStructureElement* IfcSpaceProgram::RequestedLocation() const { return void IfcSpaceProgram::setRequestedLocation(IfcSpatialStructureElement* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } double IfcSpaceProgram::StandardRequiredArea() const { return *entity->getArgument(9); } void IfcSpaceProgram::setStandardRequiredArea(double v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v); } -IfcRelInteractionRequirements::list::ptr IfcSpaceProgram::HasInteractionReqsFrom() const { return entity->getInverse(Type::IfcRelInteractionRequirements)->as(); } -IfcRelInteractionRequirements::list::ptr IfcSpaceProgram::HasInteractionReqsTo() const { return entity->getInverse(Type::IfcRelInteractionRequirements)->as(); } +IfcRelInteractionRequirements::list::ptr IfcSpaceProgram::HasInteractionReqsFrom() const { return entity->getInverse(Type::IfcRelInteractionRequirements, 7)->as(); } +IfcRelInteractionRequirements::list::ptr IfcSpaceProgram::HasInteractionReqsTo() const { return entity->getInverse(Type::IfcRelInteractionRequirements, 8)->as(); } bool IfcSpaceProgram::is(Type::Enum v) const { return v == Type::IfcSpaceProgram || IfcControl::is(v); } Type::Enum IfcSpaceProgram::type() const { return Type::IfcSpaceProgram; } Type::Enum IfcSpaceProgram::Class() { return Type::IfcSpaceProgram; } @@ -12751,9 +12751,9 @@ std::string IfcSpatialStructureElement::LongName() const { return *entity->getAr void IfcSpatialStructureElement::setLongName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } IfcElementCompositionEnum::IfcElementCompositionEnum IfcSpatialStructureElement::CompositionType() const { return IfcElementCompositionEnum::FromString(*entity->getArgument(8)); } void IfcSpatialStructureElement::setCompositionType(IfcElementCompositionEnum::IfcElementCompositionEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v,IfcElementCompositionEnum::ToString(v)); } -IfcRelReferencedInSpatialStructure::list::ptr IfcSpatialStructureElement::ReferencesElements() const { return entity->getInverse(Type::IfcRelReferencedInSpatialStructure)->as(); } -IfcRelServicesBuildings::list::ptr IfcSpatialStructureElement::ServicedBySystems() const { return entity->getInverse(Type::IfcRelServicesBuildings)->as(); } -IfcRelContainedInSpatialStructure::list::ptr IfcSpatialStructureElement::ContainsElements() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure)->as(); } +IfcRelReferencedInSpatialStructure::list::ptr IfcSpatialStructureElement::ReferencesElements() const { return entity->getInverse(Type::IfcRelReferencedInSpatialStructure, 5)->as(); } +IfcRelServicesBuildings::list::ptr IfcSpatialStructureElement::ServicedBySystems() const { return entity->getInverse(Type::IfcRelServicesBuildings, 5)->as(); } +IfcRelContainedInSpatialStructure::list::ptr IfcSpatialStructureElement::ContainsElements() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 5)->as(); } bool IfcSpatialStructureElement::is(Type::Enum v) const { return v == Type::IfcSpatialStructureElement || IfcProduct::is(v); } Type::Enum IfcSpatialStructureElement::type() const { return Type::IfcSpatialStructureElement; } Type::Enum IfcSpatialStructureElement::Class() { return Type::IfcSpatialStructureElement; } @@ -12839,7 +12839,7 @@ IfcStructuralLoad* IfcStructuralActivity::AppliedLoad() const { return (IfcStruc void IfcStructuralActivity::setAppliedLoad(IfcStructuralLoad* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } IfcGlobalOrLocalEnum::IfcGlobalOrLocalEnum IfcStructuralActivity::GlobalOrLocal() const { return IfcGlobalOrLocalEnum::FromString(*entity->getArgument(8)); } void IfcStructuralActivity::setGlobalOrLocal(IfcGlobalOrLocalEnum::IfcGlobalOrLocalEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v,IfcGlobalOrLocalEnum::ToString(v)); } -IfcRelConnectsStructuralActivity::list::ptr IfcStructuralActivity::AssignedToStructuralItem() const { return entity->getInverse(Type::IfcRelConnectsStructuralActivity)->as(); } +IfcRelConnectsStructuralActivity::list::ptr IfcStructuralActivity::AssignedToStructuralItem() const { return entity->getInverse(Type::IfcRelConnectsStructuralActivity, 5)->as(); } bool IfcStructuralActivity::is(Type::Enum v) const { return v == Type::IfcStructuralActivity || IfcProduct::is(v); } Type::Enum IfcStructuralActivity::type() const { return Type::IfcStructuralActivity; } Type::Enum IfcStructuralActivity::Class() { return Type::IfcStructuralActivity; } @@ -12868,7 +12868,7 @@ IfcStructuralAnalysisModel::IfcStructuralAnalysisModel(std::string v1_GlobalId, bool IfcStructuralConnection::hasAppliedCondition() const { return !entity->getArgument(7)->isNull(); } IfcBoundaryCondition* IfcStructuralConnection::AppliedCondition() const { return (IfcBoundaryCondition*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(7))); } void IfcStructuralConnection::setAppliedCondition(IfcBoundaryCondition* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcRelConnectsStructuralMember::list::ptr IfcStructuralConnection::ConnectsStructuralMembers() const { return entity->getInverse(Type::IfcRelConnectsStructuralMember)->as(); } +IfcRelConnectsStructuralMember::list::ptr IfcStructuralConnection::ConnectsStructuralMembers() const { return entity->getInverse(Type::IfcRelConnectsStructuralMember, 5)->as(); } bool IfcStructuralConnection::is(Type::Enum v) const { return v == Type::IfcStructuralConnection || IfcStructuralItem::is(v); } Type::Enum IfcStructuralConnection::type() const { return Type::IfcStructuralConnection; } Type::Enum IfcStructuralConnection::Class() { return Type::IfcStructuralConnection; } @@ -12909,7 +12909,7 @@ IfcStructuralCurveMemberVarying::IfcStructuralCurveMemberVarying(IfcAbstractEnti IfcStructuralCurveMemberVarying::IfcStructuralCurveMemberVarying(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, IfcStructuralCurveTypeEnum::IfcStructuralCurveTypeEnum v8_PredefinedType) : IfcStructuralCurveMember((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); e->setArgument(7,v8_PredefinedType,IfcStructuralCurveTypeEnum::ToString(v8_PredefinedType)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcStructuralItem -IfcRelConnectsStructuralActivity::list::ptr IfcStructuralItem::AssignedStructuralActivity() const { return entity->getInverse(Type::IfcRelConnectsStructuralActivity)->as(); } +IfcRelConnectsStructuralActivity::list::ptr IfcStructuralItem::AssignedStructuralActivity() const { return entity->getInverse(Type::IfcRelConnectsStructuralActivity, 4)->as(); } bool IfcStructuralItem::is(Type::Enum v) const { return v == Type::IfcStructuralItem || IfcProduct::is(v); } Type::Enum IfcStructuralItem::type() const { return Type::IfcStructuralItem; } Type::Enum IfcStructuralItem::Class() { return Type::IfcStructuralItem; } @@ -12959,8 +12959,8 @@ void IfcStructuralLoadGroup::setCoefficient(double v) { if ( ! entity->isWritabl bool IfcStructuralLoadGroup::hasPurpose() const { return !entity->getArgument(9)->isNull(); } std::string IfcStructuralLoadGroup::Purpose() const { return *entity->getArgument(9); } void IfcStructuralLoadGroup::setPurpose(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v); } -IfcStructuralResultGroup::list::ptr IfcStructuralLoadGroup::SourceOfResultGroup() const { return entity->getInverse(Type::IfcStructuralResultGroup)->as(); } -IfcStructuralAnalysisModel::list::ptr IfcStructuralLoadGroup::LoadGroupFor() const { return entity->getInverse(Type::IfcStructuralAnalysisModel)->as(); } +IfcStructuralResultGroup::list::ptr IfcStructuralLoadGroup::SourceOfResultGroup() const { return entity->getInverse(Type::IfcStructuralResultGroup, 6)->as(); } +IfcStructuralAnalysisModel::list::ptr IfcStructuralLoadGroup::LoadGroupFor() const { return entity->getInverse(Type::IfcStructuralAnalysisModel, 7)->as(); } bool IfcStructuralLoadGroup::is(Type::Enum v) const { return v == Type::IfcStructuralLoadGroup || IfcGroup::is(v); } Type::Enum IfcStructuralLoadGroup::type() const { return Type::IfcStructuralLoadGroup; } Type::Enum IfcStructuralLoadGroup::Class() { return Type::IfcStructuralLoadGroup; } @@ -13102,8 +13102,8 @@ IfcStructuralLoadTemperature::IfcStructuralLoadTemperature(IfcAbstractEntity* e) IfcStructuralLoadTemperature::IfcStructuralLoadTemperature(boost::optional< std::string > v1_Name, boost::optional< double > v2_DeltaT_Constant, boost::optional< double > v3_DeltaT_Y, boost::optional< double > v4_DeltaT_Z) : IfcStructuralLoadStatic((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_DeltaT_Constant) { e->setArgument(1,(*v2_DeltaT_Constant)); } else { e->setArgument(1); } if (v3_DeltaT_Y) { e->setArgument(2,(*v3_DeltaT_Y)); } else { e->setArgument(2); } if (v4_DeltaT_Z) { e->setArgument(3,(*v4_DeltaT_Z)); } else { e->setArgument(3); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcStructuralMember -IfcRelConnectsStructuralElement::list::ptr IfcStructuralMember::ReferencesElement() const { return entity->getInverse(Type::IfcRelConnectsStructuralElement)->as(); } -IfcRelConnectsStructuralMember::list::ptr IfcStructuralMember::ConnectedBy() const { return entity->getInverse(Type::IfcRelConnectsStructuralMember)->as(); } +IfcRelConnectsStructuralElement::list::ptr IfcStructuralMember::ReferencesElement() const { return entity->getInverse(Type::IfcRelConnectsStructuralElement, 5)->as(); } +IfcRelConnectsStructuralMember::list::ptr IfcStructuralMember::ConnectedBy() const { return entity->getInverse(Type::IfcRelConnectsStructuralMember, 4)->as(); } bool IfcStructuralMember::is(Type::Enum v) const { return v == Type::IfcStructuralMember || IfcStructuralItem::is(v); } Type::Enum IfcStructuralMember::type() const { return Type::IfcStructuralMember; } Type::Enum IfcStructuralMember::Class() { return Type::IfcStructuralMember; } @@ -13207,7 +13207,7 @@ IfcStructuralProfileProperties::IfcStructuralProfileProperties(IfcAbstractEntity IfcStructuralProfileProperties::IfcStructuralProfileProperties(boost::optional< std::string > v1_ProfileName, IfcProfileDef* v2_ProfileDefinition, boost::optional< double > v3_PhysicalWeight, boost::optional< double > v4_Perimeter, boost::optional< double > v5_MinimumPlateThickness, boost::optional< double > v6_MaximumPlateThickness, boost::optional< double > v7_CrossSectionArea, boost::optional< double > v8_TorsionalConstantX, boost::optional< double > v9_MomentOfInertiaYZ, boost::optional< double > v10_MomentOfInertiaY, boost::optional< double > v11_MomentOfInertiaZ, boost::optional< double > v12_WarpingConstant, boost::optional< double > v13_ShearCentreZ, boost::optional< double > v14_ShearCentreY, boost::optional< double > v15_ShearDeformationAreaZ, boost::optional< double > v16_ShearDeformationAreaY, boost::optional< double > v17_MaximumSectionModulusY, boost::optional< double > v18_MinimumSectionModulusY, boost::optional< double > v19_MaximumSectionModulusZ, boost::optional< double > v20_MinimumSectionModulusZ, boost::optional< double > v21_TorsionalSectionModulus, boost::optional< double > v22_CentreOfGravityInX, boost::optional< double > v23_CentreOfGravityInY) : IfcGeneralProfileProperties((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_ProfileName) { e->setArgument(0,(*v1_ProfileName)); } else { e->setArgument(0); } e->setArgument(1,(v2_ProfileDefinition)); if (v3_PhysicalWeight) { e->setArgument(2,(*v3_PhysicalWeight)); } else { e->setArgument(2); } if (v4_Perimeter) { e->setArgument(3,(*v4_Perimeter)); } else { e->setArgument(3); } if (v5_MinimumPlateThickness) { e->setArgument(4,(*v5_MinimumPlateThickness)); } else { e->setArgument(4); } if (v6_MaximumPlateThickness) { e->setArgument(5,(*v6_MaximumPlateThickness)); } else { e->setArgument(5); } if (v7_CrossSectionArea) { e->setArgument(6,(*v7_CrossSectionArea)); } else { e->setArgument(6); } if (v8_TorsionalConstantX) { e->setArgument(7,(*v8_TorsionalConstantX)); } else { e->setArgument(7); } if (v9_MomentOfInertiaYZ) { e->setArgument(8,(*v9_MomentOfInertiaYZ)); } else { e->setArgument(8); } if (v10_MomentOfInertiaY) { e->setArgument(9,(*v10_MomentOfInertiaY)); } else { e->setArgument(9); } if (v11_MomentOfInertiaZ) { e->setArgument(10,(*v11_MomentOfInertiaZ)); } else { e->setArgument(10); } if (v12_WarpingConstant) { e->setArgument(11,(*v12_WarpingConstant)); } else { e->setArgument(11); } if (v13_ShearCentreZ) { e->setArgument(12,(*v13_ShearCentreZ)); } else { e->setArgument(12); } if (v14_ShearCentreY) { e->setArgument(13,(*v14_ShearCentreY)); } else { e->setArgument(13); } if (v15_ShearDeformationAreaZ) { e->setArgument(14,(*v15_ShearDeformationAreaZ)); } else { e->setArgument(14); } if (v16_ShearDeformationAreaY) { e->setArgument(15,(*v16_ShearDeformationAreaY)); } else { e->setArgument(15); } if (v17_MaximumSectionModulusY) { e->setArgument(16,(*v17_MaximumSectionModulusY)); } else { e->setArgument(16); } if (v18_MinimumSectionModulusY) { e->setArgument(17,(*v18_MinimumSectionModulusY)); } else { e->setArgument(17); } if (v19_MaximumSectionModulusZ) { e->setArgument(18,(*v19_MaximumSectionModulusZ)); } else { e->setArgument(18); } if (v20_MinimumSectionModulusZ) { e->setArgument(19,(*v20_MinimumSectionModulusZ)); } else { e->setArgument(19); } if (v21_TorsionalSectionModulus) { e->setArgument(20,(*v21_TorsionalSectionModulus)); } else { e->setArgument(20); } if (v22_CentreOfGravityInX) { e->setArgument(21,(*v22_CentreOfGravityInX)); } else { e->setArgument(21); } if (v23_CentreOfGravityInY) { e->setArgument(22,(*v23_CentreOfGravityInY)); } else { e->setArgument(22); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcStructuralReaction -IfcStructuralAction::list::ptr IfcStructuralReaction::Causes() const { return entity->getInverse(Type::IfcStructuralAction)->as(); } +IfcStructuralAction::list::ptr IfcStructuralReaction::Causes() const { return entity->getInverse(Type::IfcStructuralAction, 10)->as(); } bool IfcStructuralReaction::is(Type::Enum v) const { return v == Type::IfcStructuralReaction || IfcStructuralActivity::is(v); } Type::Enum IfcStructuralReaction::type() const { return Type::IfcStructuralReaction; } Type::Enum IfcStructuralReaction::Class() { return Type::IfcStructuralReaction; } @@ -13222,7 +13222,7 @@ IfcStructuralLoadGroup* IfcStructuralResultGroup::ResultForLoadGroup() const { r void IfcStructuralResultGroup::setResultForLoadGroup(IfcStructuralLoadGroup* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } bool IfcStructuralResultGroup::IsLinear() const { return *entity->getArgument(7); } void IfcStructuralResultGroup::setIsLinear(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcStructuralAnalysisModel::list::ptr IfcStructuralResultGroup::ResultGroupFor() const { return entity->getInverse(Type::IfcStructuralAnalysisModel)->as(); } +IfcStructuralAnalysisModel::list::ptr IfcStructuralResultGroup::ResultGroupFor() const { return entity->getInverse(Type::IfcStructuralAnalysisModel, 8)->as(); } bool IfcStructuralResultGroup::is(Type::Enum v) const { return v == Type::IfcStructuralResultGroup || IfcGroup::is(v); } Type::Enum IfcStructuralResultGroup::type() const { return Type::IfcStructuralResultGroup; } Type::Enum IfcStructuralResultGroup::Class() { return Type::IfcStructuralResultGroup; } @@ -13540,7 +13540,7 @@ IfcSymbolStyle::IfcSymbolStyle(IfcAbstractEntity* e) : IfcPresentationStyle((Ifc IfcSymbolStyle::IfcSymbolStyle(boost::optional< std::string > v1_Name, IfcSymbolStyleSelect* v2_StyleOfSymbol) : IfcPresentationStyle((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } e->setArgument(1,(v2_StyleOfSymbol)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcSystem -IfcRelServicesBuildings::list::ptr IfcSystem::ServicesBuildings() const { return entity->getInverse(Type::IfcRelServicesBuildings)->as(); } +IfcRelServicesBuildings::list::ptr IfcSystem::ServicesBuildings() const { return entity->getInverse(Type::IfcRelServicesBuildings, 4)->as(); } bool IfcSystem::is(Type::Enum v) const { return v == Type::IfcSystem || IfcGroup::is(v); } Type::Enum IfcSystem::type() const { return Type::IfcSystem; } Type::Enum IfcSystem::Class() { return Type::IfcSystem; } @@ -13603,7 +13603,7 @@ IfcEntityList::ptr IfcTableRow::RowCells() const { return *entity->getArgument(0 void IfcTableRow::setRowCells(IfcEntityList::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } bool IfcTableRow::IsHeading() const { return *entity->getArgument(1); } void IfcTableRow::setIsHeading(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcTable::list::ptr IfcTableRow::OfTable() const { return entity->getInverse(Type::IfcTable)->as(); } +IfcTable::list::ptr IfcTableRow::OfTable() const { return entity->getInverse(Type::IfcTable, 1)->as(); } bool IfcTableRow::is(Type::Enum v) const { return v == Type::IfcTableRow; } Type::Enum IfcTableRow::type() const { return Type::IfcTableRow; } Type::Enum IfcTableRow::Class() { return Type::IfcTableRow; } @@ -13828,7 +13828,7 @@ IfcTextStyleWithBoxCharacteristics::IfcTextStyleWithBoxCharacteristics(IfcAbstra IfcTextStyleWithBoxCharacteristics::IfcTextStyleWithBoxCharacteristics(boost::optional< double > v1_BoxHeight, boost::optional< double > v2_BoxWidth, boost::optional< double > v3_BoxSlantAngle, boost::optional< double > v4_BoxRotateAngle, IfcSizeSelect* v5_CharacterSpacing) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_BoxHeight) { e->setArgument(0,(*v1_BoxHeight)); } else { e->setArgument(0); } if (v2_BoxWidth) { e->setArgument(1,(*v2_BoxWidth)); } else { e->setArgument(1); } if (v3_BoxSlantAngle) { e->setArgument(2,(*v3_BoxSlantAngle)); } else { e->setArgument(2); } if (v4_BoxRotateAngle) { e->setArgument(3,(*v4_BoxRotateAngle)); } else { e->setArgument(3); } e->setArgument(4,(v5_CharacterSpacing)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcTextureCoordinate -IfcAnnotationSurface::list::ptr IfcTextureCoordinate::AnnotatedSurface() const { return entity->getInverse(Type::IfcAnnotationSurface)->as(); } +IfcAnnotationSurface::list::ptr IfcTextureCoordinate::AnnotatedSurface() const { return entity->getInverse(Type::IfcAnnotationSurface, 1)->as(); } bool IfcTextureCoordinate::is(Type::Enum v) const { return v == Type::IfcTextureCoordinate; } Type::Enum IfcTextureCoordinate::type() const { return Type::IfcTextureCoordinate; } Type::Enum IfcTextureCoordinate::Class() { return Type::IfcTextureCoordinate; } @@ -13903,7 +13903,7 @@ void IfcTimeSeries::setUserDefinedDataOrigin(std::string v) { if ( ! entity->isW bool IfcTimeSeries::hasUnit() const { return !entity->getArgument(7)->isNull(); } IfcUnit* IfcTimeSeries::Unit() const { return (IfcUnit*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(7))); } void IfcTimeSeries::setUnit(IfcUnit* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcTimeSeriesReferenceRelationship::list::ptr IfcTimeSeries::DocumentedBy() const { return entity->getInverse(Type::IfcTimeSeriesReferenceRelationship)->as(); } +IfcTimeSeriesReferenceRelationship::list::ptr IfcTimeSeries::DocumentedBy() const { return entity->getInverse(Type::IfcTimeSeriesReferenceRelationship, 0)->as(); } bool IfcTimeSeries::is(Type::Enum v) const { return v == Type::IfcTimeSeries; } Type::Enum IfcTimeSeries::type() const { return Type::IfcTimeSeries; } Type::Enum IfcTimeSeries::Class() { return Type::IfcTimeSeries; } @@ -14049,7 +14049,7 @@ void IfcTypeObject::setApplicableOccurrence(std::string v) { if ( ! entity->isWr bool IfcTypeObject::hasHasPropertySets() const { return !entity->getArgument(5)->isNull(); } IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr IfcTypeObject::HasPropertySets() const { IfcEntityList::ptr es = *entity->getArgument(5); return es->as(); } void IfcTypeObject::setHasPropertySets(IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v->generalize()); } -IfcRelDefinesByType::list::ptr IfcTypeObject::ObjectTypeOf() const { return entity->getInverse(Type::IfcRelDefinesByType)->as(); } +IfcRelDefinesByType::list::ptr IfcTypeObject::ObjectTypeOf() const { return entity->getInverse(Type::IfcRelDefinesByType, 5)->as(); } bool IfcTypeObject::is(Type::Enum v) const { return v == Type::IfcTypeObject || IfcObjectDefinition::is(v); } Type::Enum IfcTypeObject::type() const { return Type::IfcTypeObject; } Type::Enum IfcTypeObject::Class() { return Type::IfcTypeObject; } diff --git a/src/ifcparse/Ifc4.cpp b/src/ifcparse/Ifc4.cpp index fa126f9437..11a59bc0b5 100644 --- a/src/ifcparse/Ifc4.cpp +++ b/src/ifcparse/Ifc4.cpp @@ -7789,7 +7789,7 @@ IfcActionRequest::IfcActionRequest(std::string v1_GlobalId, IfcOwnerHistory* v2_ // Function implementations for IfcActor IfcActorSelect* IfcActor::TheActor() const { return (IfcActorSelect*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(5))); } void IfcActor::setTheActor(IfcActorSelect* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcRelAssignsToActor::list::ptr IfcActor::IsActingUpon() const { return entity->getInverse(Type::IfcRelAssignsToActor)->as(); } +IfcRelAssignsToActor::list::ptr IfcActor::IsActingUpon() const { return entity->getInverse(Type::IfcRelAssignsToActor, 6)->as(); } bool IfcActor::is(Type::Enum v) const { return v == Type::IfcActor || IfcObject::is(v); } Type::Enum IfcActor::type() const { return Type::IfcActor; } Type::Enum IfcActor::Class() { return Type::IfcActor; } @@ -7805,7 +7805,7 @@ void IfcActorRole::setUserDefinedRole(std::string v) { if ( ! entity->isWritable bool IfcActorRole::hasDescription() const { return !entity->getArgument(2)->isNull(); } std::string IfcActorRole::Description() const { return *entity->getArgument(2); } void IfcActorRole::setDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcExternalReferenceRelationship::list::ptr IfcActorRole::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcActorRole::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } bool IfcActorRole::is(Type::Enum v) const { return v == Type::IfcActorRole; } Type::Enum IfcActorRole::type() const { return Type::IfcActorRole; } Type::Enum IfcActorRole::Class() { return Type::IfcActorRole; } @@ -7841,8 +7841,8 @@ void IfcAddress::setDescription(std::string v) { if ( ! entity->isWritable() ) { bool IfcAddress::hasUserDefinedPurpose() const { return !entity->getArgument(2)->isNull(); } std::string IfcAddress::UserDefinedPurpose() const { return *entity->getArgument(2); } void IfcAddress::setUserDefinedPurpose(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcPerson::list::ptr IfcAddress::OfPerson() const { return entity->getInverse(Type::IfcPerson)->as(); } -IfcOrganization::list::ptr IfcAddress::OfOrganization() const { return entity->getInverse(Type::IfcOrganization)->as(); } +IfcPerson::list::ptr IfcAddress::OfPerson() const { return entity->getInverse(Type::IfcPerson, 7)->as(); } +IfcOrganization::list::ptr IfcAddress::OfOrganization() const { return entity->getInverse(Type::IfcOrganization, 4)->as(); } bool IfcAddress::is(Type::Enum v) const { return v == Type::IfcAddress; } Type::Enum IfcAddress::type() const { return Type::IfcAddress; } Type::Enum IfcAddress::Class() { return Type::IfcAddress; } @@ -7949,7 +7949,7 @@ IfcAlarmType::IfcAlarmType(IfcAbstractEntity* e) : IfcDistributionControlElement IfcAlarmType::IfcAlarmType(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType, IfcAlarmTypeEnum::IfcAlarmTypeEnum v10_PredefinedType) : IfcDistributionControlElementType((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ApplicableOccurrence) { e->setArgument(4,(*v5_ApplicableOccurrence)); } else { e->setArgument(4); } if (v6_HasPropertySets) { e->setArgument(5,(*v6_HasPropertySets)->generalize()); } else { e->setArgument(5); } if (v7_RepresentationMaps) { e->setArgument(6,(*v7_RepresentationMaps)->generalize()); } else { e->setArgument(6); } if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } if (v9_ElementType) { e->setArgument(8,(*v9_ElementType)); } else { e->setArgument(8); } e->setArgument(9,v10_PredefinedType,IfcAlarmTypeEnum::ToString(v10_PredefinedType)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcAnnotation -IfcRelContainedInSpatialStructure::list::ptr IfcAnnotation::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure)->as(); } +IfcRelContainedInSpatialStructure::list::ptr IfcAnnotation::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 4)->as(); } bool IfcAnnotation::is(Type::Enum v) const { return v == Type::IfcAnnotation || IfcProduct::is(v); } Type::Enum IfcAnnotation::type() const { return Type::IfcAnnotation; } Type::Enum IfcAnnotation::Class() { return Type::IfcAnnotation; } @@ -8014,7 +8014,7 @@ void IfcAppliedValue::setArithmeticOperator(IfcArithmeticOperatorEnum::IfcArithm bool IfcAppliedValue::hasComponents() const { return !entity->getArgument(9)->isNull(); } IfcTemplatedEntityList< IfcAppliedValue >::ptr IfcAppliedValue::Components() const { IfcEntityList::ptr es = *entity->getArgument(9); return es->as(); } void IfcAppliedValue::setComponents(IfcTemplatedEntityList< IfcAppliedValue >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v->generalize()); } -IfcExternalReferenceRelationship::list::ptr IfcAppliedValue::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcAppliedValue::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } bool IfcAppliedValue::is(Type::Enum v) const { return v == Type::IfcAppliedValue; } Type::Enum IfcAppliedValue::type() const { return Type::IfcAppliedValue; } Type::Enum IfcAppliedValue::Class() { return Type::IfcAppliedValue; } @@ -8049,11 +8049,11 @@ void IfcApproval::setRequestingApproval(IfcActorSelect* v) { if ( ! entity->isWr bool IfcApproval::hasGivingApproval() const { return !entity->getArgument(8)->isNull(); } IfcActorSelect* IfcApproval::GivingApproval() const { return (IfcActorSelect*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(8))); } void IfcApproval::setGivingApproval(IfcActorSelect* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } -IfcExternalReferenceRelationship::list::ptr IfcApproval::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } -IfcRelAssociatesApproval::list::ptr IfcApproval::ApprovedObjects() const { return entity->getInverse(Type::IfcRelAssociatesApproval)->as(); } -IfcResourceApprovalRelationship::list::ptr IfcApproval::ApprovedResources() const { return entity->getInverse(Type::IfcResourceApprovalRelationship)->as(); } -IfcApprovalRelationship::list::ptr IfcApproval::IsRelatedWith() const { return entity->getInverse(Type::IfcApprovalRelationship)->as(); } -IfcApprovalRelationship::list::ptr IfcApproval::Relates() const { return entity->getInverse(Type::IfcApprovalRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcApproval::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } +IfcRelAssociatesApproval::list::ptr IfcApproval::ApprovedObjects() const { return entity->getInverse(Type::IfcRelAssociatesApproval, 5)->as(); } +IfcResourceApprovalRelationship::list::ptr IfcApproval::ApprovedResources() const { return entity->getInverse(Type::IfcResourceApprovalRelationship, 3)->as(); } +IfcApprovalRelationship::list::ptr IfcApproval::IsRelatedWith() const { return entity->getInverse(Type::IfcApprovalRelationship, 3)->as(); } +IfcApprovalRelationship::list::ptr IfcApproval::Relates() const { return entity->getInverse(Type::IfcApprovalRelationship, 2)->as(); } bool IfcApproval::is(Type::Enum v) const { return v == Type::IfcApproval; } Type::Enum IfcApproval::type() const { return Type::IfcApproval; } Type::Enum IfcApproval::Class() { return Type::IfcApproval; } @@ -8525,7 +8525,7 @@ IfcBuilding::IfcBuilding(IfcAbstractEntity* e) : IfcSpatialStructureElement((Ifc IfcBuilding::IfcBuilding(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_LongName, boost::optional< IfcElementCompositionEnum::IfcElementCompositionEnum > v9_CompositionType, boost::optional< double > v10_ElevationOfRefHeight, boost::optional< double > v11_ElevationOfTerrain, IfcPostalAddress* v12_BuildingAddress) : IfcSpatialStructureElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_LongName) { e->setArgument(7,(*v8_LongName)); } else { e->setArgument(7); } if (v9_CompositionType) { e->setArgument(8,*v9_CompositionType,IfcElementCompositionEnum::ToString(*v9_CompositionType)); } else { e->setArgument(8); } if (v10_ElevationOfRefHeight) { e->setArgument(9,(*v10_ElevationOfRefHeight)); } else { e->setArgument(9); } if (v11_ElevationOfTerrain) { e->setArgument(10,(*v11_ElevationOfTerrain)); } else { e->setArgument(10); } e->setArgument(11,(v12_BuildingAddress)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcBuildingElement -IfcRelCoversBldgElements::list::ptr IfcBuildingElement::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversBldgElements)->as(); } +IfcRelCoversBldgElements::list::ptr IfcBuildingElement::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversBldgElements, 4)->as(); } bool IfcBuildingElement::is(Type::Enum v) const { return v == Type::IfcBuildingElement || IfcElement::is(v); } Type::Enum IfcBuildingElement::type() const { return Type::IfcBuildingElement; } Type::Enum IfcBuildingElement::Class() { return Type::IfcBuildingElement; } @@ -8900,8 +8900,8 @@ void IfcClassification::setLocation(std::string v) { if ( ! entity->isWritable() bool IfcClassification::hasReferenceTokens() const { return !entity->getArgument(6)->isNull(); } std::vector< std::string > /*[1:?]*/ IfcClassification::ReferenceTokens() const { return *entity->getArgument(6); } void IfcClassification::setReferenceTokens(std::vector< std::string > /*[1:?]*/ v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcRelAssociatesClassification::list::ptr IfcClassification::ClassificationForObjects() const { return entity->getInverse(Type::IfcRelAssociatesClassification)->as(); } -IfcClassificationReference::list::ptr IfcClassification::HasReferences() const { return entity->getInverse(Type::IfcClassificationReference)->as(); } +IfcRelAssociatesClassification::list::ptr IfcClassification::ClassificationForObjects() const { return entity->getInverse(Type::IfcRelAssociatesClassification, 5)->as(); } +IfcClassificationReference::list::ptr IfcClassification::HasReferences() const { return entity->getInverse(Type::IfcClassificationReference, 3)->as(); } bool IfcClassification::is(Type::Enum v) const { return v == Type::IfcClassification || IfcExternalInformation::is(v); } Type::Enum IfcClassification::type() const { return Type::IfcClassification; } Type::Enum IfcClassification::Class() { return Type::IfcClassification; } @@ -8918,8 +8918,8 @@ void IfcClassificationReference::setDescription(std::string v) { if ( ! entity-> bool IfcClassificationReference::hasSort() const { return !entity->getArgument(5)->isNull(); } std::string IfcClassificationReference::Sort() const { return *entity->getArgument(5); } void IfcClassificationReference::setSort(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcRelAssociatesClassification::list::ptr IfcClassificationReference::ClassificationRefForObjects() const { return entity->getInverse(Type::IfcRelAssociatesClassification)->as(); } -IfcClassificationReference::list::ptr IfcClassificationReference::HasReferences() const { return entity->getInverse(Type::IfcClassificationReference)->as(); } +IfcRelAssociatesClassification::list::ptr IfcClassificationReference::ClassificationRefForObjects() const { return entity->getInverse(Type::IfcRelAssociatesClassification, 5)->as(); } +IfcClassificationReference::list::ptr IfcClassificationReference::HasReferences() const { return entity->getInverse(Type::IfcClassificationReference, 3)->as(); } bool IfcClassificationReference::is(Type::Enum v) const { return v == Type::IfcClassificationReference || IfcExternalReference::is(v); } Type::Enum IfcClassificationReference::type() const { return Type::IfcClassificationReference; } Type::Enum IfcClassificationReference::Class() { return Type::IfcClassificationReference; } @@ -9079,7 +9079,7 @@ bool IfcCompositeCurveSegment::SameSense() const { return *entity->getArgument(1 void IfcCompositeCurveSegment::setSameSense(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } IfcCurve* IfcCompositeCurveSegment::ParentCurve() const { return (IfcCurve*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(2))); } void IfcCompositeCurveSegment::setParentCurve(IfcCurve* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcCompositeCurve::list::ptr IfcCompositeCurveSegment::UsingCurves() const { return entity->getInverse(Type::IfcCompositeCurve)->as(); } +IfcCompositeCurve::list::ptr IfcCompositeCurveSegment::UsingCurves() const { return entity->getInverse(Type::IfcCompositeCurve, 0)->as(); } bool IfcCompositeCurveSegment::is(Type::Enum v) const { return v == Type::IfcCompositeCurveSegment || IfcGeometricRepresentationItem::is(v); } Type::Enum IfcCompositeCurveSegment::type() const { return Type::IfcCompositeCurveSegment; } Type::Enum IfcCompositeCurveSegment::Class() { return Type::IfcCompositeCurveSegment; } @@ -9245,8 +9245,8 @@ void IfcConstraint::setCreationTime(std::string v) { if ( ! entity->isWritable() bool IfcConstraint::hasUserDefinedGrade() const { return !entity->getArgument(6)->isNull(); } std::string IfcConstraint::UserDefinedGrade() const { return *entity->getArgument(6); } void IfcConstraint::setUserDefinedGrade(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcExternalReferenceRelationship::list::ptr IfcConstraint::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } -IfcResourceConstraintRelationship::list::ptr IfcConstraint::PropertiesForConstraint() const { return entity->getInverse(Type::IfcResourceConstraintRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcConstraint::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } +IfcResourceConstraintRelationship::list::ptr IfcConstraint::PropertiesForConstraint() const { return entity->getInverse(Type::IfcResourceConstraintRelationship, 2)->as(); } bool IfcConstraint::is(Type::Enum v) const { return v == Type::IfcConstraint; } Type::Enum IfcConstraint::type() const { return Type::IfcConstraint; } Type::Enum IfcConstraint::Class() { return Type::IfcConstraint; } @@ -9355,8 +9355,8 @@ void IfcContext::setRepresentationContexts(IfcTemplatedEntityList< IfcRepresenta bool IfcContext::hasUnitsInContext() const { return !entity->getArgument(8)->isNull(); } IfcUnitAssignment* IfcContext::UnitsInContext() const { return (IfcUnitAssignment*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(8))); } void IfcContext::setUnitsInContext(IfcUnitAssignment* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } -IfcRelDefinesByProperties::list::ptr IfcContext::IsDefinedBy() const { return entity->getInverse(Type::IfcRelDefinesByProperties)->as(); } -IfcRelDeclares::list::ptr IfcContext::Declares() const { return entity->getInverse(Type::IfcRelDeclares)->as(); } +IfcRelDefinesByProperties::list::ptr IfcContext::IsDefinedBy() const { return entity->getInverse(Type::IfcRelDefinesByProperties, 4)->as(); } +IfcRelDeclares::list::ptr IfcContext::Declares() const { return entity->getInverse(Type::IfcRelDeclares, 4)->as(); } bool IfcContext::is(Type::Enum v) const { return v == Type::IfcContext || IfcObjectDefinition::is(v); } Type::Enum IfcContext::type() const { return Type::IfcContext; } Type::Enum IfcContext::Class() { return Type::IfcContext; } @@ -9366,7 +9366,7 @@ IfcContext::IfcContext(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory // Function implementations for IfcContextDependentUnit std::string IfcContextDependentUnit::Name() const { return *entity->getArgument(2); } void IfcContextDependentUnit::setName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcExternalReferenceRelationship::list::ptr IfcContextDependentUnit::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcContextDependentUnit::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } bool IfcContextDependentUnit::is(Type::Enum v) const { return v == Type::IfcContextDependentUnit || IfcNamedUnit::is(v); } Type::Enum IfcContextDependentUnit::type() const { return Type::IfcContextDependentUnit; } Type::Enum IfcContextDependentUnit::Class() { return Type::IfcContextDependentUnit; } @@ -9377,7 +9377,7 @@ IfcContextDependentUnit::IfcContextDependentUnit(IfcDimensionalExponents* v1_Dim bool IfcControl::hasIdentification() const { return !entity->getArgument(5)->isNull(); } std::string IfcControl::Identification() const { return *entity->getArgument(5); } void IfcControl::setIdentification(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcRelAssignsToControl::list::ptr IfcControl::Controls() const { return entity->getInverse(Type::IfcRelAssignsToControl)->as(); } +IfcRelAssignsToControl::list::ptr IfcControl::Controls() const { return entity->getInverse(Type::IfcRelAssignsToControl, 6)->as(); } bool IfcControl::is(Type::Enum v) const { return v == Type::IfcControl || IfcObject::is(v); } Type::Enum IfcControl::type() const { return Type::IfcControl; } Type::Enum IfcControl::Class() { return Type::IfcControl; } @@ -9408,7 +9408,7 @@ std::string IfcConversionBasedUnit::Name() const { return *entity->getArgument(2 void IfcConversionBasedUnit::setName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } IfcMeasureWithUnit* IfcConversionBasedUnit::ConversionFactor() const { return (IfcMeasureWithUnit*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(3))); } void IfcConversionBasedUnit::setConversionFactor(IfcMeasureWithUnit* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(3,v); } -IfcExternalReferenceRelationship::list::ptr IfcConversionBasedUnit::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcConversionBasedUnit::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } bool IfcConversionBasedUnit::is(Type::Enum v) const { return v == Type::IfcConversionBasedUnit || IfcNamedUnit::is(v); } Type::Enum IfcConversionBasedUnit::type() const { return Type::IfcConversionBasedUnit; } Type::Enum IfcConversionBasedUnit::Class() { return Type::IfcConversionBasedUnit; } @@ -9537,8 +9537,8 @@ IfcCostValue::IfcCostValue(boost::optional< std::string > v1_Name, boost::option bool IfcCovering::hasPredefinedType() const { return !entity->getArgument(8)->isNull(); } IfcCoveringTypeEnum::IfcCoveringTypeEnum IfcCovering::PredefinedType() const { return IfcCoveringTypeEnum::FromString(*entity->getArgument(8)); } void IfcCovering::setPredefinedType(IfcCoveringTypeEnum::IfcCoveringTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v,IfcCoveringTypeEnum::ToString(v)); } -IfcRelCoversSpaces::list::ptr IfcCovering::CoversSpaces() const { return entity->getInverse(Type::IfcRelCoversSpaces)->as(); } -IfcRelCoversBldgElements::list::ptr IfcCovering::CoversElements() const { return entity->getInverse(Type::IfcRelCoversBldgElements)->as(); } +IfcRelCoversSpaces::list::ptr IfcCovering::CoversSpaces() const { return entity->getInverse(Type::IfcRelCoversSpaces, 5)->as(); } +IfcRelCoversBldgElements::list::ptr IfcCovering::CoversElements() const { return entity->getInverse(Type::IfcRelCoversBldgElements, 5)->as(); } bool IfcCovering::is(Type::Enum v) const { return v == Type::IfcCovering || IfcBuildingElement::is(v); } Type::Enum IfcCovering::type() const { return Type::IfcCovering; } Type::Enum IfcCovering::Class() { return Type::IfcCovering; } @@ -9861,7 +9861,7 @@ IfcDistributionCircuit::IfcDistributionCircuit(IfcAbstractEntity* e) : IfcDistri IfcDistributionCircuit::IfcDistributionCircuit(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, boost::optional< std::string > v6_LongName, boost::optional< IfcDistributionSystemEnum::IfcDistributionSystemEnum > v7_PredefinedType) : IfcDistributionSystem((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } if (v6_LongName) { e->setArgument(5,(*v6_LongName)); } else { e->setArgument(5); } if (v7_PredefinedType) { e->setArgument(6,*v7_PredefinedType,IfcDistributionSystemEnum::ToString(*v7_PredefinedType)); } else { e->setArgument(6); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcDistributionControlElement -IfcRelFlowControlElements::list::ptr IfcDistributionControlElement::AssignedToFlowElement() const { return entity->getInverse(Type::IfcRelFlowControlElements)->as(); } +IfcRelFlowControlElements::list::ptr IfcDistributionControlElement::AssignedToFlowElement() const { return entity->getInverse(Type::IfcRelFlowControlElements, 4)->as(); } bool IfcDistributionControlElement::is(Type::Enum v) const { return v == Type::IfcDistributionControlElement || IfcDistributionElement::is(v); } Type::Enum IfcDistributionControlElement::type() const { return Type::IfcDistributionControlElement; } Type::Enum IfcDistributionControlElement::Class() { return Type::IfcDistributionControlElement; } @@ -9876,7 +9876,7 @@ IfcDistributionControlElementType::IfcDistributionControlElementType(IfcAbstract IfcDistributionControlElementType::IfcDistributionControlElementType(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType) : IfcDistributionElementType((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ApplicableOccurrence) { e->setArgument(4,(*v5_ApplicableOccurrence)); } else { e->setArgument(4); } if (v6_HasPropertySets) { e->setArgument(5,(*v6_HasPropertySets)->generalize()); } else { e->setArgument(5); } if (v7_RepresentationMaps) { e->setArgument(6,(*v7_RepresentationMaps)->generalize()); } else { e->setArgument(6); } if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } if (v9_ElementType) { e->setArgument(8,(*v9_ElementType)); } else { e->setArgument(8); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcDistributionElement -IfcRelConnectsPortToElement::list::ptr IfcDistributionElement::HasPorts() const { return entity->getInverse(Type::IfcRelConnectsPortToElement)->as(); } +IfcRelConnectsPortToElement::list::ptr IfcDistributionElement::HasPorts() const { return entity->getInverse(Type::IfcRelConnectsPortToElement, 5)->as(); } bool IfcDistributionElement::is(Type::Enum v) const { return v == Type::IfcDistributionElement || IfcElement::is(v); } Type::Enum IfcDistributionElement::type() const { return Type::IfcDistributionElement; } Type::Enum IfcDistributionElement::Class() { return Type::IfcDistributionElement; } @@ -9891,7 +9891,7 @@ IfcDistributionElementType::IfcDistributionElementType(IfcAbstractEntity* e) : I IfcDistributionElementType::IfcDistributionElementType(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType) : IfcElementType((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ApplicableOccurrence) { e->setArgument(4,(*v5_ApplicableOccurrence)); } else { e->setArgument(4); } if (v6_HasPropertySets) { e->setArgument(5,(*v6_HasPropertySets)->generalize()); } else { e->setArgument(5); } if (v7_RepresentationMaps) { e->setArgument(6,(*v7_RepresentationMaps)->generalize()); } else { e->setArgument(6); } if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } if (v9_ElementType) { e->setArgument(8,(*v9_ElementType)); } else { e->setArgument(8); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcDistributionFlowElement -IfcRelFlowControlElements::list::ptr IfcDistributionFlowElement::HasControlElements() const { return entity->getInverse(Type::IfcRelFlowControlElements)->as(); } +IfcRelFlowControlElements::list::ptr IfcDistributionFlowElement::HasControlElements() const { return entity->getInverse(Type::IfcRelFlowControlElements, 5)->as(); } bool IfcDistributionFlowElement::is(Type::Enum v) const { return v == Type::IfcDistributionFlowElement || IfcDistributionElement::is(v); } Type::Enum IfcDistributionFlowElement::type() const { return Type::IfcDistributionFlowElement; } Type::Enum IfcDistributionFlowElement::Class() { return Type::IfcDistributionFlowElement; } @@ -9984,10 +9984,10 @@ void IfcDocumentInformation::setConfidentiality(IfcDocumentConfidentialityEnum:: bool IfcDocumentInformation::hasStatus() const { return !entity->getArgument(16)->isNull(); } IfcDocumentStatusEnum::IfcDocumentStatusEnum IfcDocumentInformation::Status() const { return IfcDocumentStatusEnum::FromString(*entity->getArgument(16)); } void IfcDocumentInformation::setStatus(IfcDocumentStatusEnum::IfcDocumentStatusEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(16,v,IfcDocumentStatusEnum::ToString(v)); } -IfcRelAssociatesDocument::list::ptr IfcDocumentInformation::DocumentInfoForObjects() const { return entity->getInverse(Type::IfcRelAssociatesDocument)->as(); } -IfcDocumentReference::list::ptr IfcDocumentInformation::HasDocumentReferences() const { return entity->getInverse(Type::IfcDocumentReference)->as(); } -IfcDocumentInformationRelationship::list::ptr IfcDocumentInformation::IsPointedTo() const { return entity->getInverse(Type::IfcDocumentInformationRelationship)->as(); } -IfcDocumentInformationRelationship::list::ptr IfcDocumentInformation::IsPointer() const { return entity->getInverse(Type::IfcDocumentInformationRelationship)->as(); } +IfcRelAssociatesDocument::list::ptr IfcDocumentInformation::DocumentInfoForObjects() const { return entity->getInverse(Type::IfcRelAssociatesDocument, 5)->as(); } +IfcDocumentReference::list::ptr IfcDocumentInformation::HasDocumentReferences() const { return entity->getInverse(Type::IfcDocumentReference, 4)->as(); } +IfcDocumentInformationRelationship::list::ptr IfcDocumentInformation::IsPointedTo() const { return entity->getInverse(Type::IfcDocumentInformationRelationship, 3)->as(); } +IfcDocumentInformationRelationship::list::ptr IfcDocumentInformation::IsPointer() const { return entity->getInverse(Type::IfcDocumentInformationRelationship, 2)->as(); } bool IfcDocumentInformation::is(Type::Enum v) const { return v == Type::IfcDocumentInformation || IfcExternalInformation::is(v); } Type::Enum IfcDocumentInformation::type() const { return Type::IfcDocumentInformation; } Type::Enum IfcDocumentInformation::Class() { return Type::IfcDocumentInformation; } @@ -10015,7 +10015,7 @@ void IfcDocumentReference::setDescription(std::string v) { if ( ! entity->isWrit bool IfcDocumentReference::hasReferencedDocument() const { return !entity->getArgument(4)->isNull(); } IfcDocumentInformation* IfcDocumentReference::ReferencedDocument() const { return (IfcDocumentInformation*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(4))); } void IfcDocumentReference::setReferencedDocument(IfcDocumentInformation* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(4,v); } -IfcRelAssociatesDocument::list::ptr IfcDocumentReference::DocumentRefForObjects() const { return entity->getInverse(Type::IfcRelAssociatesDocument)->as(); } +IfcRelAssociatesDocument::list::ptr IfcDocumentReference::DocumentRefForObjects() const { return entity->getInverse(Type::IfcRelAssociatesDocument, 5)->as(); } bool IfcDocumentReference::is(Type::Enum v) const { return v == Type::IfcDocumentReference || IfcExternalReference::is(v); } Type::Enum IfcDocumentReference::type() const { return Type::IfcDocumentReference; } Type::Enum IfcDocumentReference::Class() { return Type::IfcDocumentReference; } @@ -10369,17 +10369,17 @@ IfcElectricTimeControlType::IfcElectricTimeControlType(std::string v1_GlobalId, bool IfcElement::hasTag() const { return !entity->getArgument(7)->isNull(); } std::string IfcElement::Tag() const { return *entity->getArgument(7); } void IfcElement::setTag(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcRelFillsElement::list::ptr IfcElement::FillsVoids() const { return entity->getInverse(Type::IfcRelFillsElement)->as(); } -IfcRelConnectsElements::list::ptr IfcElement::ConnectedTo() const { return entity->getInverse(Type::IfcRelConnectsElements)->as(); } -IfcRelInterferesElements::list::ptr IfcElement::IsInterferedByElements() const { return entity->getInverse(Type::IfcRelInterferesElements)->as(); } -IfcRelInterferesElements::list::ptr IfcElement::InterferesElements() const { return entity->getInverse(Type::IfcRelInterferesElements)->as(); } -IfcRelProjectsElement::list::ptr IfcElement::HasProjections() const { return entity->getInverse(Type::IfcRelProjectsElement)->as(); } -IfcRelReferencedInSpatialStructure::list::ptr IfcElement::ReferencedInStructures() const { return entity->getInverse(Type::IfcRelReferencedInSpatialStructure)->as(); } -IfcRelVoidsElement::list::ptr IfcElement::HasOpenings() const { return entity->getInverse(Type::IfcRelVoidsElement)->as(); } -IfcRelConnectsWithRealizingElements::list::ptr IfcElement::IsConnectionRealization() const { return entity->getInverse(Type::IfcRelConnectsWithRealizingElements)->as(); } -IfcRelSpaceBoundary::list::ptr IfcElement::ProvidesBoundaries() const { return entity->getInverse(Type::IfcRelSpaceBoundary)->as(); } -IfcRelConnectsElements::list::ptr IfcElement::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsElements)->as(); } -IfcRelContainedInSpatialStructure::list::ptr IfcElement::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure)->as(); } +IfcRelFillsElement::list::ptr IfcElement::FillsVoids() const { return entity->getInverse(Type::IfcRelFillsElement, 5)->as(); } +IfcRelConnectsElements::list::ptr IfcElement::ConnectedTo() const { return entity->getInverse(Type::IfcRelConnectsElements, 5)->as(); } +IfcRelInterferesElements::list::ptr IfcElement::IsInterferedByElements() const { return entity->getInverse(Type::IfcRelInterferesElements, 5)->as(); } +IfcRelInterferesElements::list::ptr IfcElement::InterferesElements() const { return entity->getInverse(Type::IfcRelInterferesElements, 4)->as(); } +IfcRelProjectsElement::list::ptr IfcElement::HasProjections() const { return entity->getInverse(Type::IfcRelProjectsElement, 4)->as(); } +IfcRelReferencedInSpatialStructure::list::ptr IfcElement::ReferencedInStructures() const { return entity->getInverse(Type::IfcRelReferencedInSpatialStructure, 4)->as(); } +IfcRelVoidsElement::list::ptr IfcElement::HasOpenings() const { return entity->getInverse(Type::IfcRelVoidsElement, 4)->as(); } +IfcRelConnectsWithRealizingElements::list::ptr IfcElement::IsConnectionRealization() const { return entity->getInverse(Type::IfcRelConnectsWithRealizingElements, 7)->as(); } +IfcRelSpaceBoundary::list::ptr IfcElement::ProvidesBoundaries() const { return entity->getInverse(Type::IfcRelSpaceBoundary, 5)->as(); } +IfcRelConnectsElements::list::ptr IfcElement::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsElements, 6)->as(); } +IfcRelContainedInSpatialStructure::list::ptr IfcElement::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 4)->as(); } bool IfcElement::is(Type::Enum v) const { return v == Type::IfcElement || IfcProduct::is(v); } Type::Enum IfcElement::type() const { return Type::IfcElement; } Type::Enum IfcElement::Class() { return Type::IfcElement; } @@ -10630,7 +10630,7 @@ void IfcExternalReference::setIdentification(std::string v) { if ( ! entity->isW bool IfcExternalReference::hasName() const { return !entity->getArgument(2)->isNull(); } std::string IfcExternalReference::Name() const { return *entity->getArgument(2); } void IfcExternalReference::setName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcExternalReferenceRelationship::list::ptr IfcExternalReference::ExternalReferenceForResources() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcExternalReference::ExternalReferenceForResources() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 2)->as(); } bool IfcExternalReference::is(Type::Enum v) const { return v == Type::IfcExternalReference; } Type::Enum IfcExternalReference::type() const { return Type::IfcExternalReference; } Type::Enum IfcExternalReference::Class() { return Type::IfcExternalReference; } @@ -10652,7 +10652,7 @@ IfcExternalReferenceRelationship::IfcExternalReferenceRelationship(boost::option bool IfcExternalSpatialElement::hasPredefinedType() const { return !entity->getArgument(8)->isNull(); } IfcExternalSpatialElementTypeEnum::IfcExternalSpatialElementTypeEnum IfcExternalSpatialElement::PredefinedType() const { return IfcExternalSpatialElementTypeEnum::FromString(*entity->getArgument(8)); } void IfcExternalSpatialElement::setPredefinedType(IfcExternalSpatialElementTypeEnum::IfcExternalSpatialElementTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v,IfcExternalSpatialElementTypeEnum::ToString(v)); } -IfcRelSpaceBoundary::list::ptr IfcExternalSpatialElement::BoundedBy() const { return entity->getInverse(Type::IfcRelSpaceBoundary)->as(); } +IfcRelSpaceBoundary::list::ptr IfcExternalSpatialElement::BoundedBy() const { return entity->getInverse(Type::IfcRelSpaceBoundary, 4)->as(); } bool IfcExternalSpatialElement::is(Type::Enum v) const { return v == Type::IfcExternalSpatialElement || IfcExternalSpatialStructureElement::is(v); } Type::Enum IfcExternalSpatialElement::type() const { return Type::IfcExternalSpatialElement; } Type::Enum IfcExternalSpatialElement::Class() { return Type::IfcExternalSpatialElement; } @@ -10710,7 +10710,7 @@ IfcExtrudedAreaSolidTapered::IfcExtrudedAreaSolidTapered(IfcProfileDef* v1_Swept // Function implementations for IfcFace IfcTemplatedEntityList< IfcFaceBound >::ptr IfcFace::Bounds() const { IfcEntityList::ptr es = *entity->getArgument(0); return es->as(); } void IfcFace::setBounds(IfcTemplatedEntityList< IfcFaceBound >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v->generalize()); } -IfcTextureMap::list::ptr IfcFace::HasTextureMaps() const { return entity->getInverse(Type::IfcTextureMap)->as(); } +IfcTextureMap::list::ptr IfcFace::HasTextureMaps() const { return entity->getInverse(Type::IfcTextureMap, 2)->as(); } bool IfcFace::is(Type::Enum v) const { return v == Type::IfcFace || IfcTopologicalRepresentationItem::is(v); } Type::Enum IfcFace::type() const { return Type::IfcFace; } Type::Enum IfcFace::Class() { return Type::IfcFace; } @@ -10842,7 +10842,7 @@ IfcFeatureElement::IfcFeatureElement(IfcAbstractEntity* e) : IfcElement((IfcAbst IfcFeatureElement::IfcFeatureElement(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag) : IfcElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcFeatureElementAddition -IfcRelProjectsElement::list::ptr IfcFeatureElementAddition::ProjectsElements() const { return entity->getInverse(Type::IfcRelProjectsElement)->as(); } +IfcRelProjectsElement::list::ptr IfcFeatureElementAddition::ProjectsElements() const { return entity->getInverse(Type::IfcRelProjectsElement, 5)->as(); } bool IfcFeatureElementAddition::is(Type::Enum v) const { return v == Type::IfcFeatureElementAddition || IfcFeatureElement::is(v); } Type::Enum IfcFeatureElementAddition::type() const { return Type::IfcFeatureElementAddition; } Type::Enum IfcFeatureElementAddition::Class() { return Type::IfcFeatureElementAddition; } @@ -10850,7 +10850,7 @@ IfcFeatureElementAddition::IfcFeatureElementAddition(IfcAbstractEntity* e) : Ifc IfcFeatureElementAddition::IfcFeatureElementAddition(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, boost::optional< std::string > v8_Tag) : IfcFeatureElement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcFeatureElementSubtraction -IfcRelVoidsElement::list::ptr IfcFeatureElementSubtraction::VoidsElements() const { return entity->getInverse(Type::IfcRelVoidsElement)->as(); } +IfcRelVoidsElement::list::ptr IfcFeatureElementSubtraction::VoidsElements() const { return entity->getInverse(Type::IfcRelVoidsElement, 5)->as(); } bool IfcFeatureElementSubtraction::is(Type::Enum v) const { return v == Type::IfcFeatureElementSubtraction || IfcFeatureElement::is(v); } Type::Enum IfcFeatureElementSubtraction::type() const { return Type::IfcFeatureElementSubtraction; } Type::Enum IfcFeatureElementSubtraction::Class() { return Type::IfcFeatureElementSubtraction; } @@ -11184,7 +11184,7 @@ void IfcGeometricRepresentationContext::setWorldCoordinateSystem(IfcAxis2Placeme bool IfcGeometricRepresentationContext::hasTrueNorth() const { return !entity->getArgument(5)->isNull(); } IfcDirection* IfcGeometricRepresentationContext::TrueNorth() const { return (IfcDirection*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(5))); } void IfcGeometricRepresentationContext::setTrueNorth(IfcDirection* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcGeometricRepresentationSubContext::list::ptr IfcGeometricRepresentationContext::HasSubContexts() const { return entity->getInverse(Type::IfcGeometricRepresentationSubContext)->as(); } +IfcGeometricRepresentationSubContext::list::ptr IfcGeometricRepresentationContext::HasSubContexts() const { return entity->getInverse(Type::IfcGeometricRepresentationSubContext, 6)->as(); } bool IfcGeometricRepresentationContext::is(Type::Enum v) const { return v == Type::IfcGeometricRepresentationContext || IfcRepresentationContext::is(v); } Type::Enum IfcGeometricRepresentationContext::type() const { return Type::IfcGeometricRepresentationContext; } Type::Enum IfcGeometricRepresentationContext::Class() { return Type::IfcGeometricRepresentationContext; } @@ -11235,7 +11235,7 @@ void IfcGrid::setWAxes(IfcTemplatedEntityList< IfcGridAxis >::ptr v) { if ( ! en bool IfcGrid::hasPredefinedType() const { return !entity->getArgument(10)->isNull(); } IfcGridTypeEnum::IfcGridTypeEnum IfcGrid::PredefinedType() const { return IfcGridTypeEnum::FromString(*entity->getArgument(10)); } void IfcGrid::setPredefinedType(IfcGridTypeEnum::IfcGridTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(10,v,IfcGridTypeEnum::ToString(v)); } -IfcRelContainedInSpatialStructure::list::ptr IfcGrid::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure)->as(); } +IfcRelContainedInSpatialStructure::list::ptr IfcGrid::ContainedInStructure() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 4)->as(); } bool IfcGrid::is(Type::Enum v) const { return v == Type::IfcGrid || IfcProduct::is(v); } Type::Enum IfcGrid::type() const { return Type::IfcGrid; } Type::Enum IfcGrid::Class() { return Type::IfcGrid; } @@ -11250,10 +11250,10 @@ IfcCurve* IfcGridAxis::AxisCurve() const { return (IfcCurve*)((IfcUtil::IfcBaseC void IfcGridAxis::setAxisCurve(IfcCurve* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } bool IfcGridAxis::SameSense() const { return *entity->getArgument(2); } void IfcGridAxis::setSameSense(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcGrid::list::ptr IfcGridAxis::PartOfW() const { return entity->getInverse(Type::IfcGrid)->as(); } -IfcGrid::list::ptr IfcGridAxis::PartOfV() const { return entity->getInverse(Type::IfcGrid)->as(); } -IfcGrid::list::ptr IfcGridAxis::PartOfU() const { return entity->getInverse(Type::IfcGrid)->as(); } -IfcVirtualGridIntersection::list::ptr IfcGridAxis::HasIntersections() const { return entity->getInverse(Type::IfcVirtualGridIntersection)->as(); } +IfcGrid::list::ptr IfcGridAxis::PartOfW() const { return entity->getInverse(Type::IfcGrid, 9)->as(); } +IfcGrid::list::ptr IfcGridAxis::PartOfV() const { return entity->getInverse(Type::IfcGrid, 8)->as(); } +IfcGrid::list::ptr IfcGridAxis::PartOfU() const { return entity->getInverse(Type::IfcGrid, 7)->as(); } +IfcVirtualGridIntersection::list::ptr IfcGridAxis::HasIntersections() const { return entity->getInverse(Type::IfcVirtualGridIntersection, 0)->as(); } bool IfcGridAxis::is(Type::Enum v) const { return v == Type::IfcGridAxis; } Type::Enum IfcGridAxis::type() const { return Type::IfcGridAxis; } Type::Enum IfcGridAxis::Class() { return Type::IfcGridAxis; } @@ -11273,7 +11273,7 @@ IfcGridPlacement::IfcGridPlacement(IfcAbstractEntity* e) : IfcObjectPlacement((I IfcGridPlacement::IfcGridPlacement(IfcVirtualGridIntersection* v1_PlacementLocation, IfcGridPlacementDirectionSelect* v2_PlacementRefDirection) : IfcObjectPlacement((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_PlacementLocation)); e->setArgument(1,(v2_PlacementRefDirection)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcGroup -IfcRelAssignsToGroup::list::ptr IfcGroup::IsGroupedBy() const { return entity->getInverse(Type::IfcRelAssignsToGroup)->as(); } +IfcRelAssignsToGroup::list::ptr IfcGroup::IsGroupedBy() const { return entity->getInverse(Type::IfcRelAssignsToGroup, 6)->as(); } bool IfcGroup::is(Type::Enum v) const { return v == Type::IfcGroup || IfcObject::is(v); } Type::Enum IfcGroup::type() const { return Type::IfcGroup; } Type::Enum IfcGroup::Class() { return Type::IfcGroup; } @@ -11569,8 +11569,8 @@ void IfcLibraryInformation::setLocation(std::string v) { if ( ! entity->isWritab bool IfcLibraryInformation::hasDescription() const { return !entity->getArgument(5)->isNull(); } std::string IfcLibraryInformation::Description() const { return *entity->getArgument(5); } void IfcLibraryInformation::setDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcRelAssociatesLibrary::list::ptr IfcLibraryInformation::LibraryInfoForObjects() const { return entity->getInverse(Type::IfcRelAssociatesLibrary)->as(); } -IfcLibraryReference::list::ptr IfcLibraryInformation::HasLibraryReferences() const { return entity->getInverse(Type::IfcLibraryReference)->as(); } +IfcRelAssociatesLibrary::list::ptr IfcLibraryInformation::LibraryInfoForObjects() const { return entity->getInverse(Type::IfcRelAssociatesLibrary, 5)->as(); } +IfcLibraryReference::list::ptr IfcLibraryInformation::HasLibraryReferences() const { return entity->getInverse(Type::IfcLibraryReference, 5)->as(); } bool IfcLibraryInformation::is(Type::Enum v) const { return v == Type::IfcLibraryInformation || IfcExternalInformation::is(v); } Type::Enum IfcLibraryInformation::type() const { return Type::IfcLibraryInformation; } Type::Enum IfcLibraryInformation::Class() { return Type::IfcLibraryInformation; } @@ -11587,7 +11587,7 @@ void IfcLibraryReference::setLanguage(std::string v) { if ( ! entity->isWritable bool IfcLibraryReference::hasReferencedLibrary() const { return !entity->getArgument(5)->isNull(); } IfcLibraryInformation* IfcLibraryReference::ReferencedLibrary() const { return (IfcLibraryInformation*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(5))); } void IfcLibraryReference::setReferencedLibrary(IfcLibraryInformation* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcRelAssociatesLibrary::list::ptr IfcLibraryReference::LibraryRefForObjects() const { return entity->getInverse(Type::IfcRelAssociatesLibrary)->as(); } +IfcRelAssociatesLibrary::list::ptr IfcLibraryReference::LibraryRefForObjects() const { return entity->getInverse(Type::IfcRelAssociatesLibrary, 5)->as(); } bool IfcLibraryReference::is(Type::Enum v) const { return v == Type::IfcLibraryReference || IfcExternalReference::is(v); } Type::Enum IfcLibraryReference::type() const { return Type::IfcLibraryReference; } Type::Enum IfcLibraryReference::Class() { return Type::IfcLibraryReference; } @@ -11805,9 +11805,9 @@ void IfcMaterial::setDescription(std::string v) { if ( ! entity->isWritable() ) bool IfcMaterial::hasCategory() const { return !entity->getArgument(2)->isNull(); } std::string IfcMaterial::Category() const { return *entity->getArgument(2); } void IfcMaterial::setCategory(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcMaterialDefinitionRepresentation::list::ptr IfcMaterial::HasRepresentation() const { return entity->getInverse(Type::IfcMaterialDefinitionRepresentation)->as(); } -IfcMaterialRelationship::list::ptr IfcMaterial::IsRelatedWith() const { return entity->getInverse(Type::IfcMaterialRelationship)->as(); } -IfcMaterialRelationship::list::ptr IfcMaterial::RelatesTo() const { return entity->getInverse(Type::IfcMaterialRelationship)->as(); } +IfcMaterialDefinitionRepresentation::list::ptr IfcMaterial::HasRepresentation() const { return entity->getInverse(Type::IfcMaterialDefinitionRepresentation, 3)->as(); } +IfcMaterialRelationship::list::ptr IfcMaterial::IsRelatedWith() const { return entity->getInverse(Type::IfcMaterialRelationship, 3)->as(); } +IfcMaterialRelationship::list::ptr IfcMaterial::RelatesTo() const { return entity->getInverse(Type::IfcMaterialRelationship, 2)->as(); } bool IfcMaterial::is(Type::Enum v) const { return v == Type::IfcMaterial || IfcMaterialDefinition::is(v); } Type::Enum IfcMaterial::type() const { return Type::IfcMaterial; } Type::Enum IfcMaterial::Class() { return Type::IfcMaterial; } @@ -11840,7 +11840,7 @@ void IfcMaterialConstituent::setFraction(double v) { if ( ! entity->isWritable() bool IfcMaterialConstituent::hasCategory() const { return !entity->getArgument(4)->isNull(); } std::string IfcMaterialConstituent::Category() const { return *entity->getArgument(4); } void IfcMaterialConstituent::setCategory(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(4,v); } -IfcMaterialConstituentSet::list::ptr IfcMaterialConstituent::ToMaterialConstituentSet() const { return entity->getInverse(Type::IfcMaterialConstituentSet)->as(); } +IfcMaterialConstituentSet::list::ptr IfcMaterialConstituent::ToMaterialConstituentSet() const { return entity->getInverse(Type::IfcMaterialConstituentSet, 2)->as(); } bool IfcMaterialConstituent::is(Type::Enum v) const { return v == Type::IfcMaterialConstituent || IfcMaterialDefinition::is(v); } Type::Enum IfcMaterialConstituent::type() const { return Type::IfcMaterialConstituent; } Type::Enum IfcMaterialConstituent::Class() { return Type::IfcMaterialConstituent; } @@ -11864,9 +11864,9 @@ IfcMaterialConstituentSet::IfcMaterialConstituentSet(IfcAbstractEntity* e) : Ifc IfcMaterialConstituentSet::IfcMaterialConstituentSet(boost::optional< std::string > v1_Name, boost::optional< std::string > v2_Description, boost::optional< IfcTemplatedEntityList< IfcMaterialConstituent >::ptr > v3_MaterialConstituents) : IfcMaterialDefinition((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } if (v3_MaterialConstituents) { e->setArgument(2,(*v3_MaterialConstituents)->generalize()); } else { e->setArgument(2); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcMaterialDefinition -IfcRelAssociatesMaterial::list::ptr IfcMaterialDefinition::AssociatedTo() const { return entity->getInverse(Type::IfcRelAssociatesMaterial)->as(); } -IfcExternalReferenceRelationship::list::ptr IfcMaterialDefinition::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } -IfcMaterialProperties::list::ptr IfcMaterialDefinition::HasProperties() const { return entity->getInverse(Type::IfcMaterialProperties)->as(); } +IfcRelAssociatesMaterial::list::ptr IfcMaterialDefinition::AssociatedTo() const { return entity->getInverse(Type::IfcRelAssociatesMaterial, 5)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcMaterialDefinition::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } +IfcMaterialProperties::list::ptr IfcMaterialDefinition::HasProperties() const { return entity->getInverse(Type::IfcMaterialProperties, 3)->as(); } bool IfcMaterialDefinition::is(Type::Enum v) const { return v == Type::IfcMaterialDefinition; } Type::Enum IfcMaterialDefinition::type() const { return Type::IfcMaterialDefinition; } Type::Enum IfcMaterialDefinition::Class() { return Type::IfcMaterialDefinition; } @@ -11903,7 +11903,7 @@ void IfcMaterialLayer::setCategory(std::string v) { if ( ! entity->isWritable() bool IfcMaterialLayer::hasPriority() const { return !entity->getArgument(6)->isNull(); } double IfcMaterialLayer::Priority() const { return *entity->getArgument(6); } void IfcMaterialLayer::setPriority(double v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcMaterialLayerSet::list::ptr IfcMaterialLayer::ToMaterialLayerSet() const { return entity->getInverse(Type::IfcMaterialLayerSet)->as(); } +IfcMaterialLayerSet::list::ptr IfcMaterialLayer::ToMaterialLayerSet() const { return entity->getInverse(Type::IfcMaterialLayerSet, 0)->as(); } bool IfcMaterialLayer::is(Type::Enum v) const { return v == Type::IfcMaterialLayer || IfcMaterialDefinition::is(v); } Type::Enum IfcMaterialLayer::type() const { return Type::IfcMaterialLayer; } Type::Enum IfcMaterialLayer::Class() { return Type::IfcMaterialLayer; } @@ -11981,7 +11981,7 @@ void IfcMaterialProfile::setPriority(double v) { if ( ! entity->isWritable() ) { bool IfcMaterialProfile::hasCategory() const { return !entity->getArgument(5)->isNull(); } std::string IfcMaterialProfile::Category() const { return *entity->getArgument(5); } void IfcMaterialProfile::setCategory(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } -IfcMaterialProfileSet::list::ptr IfcMaterialProfile::ToMaterialProfileSet() const { return entity->getInverse(Type::IfcMaterialProfileSet)->as(); } +IfcMaterialProfileSet::list::ptr IfcMaterialProfile::ToMaterialProfileSet() const { return entity->getInverse(Type::IfcMaterialProfileSet, 2)->as(); } bool IfcMaterialProfile::is(Type::Enum v) const { return v == Type::IfcMaterialProfile || IfcMaterialDefinition::is(v); } Type::Enum IfcMaterialProfile::type() const { return Type::IfcMaterialProfile; } Type::Enum IfcMaterialProfile::Class() { return Type::IfcMaterialProfile; } @@ -12066,7 +12066,7 @@ IfcMaterialRelationship::IfcMaterialRelationship(IfcAbstractEntity* e) : IfcReso IfcMaterialRelationship::IfcMaterialRelationship(boost::optional< std::string > v1_Name, boost::optional< std::string > v2_Description, IfcMaterial* v3_RelatingMaterial, IfcTemplatedEntityList< IfcMaterial >::ptr v4_RelatedMaterials, boost::optional< std::string > v5_Expression) : IfcResourceLevelRelationship((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } e->setArgument(2,(v3_RelatingMaterial)); e->setArgument(3,(v4_RelatedMaterials)->generalize()); if (v5_Expression) { e->setArgument(4,(*v5_Expression)); } else { e->setArgument(4); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcMaterialUsageDefinition -IfcRelAssociatesMaterial::list::ptr IfcMaterialUsageDefinition::AssociatedTo() const { return entity->getInverse(Type::IfcRelAssociatesMaterial)->as(); } +IfcRelAssociatesMaterial::list::ptr IfcMaterialUsageDefinition::AssociatedTo() const { return entity->getInverse(Type::IfcRelAssociatesMaterial, 5)->as(); } bool IfcMaterialUsageDefinition::is(Type::Enum v) const { return v == Type::IfcMaterialUsageDefinition; } Type::Enum IfcMaterialUsageDefinition::type() const { return Type::IfcMaterialUsageDefinition; } Type::Enum IfcMaterialUsageDefinition::Class() { return Type::IfcMaterialUsageDefinition; } @@ -12227,10 +12227,10 @@ IfcNamedUnit::IfcNamedUnit(IfcDimensionalExponents* v1_Dimensions, IfcUnitEnum:: bool IfcObject::hasObjectType() const { return !entity->getArgument(4)->isNull(); } std::string IfcObject::ObjectType() const { return *entity->getArgument(4); } void IfcObject::setObjectType(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(4,v); } -IfcRelDefinesByObject::list::ptr IfcObject::IsDeclaredBy() const { return entity->getInverse(Type::IfcRelDefinesByObject)->as(); } -IfcRelDefinesByObject::list::ptr IfcObject::Declares() const { return entity->getInverse(Type::IfcRelDefinesByObject)->as(); } -IfcRelDefinesByType::list::ptr IfcObject::IsTypedBy() const { return entity->getInverse(Type::IfcRelDefinesByType)->as(); } -IfcRelDefinesByProperties::list::ptr IfcObject::IsDefinedBy() const { return entity->getInverse(Type::IfcRelDefinesByProperties)->as(); } +IfcRelDefinesByObject::list::ptr IfcObject::IsDeclaredBy() const { return entity->getInverse(Type::IfcRelDefinesByObject, 4)->as(); } +IfcRelDefinesByObject::list::ptr IfcObject::Declares() const { return entity->getInverse(Type::IfcRelDefinesByObject, 5)->as(); } +IfcRelDefinesByType::list::ptr IfcObject::IsTypedBy() const { return entity->getInverse(Type::IfcRelDefinesByType, 4)->as(); } +IfcRelDefinesByProperties::list::ptr IfcObject::IsDefinedBy() const { return entity->getInverse(Type::IfcRelDefinesByProperties, 4)->as(); } bool IfcObject::is(Type::Enum v) const { return v == Type::IfcObject || IfcObjectDefinition::is(v); } Type::Enum IfcObject::type() const { return Type::IfcObject; } Type::Enum IfcObject::Class() { return Type::IfcObject; } @@ -12238,13 +12238,13 @@ IfcObject::IfcObject(IfcAbstractEntity* e) : IfcObjectDefinition((IfcAbstractEnt IfcObject::IfcObject(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType) : IfcObjectDefinition((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcObjectDefinition -IfcRelAssigns::list::ptr IfcObjectDefinition::HasAssignments() const { return entity->getInverse(Type::IfcRelAssigns)->as(); } -IfcRelNests::list::ptr IfcObjectDefinition::Nests() const { return entity->getInverse(Type::IfcRelNests)->as(); } -IfcRelNests::list::ptr IfcObjectDefinition::IsNestedBy() const { return entity->getInverse(Type::IfcRelNests)->as(); } -IfcRelDeclares::list::ptr IfcObjectDefinition::HasContext() const { return entity->getInverse(Type::IfcRelDeclares)->as(); } -IfcRelAggregates::list::ptr IfcObjectDefinition::IsDecomposedBy() const { return entity->getInverse(Type::IfcRelAggregates)->as(); } -IfcRelAggregates::list::ptr IfcObjectDefinition::Decomposes() const { return entity->getInverse(Type::IfcRelAggregates)->as(); } -IfcRelAssociates::list::ptr IfcObjectDefinition::HasAssociations() const { return entity->getInverse(Type::IfcRelAssociates)->as(); } +IfcRelAssigns::list::ptr IfcObjectDefinition::HasAssignments() const { return entity->getInverse(Type::IfcRelAssigns, 4)->as(); } +IfcRelNests::list::ptr IfcObjectDefinition::Nests() const { return entity->getInverse(Type::IfcRelNests, 5)->as(); } +IfcRelNests::list::ptr IfcObjectDefinition::IsNestedBy() const { return entity->getInverse(Type::IfcRelNests, 4)->as(); } +IfcRelDeclares::list::ptr IfcObjectDefinition::HasContext() const { return entity->getInverse(Type::IfcRelDeclares, 5)->as(); } +IfcRelAggregates::list::ptr IfcObjectDefinition::IsDecomposedBy() const { return entity->getInverse(Type::IfcRelAggregates, 4)->as(); } +IfcRelAggregates::list::ptr IfcObjectDefinition::Decomposes() const { return entity->getInverse(Type::IfcRelAggregates, 5)->as(); } +IfcRelAssociates::list::ptr IfcObjectDefinition::HasAssociations() const { return entity->getInverse(Type::IfcRelAssociates, 4)->as(); } bool IfcObjectDefinition::is(Type::Enum v) const { return v == Type::IfcObjectDefinition || IfcRoot::is(v); } Type::Enum IfcObjectDefinition::type() const { return Type::IfcObjectDefinition; } Type::Enum IfcObjectDefinition::Class() { return Type::IfcObjectDefinition; } @@ -12252,8 +12252,8 @@ IfcObjectDefinition::IfcObjectDefinition(IfcAbstractEntity* e) : IfcRoot((IfcAbs IfcObjectDefinition::IfcObjectDefinition(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description) : IfcRoot((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcObjectPlacement -IfcProduct::list::ptr IfcObjectPlacement::PlacesObject() const { return entity->getInverse(Type::IfcProduct)->as(); } -IfcLocalPlacement::list::ptr IfcObjectPlacement::ReferencedByPlacements() const { return entity->getInverse(Type::IfcLocalPlacement)->as(); } +IfcProduct::list::ptr IfcObjectPlacement::PlacesObject() const { return entity->getInverse(Type::IfcProduct, 5)->as(); } +IfcLocalPlacement::list::ptr IfcObjectPlacement::ReferencedByPlacements() const { return entity->getInverse(Type::IfcLocalPlacement, 0)->as(); } bool IfcObjectPlacement::is(Type::Enum v) const { return v == Type::IfcObjectPlacement; } Type::Enum IfcObjectPlacement::type() const { return Type::IfcObjectPlacement; } Type::Enum IfcObjectPlacement::Class() { return Type::IfcObjectPlacement; } @@ -12327,7 +12327,7 @@ IfcOpenShell::IfcOpenShell(IfcTemplatedEntityList< IfcFace >::ptr v1_CfsFaces) : bool IfcOpeningElement::hasPredefinedType() const { return !entity->getArgument(8)->isNull(); } IfcOpeningElementTypeEnum::IfcOpeningElementTypeEnum IfcOpeningElement::PredefinedType() const { return IfcOpeningElementTypeEnum::FromString(*entity->getArgument(8)); } void IfcOpeningElement::setPredefinedType(IfcOpeningElementTypeEnum::IfcOpeningElementTypeEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v,IfcOpeningElementTypeEnum::ToString(v)); } -IfcRelFillsElement::list::ptr IfcOpeningElement::HasFillings() const { return entity->getInverse(Type::IfcRelFillsElement)->as(); } +IfcRelFillsElement::list::ptr IfcOpeningElement::HasFillings() const { return entity->getInverse(Type::IfcRelFillsElement, 4)->as(); } bool IfcOpeningElement::is(Type::Enum v) const { return v == Type::IfcOpeningElement || IfcFeatureElementSubtraction::is(v); } Type::Enum IfcOpeningElement::type() const { return Type::IfcOpeningElement; } Type::Enum IfcOpeningElement::Class() { return Type::IfcOpeningElement; } @@ -12356,9 +12356,9 @@ void IfcOrganization::setRoles(IfcTemplatedEntityList< IfcActorRole >::ptr v) { bool IfcOrganization::hasAddresses() const { return !entity->getArgument(4)->isNull(); } IfcTemplatedEntityList< IfcAddress >::ptr IfcOrganization::Addresses() const { IfcEntityList::ptr es = *entity->getArgument(4); return es->as(); } void IfcOrganization::setAddresses(IfcTemplatedEntityList< IfcAddress >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(4,v->generalize()); } -IfcOrganizationRelationship::list::ptr IfcOrganization::IsRelatedBy() const { return entity->getInverse(Type::IfcOrganizationRelationship)->as(); } -IfcOrganizationRelationship::list::ptr IfcOrganization::Relates() const { return entity->getInverse(Type::IfcOrganizationRelationship)->as(); } -IfcPersonAndOrganization::list::ptr IfcOrganization::Engages() const { return entity->getInverse(Type::IfcPersonAndOrganization)->as(); } +IfcOrganizationRelationship::list::ptr IfcOrganization::IsRelatedBy() const { return entity->getInverse(Type::IfcOrganizationRelationship, 3)->as(); } +IfcOrganizationRelationship::list::ptr IfcOrganization::Relates() const { return entity->getInverse(Type::IfcOrganizationRelationship, 2)->as(); } +IfcPersonAndOrganization::list::ptr IfcOrganization::Engages() const { return entity->getInverse(Type::IfcPersonAndOrganization, 1)->as(); } bool IfcOrganization::is(Type::Enum v) const { return v == Type::IfcOrganization; } Type::Enum IfcOrganization::type() const { return Type::IfcOrganization; } Type::Enum IfcOrganization::Class() { return Type::IfcOrganization; } @@ -12544,7 +12544,7 @@ void IfcPerson::setRoles(IfcTemplatedEntityList< IfcActorRole >::ptr v) { if ( ! bool IfcPerson::hasAddresses() const { return !entity->getArgument(7)->isNull(); } IfcTemplatedEntityList< IfcAddress >::ptr IfcPerson::Addresses() const { IfcEntityList::ptr es = *entity->getArgument(7); return es->as(); } void IfcPerson::setAddresses(IfcTemplatedEntityList< IfcAddress >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v->generalize()); } -IfcPersonAndOrganization::list::ptr IfcPerson::EngagedIn() const { return entity->getInverse(Type::IfcPersonAndOrganization)->as(); } +IfcPersonAndOrganization::list::ptr IfcPerson::EngagedIn() const { return entity->getInverse(Type::IfcPersonAndOrganization, 0)->as(); } bool IfcPerson::is(Type::Enum v) const { return v == Type::IfcPerson; } Type::Enum IfcPerson::type() const { return Type::IfcPerson; } Type::Enum IfcPerson::Class() { return Type::IfcPerson; } @@ -12588,8 +12588,8 @@ void IfcPhysicalQuantity::setName(std::string v) { if ( ! entity->isWritable() ) bool IfcPhysicalQuantity::hasDescription() const { return !entity->getArgument(1)->isNull(); } std::string IfcPhysicalQuantity::Description() const { return *entity->getArgument(1); } void IfcPhysicalQuantity::setDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcExternalReferenceRelationship::list::ptr IfcPhysicalQuantity::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } -IfcPhysicalComplexQuantity::list::ptr IfcPhysicalQuantity::PartOfComplex() const { return entity->getInverse(Type::IfcPhysicalComplexQuantity)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcPhysicalQuantity::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } +IfcPhysicalComplexQuantity::list::ptr IfcPhysicalQuantity::PartOfComplex() const { return entity->getInverse(Type::IfcPhysicalComplexQuantity, 2)->as(); } bool IfcPhysicalQuantity::is(Type::Enum v) const { return v == Type::IfcPhysicalQuantity; } Type::Enum IfcPhysicalQuantity::type() const { return Type::IfcPhysicalQuantity; } Type::Enum IfcPhysicalQuantity::Class() { return Type::IfcPhysicalQuantity; } @@ -12802,9 +12802,9 @@ IfcPolyline::IfcPolyline(IfcAbstractEntity* e) : IfcBoundedCurve((IfcAbstractEnt IfcPolyline::IfcPolyline(IfcTemplatedEntityList< IfcCartesianPoint >::ptr v1_Points) : IfcBoundedCurve((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Points)->generalize()); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcPort -IfcRelConnectsPortToElement::list::ptr IfcPort::ContainedIn() const { return entity->getInverse(Type::IfcRelConnectsPortToElement)->as(); } -IfcRelConnectsPorts::list::ptr IfcPort::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsPorts)->as(); } -IfcRelConnectsPorts::list::ptr IfcPort::ConnectedTo() const { return entity->getInverse(Type::IfcRelConnectsPorts)->as(); } +IfcRelConnectsPortToElement::list::ptr IfcPort::ContainedIn() const { return entity->getInverse(Type::IfcRelConnectsPortToElement, 4)->as(); } +IfcRelConnectsPorts::list::ptr IfcPort::ConnectedFrom() const { return entity->getInverse(Type::IfcRelConnectsPorts, 5)->as(); } +IfcRelConnectsPorts::list::ptr IfcPort::ConnectedTo() const { return entity->getInverse(Type::IfcRelConnectsPorts, 4)->as(); } bool IfcPort::is(Type::Enum v) const { return v == Type::IfcPort || IfcProduct::is(v); } Type::Enum IfcPort::type() const { return Type::IfcPort; } Type::Enum IfcPort::Class() { return Type::IfcPort; } @@ -12967,9 +12967,9 @@ void IfcProcess::setIdentification(std::string v) { if ( ! entity->isWritable() bool IfcProcess::hasLongDescription() const { return !entity->getArgument(6)->isNull(); } std::string IfcProcess::LongDescription() const { return *entity->getArgument(6); } void IfcProcess::setLongDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcRelSequence::list::ptr IfcProcess::IsPredecessorTo() const { return entity->getInverse(Type::IfcRelSequence)->as(); } -IfcRelSequence::list::ptr IfcProcess::IsSuccessorFrom() const { return entity->getInverse(Type::IfcRelSequence)->as(); } -IfcRelAssignsToProcess::list::ptr IfcProcess::OperatesOn() const { return entity->getInverse(Type::IfcRelAssignsToProcess)->as(); } +IfcRelSequence::list::ptr IfcProcess::IsPredecessorTo() const { return entity->getInverse(Type::IfcRelSequence, 4)->as(); } +IfcRelSequence::list::ptr IfcProcess::IsSuccessorFrom() const { return entity->getInverse(Type::IfcRelSequence, 5)->as(); } +IfcRelAssignsToProcess::list::ptr IfcProcess::OperatesOn() const { return entity->getInverse(Type::IfcRelAssignsToProcess, 6)->as(); } bool IfcProcess::is(Type::Enum v) const { return v == Type::IfcProcess || IfcObject::is(v); } Type::Enum IfcProcess::type() const { return Type::IfcProcess; } Type::Enum IfcProcess::Class() { return Type::IfcProcess; } @@ -12983,7 +12983,7 @@ void IfcProduct::setObjectPlacement(IfcObjectPlacement* v) { if ( ! entity->isWr bool IfcProduct::hasRepresentation() const { return !entity->getArgument(6)->isNull(); } IfcProductRepresentation* IfcProduct::Representation() const { return (IfcProductRepresentation*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(6))); } void IfcProduct::setRepresentation(IfcProductRepresentation* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcRelAssignsToProduct::list::ptr IfcProduct::ReferencedBy() const { return entity->getInverse(Type::IfcRelAssignsToProduct)->as(); } +IfcRelAssignsToProduct::list::ptr IfcProduct::ReferencedBy() const { return entity->getInverse(Type::IfcRelAssignsToProduct, 6)->as(); } bool IfcProduct::is(Type::Enum v) const { return v == Type::IfcProduct || IfcObject::is(v); } Type::Enum IfcProduct::type() const { return Type::IfcProduct; } Type::Enum IfcProduct::Class() { return Type::IfcProduct; } @@ -12991,8 +12991,8 @@ IfcProduct::IfcProduct(IfcAbstractEntity* e) : IfcObject((IfcAbstractEntity*)0) IfcProduct::IfcProduct(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation) : IfcObject((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcProductDefinitionShape -IfcProduct::list::ptr IfcProductDefinitionShape::ShapeOfProduct() const { return entity->getInverse(Type::IfcProduct)->as(); } -IfcShapeAspect::list::ptr IfcProductDefinitionShape::HasShapeAspects() const { return entity->getInverse(Type::IfcShapeAspect)->as(); } +IfcProduct::list::ptr IfcProductDefinitionShape::ShapeOfProduct() const { return entity->getInverse(Type::IfcProduct, 6)->as(); } +IfcShapeAspect::list::ptr IfcProductDefinitionShape::HasShapeAspects() const { return entity->getInverse(Type::IfcShapeAspect, 4)->as(); } bool IfcProductDefinitionShape::is(Type::Enum v) const { return v == Type::IfcProductDefinitionShape || IfcProductRepresentation::is(v); } Type::Enum IfcProductDefinitionShape::type() const { return Type::IfcProductDefinitionShape; } Type::Enum IfcProductDefinitionShape::Class() { return Type::IfcProductDefinitionShape; } @@ -13020,8 +13020,8 @@ void IfcProfileDef::setProfileType(IfcProfileTypeEnum::IfcProfileTypeEnum v) { i bool IfcProfileDef::hasProfileName() const { return !entity->getArgument(1)->isNull(); } std::string IfcProfileDef::ProfileName() const { return *entity->getArgument(1); } void IfcProfileDef::setProfileName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcExternalReferenceRelationship::list::ptr IfcProfileDef::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } -IfcProfileProperties::list::ptr IfcProfileDef::HasProperties() const { return entity->getInverse(Type::IfcProfileProperties)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcProfileDef::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } +IfcProfileProperties::list::ptr IfcProfileDef::HasProperties() const { return entity->getInverse(Type::IfcProfileProperties, 3)->as(); } bool IfcProfileDef::is(Type::Enum v) const { return v == Type::IfcProfileDef; } Type::Enum IfcProfileDef::type() const { return Type::IfcProfileDef; } Type::Enum IfcProfileDef::Class() { return Type::IfcProfileDef; } @@ -13099,10 +13099,10 @@ void IfcProperty::setName(std::string v) { if ( ! entity->isWritable() ) { entit bool IfcProperty::hasDescription() const { return !entity->getArgument(1)->isNull(); } std::string IfcProperty::Description() const { return *entity->getArgument(1); } void IfcProperty::setDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcPropertySet::list::ptr IfcProperty::PartOfPset() const { return entity->getInverse(Type::IfcPropertySet)->as(); } -IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyForDependance() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship)->as(); } -IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyDependsOn() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship)->as(); } -IfcComplexProperty::list::ptr IfcProperty::PartOfComplex() const { return entity->getInverse(Type::IfcComplexProperty)->as(); } +IfcPropertySet::list::ptr IfcProperty::PartOfPset() const { return entity->getInverse(Type::IfcPropertySet, 4)->as(); } +IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyForDependance() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship, 2)->as(); } +IfcPropertyDependencyRelationship::list::ptr IfcProperty::PropertyDependsOn() const { return entity->getInverse(Type::IfcPropertyDependencyRelationship, 3)->as(); } +IfcComplexProperty::list::ptr IfcProperty::PartOfComplex() const { return entity->getInverse(Type::IfcComplexProperty, 3)->as(); } bool IfcProperty::is(Type::Enum v) const { return v == Type::IfcProperty || IfcPropertyAbstraction::is(v); } Type::Enum IfcProperty::type() const { return Type::IfcProperty; } Type::Enum IfcProperty::Class() { return Type::IfcProperty; } @@ -13110,7 +13110,7 @@ IfcProperty::IfcProperty(IfcAbstractEntity* e) : IfcPropertyAbstraction((IfcAbst IfcProperty::IfcProperty(std::string v1_Name, boost::optional< std::string > v2_Description) : IfcPropertyAbstraction((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Name)); if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcPropertyAbstraction -IfcExternalReferenceRelationship::list::ptr IfcPropertyAbstraction::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcPropertyAbstraction::HasExternalReferences() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } bool IfcPropertyAbstraction::is(Type::Enum v) const { return v == Type::IfcPropertyAbstraction; } Type::Enum IfcPropertyAbstraction::type() const { return Type::IfcPropertyAbstraction; } Type::Enum IfcPropertyAbstraction::Class() { return Type::IfcPropertyAbstraction; } @@ -13137,8 +13137,8 @@ IfcPropertyBoundedValue::IfcPropertyBoundedValue(IfcAbstractEntity* e) : IfcSimp IfcPropertyBoundedValue::IfcPropertyBoundedValue(std::string v1_Name, boost::optional< std::string > v2_Description, IfcValue* v3_UpperBoundValue, IfcValue* v4_LowerBoundValue, IfcUnit* v5_Unit, IfcValue* v6_SetPointValue) : IfcSimpleProperty((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Name)); if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } e->setArgument(2,(v3_UpperBoundValue)); e->setArgument(3,(v4_LowerBoundValue)); e->setArgument(4,(v5_Unit)); e->setArgument(5,(v6_SetPointValue)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcPropertyDefinition -IfcRelDeclares::list::ptr IfcPropertyDefinition::HasContext() const { return entity->getInverse(Type::IfcRelDeclares)->as(); } -IfcRelAssociates::list::ptr IfcPropertyDefinition::HasAssociations() const { return entity->getInverse(Type::IfcRelAssociates)->as(); } +IfcRelDeclares::list::ptr IfcPropertyDefinition::HasContext() const { return entity->getInverse(Type::IfcRelDeclares, 5)->as(); } +IfcRelAssociates::list::ptr IfcPropertyDefinition::HasAssociations() const { return entity->getInverse(Type::IfcRelAssociates, 4)->as(); } bool IfcPropertyDefinition::is(Type::Enum v) const { return v == Type::IfcPropertyDefinition || IfcRoot::is(v); } Type::Enum IfcPropertyDefinition::type() const { return Type::IfcPropertyDefinition; } Type::Enum IfcPropertyDefinition::Class() { return Type::IfcPropertyDefinition; } @@ -13222,9 +13222,9 @@ IfcPropertySet::IfcPropertySet(IfcAbstractEntity* e) : IfcPropertySetDefinition( IfcPropertySet::IfcPropertySet(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, IfcTemplatedEntityList< IfcProperty >::ptr v5_HasProperties) : IfcPropertySetDefinition((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } e->setArgument(4,(v5_HasProperties)->generalize()); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcPropertySetDefinition -IfcTypeObject::list::ptr IfcPropertySetDefinition::DefinesType() const { return entity->getInverse(Type::IfcTypeObject)->as(); } -IfcRelDefinesByTemplate::list::ptr IfcPropertySetDefinition::IsDefinedBy() const { return entity->getInverse(Type::IfcRelDefinesByTemplate)->as(); } -IfcRelDefinesByProperties::list::ptr IfcPropertySetDefinition::DefinesOccurrence() const { return entity->getInverse(Type::IfcRelDefinesByProperties)->as(); } +IfcTypeObject::list::ptr IfcPropertySetDefinition::DefinesType() const { return entity->getInverse(Type::IfcTypeObject, 5)->as(); } +IfcRelDefinesByTemplate::list::ptr IfcPropertySetDefinition::IsDefinedBy() const { return entity->getInverse(Type::IfcRelDefinesByTemplate, 4)->as(); } +IfcRelDefinesByProperties::list::ptr IfcPropertySetDefinition::DefinesOccurrence() const { return entity->getInverse(Type::IfcRelDefinesByProperties, 5)->as(); } bool IfcPropertySetDefinition::is(Type::Enum v) const { return v == Type::IfcPropertySetDefinition || IfcPropertyDefinition::is(v); } Type::Enum IfcPropertySetDefinition::type() const { return Type::IfcPropertySetDefinition; } Type::Enum IfcPropertySetDefinition::Class() { return Type::IfcPropertySetDefinition; } @@ -13240,7 +13240,7 @@ std::string IfcPropertySetTemplate::ApplicableEntity() const { return *entity->g void IfcPropertySetTemplate::setApplicableEntity(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v); } IfcTemplatedEntityList< IfcPropertyTemplate >::ptr IfcPropertySetTemplate::HasPropertyTemplates() const { IfcEntityList::ptr es = *entity->getArgument(6); return es->as(); } void IfcPropertySetTemplate::setHasPropertyTemplates(IfcTemplatedEntityList< IfcPropertyTemplate >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v->generalize()); } -IfcRelDefinesByTemplate::list::ptr IfcPropertySetTemplate::Defines() const { return entity->getInverse(Type::IfcRelDefinesByTemplate)->as(); } +IfcRelDefinesByTemplate::list::ptr IfcPropertySetTemplate::Defines() const { return entity->getInverse(Type::IfcRelDefinesByTemplate, 5)->as(); } bool IfcPropertySetTemplate::is(Type::Enum v) const { return v == Type::IfcPropertySetTemplate || IfcPropertyTemplateDefinition::is(v); } Type::Enum IfcPropertySetTemplate::type() const { return Type::IfcPropertySetTemplate; } Type::Enum IfcPropertySetTemplate::Class() { return Type::IfcPropertySetTemplate; } @@ -13286,8 +13286,8 @@ IfcPropertyTableValue::IfcPropertyTableValue(IfcAbstractEntity* e) : IfcSimplePr IfcPropertyTableValue::IfcPropertyTableValue(std::string v1_Name, boost::optional< std::string > v2_Description, boost::optional< IfcEntityList::ptr > v3_DefiningValues, boost::optional< IfcEntityList::ptr > v4_DefinedValues, boost::optional< std::string > v5_Expression, IfcUnit* v6_DefiningUnit, IfcUnit* v7_DefinedUnit, boost::optional< IfcCurveInterpolationEnum::IfcCurveInterpolationEnum > v8_CurveInterpolation) : IfcSimpleProperty((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_Name)); if (v2_Description) { e->setArgument(1,(*v2_Description)); } else { e->setArgument(1); } if (v3_DefiningValues) { e->setArgument(2,(*v3_DefiningValues)); } else { e->setArgument(2); } if (v4_DefinedValues) { e->setArgument(3,(*v4_DefinedValues)); } else { e->setArgument(3); } if (v5_Expression) { e->setArgument(4,(*v5_Expression)); } else { e->setArgument(4); } e->setArgument(5,(v6_DefiningUnit)); e->setArgument(6,(v7_DefinedUnit)); if (v8_CurveInterpolation) { e->setArgument(7,*v8_CurveInterpolation,IfcCurveInterpolationEnum::ToString(*v8_CurveInterpolation)); } else { e->setArgument(7); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcPropertyTemplate -IfcComplexPropertyTemplate::list::ptr IfcPropertyTemplate::PartOfComplexTemplate() const { return entity->getInverse(Type::IfcComplexPropertyTemplate)->as(); } -IfcPropertySetTemplate::list::ptr IfcPropertyTemplate::PartOfPsetTemplate() const { return entity->getInverse(Type::IfcPropertySetTemplate)->as(); } +IfcComplexPropertyTemplate::list::ptr IfcPropertyTemplate::PartOfComplexTemplate() const { return entity->getInverse(Type::IfcComplexPropertyTemplate, 6)->as(); } +IfcPropertySetTemplate::list::ptr IfcPropertyTemplate::PartOfPsetTemplate() const { return entity->getInverse(Type::IfcPropertySetTemplate, 6)->as(); } bool IfcPropertyTemplate::is(Type::Enum v) const { return v == Type::IfcPropertyTemplate || IfcPropertyTemplateDefinition::is(v); } Type::Enum IfcPropertyTemplate::type() const { return Type::IfcPropertyTemplate; } Type::Enum IfcPropertyTemplate::Class() { return Type::IfcPropertyTemplate; } @@ -14322,7 +14322,7 @@ IfcRelSpaceBoundary::IfcRelSpaceBoundary(std::string v1_GlobalId, IfcOwnerHistor bool IfcRelSpaceBoundary1stLevel::hasParentBoundary() const { return !entity->getArgument(9)->isNull(); } IfcRelSpaceBoundary1stLevel* IfcRelSpaceBoundary1stLevel::ParentBoundary() const { return (IfcRelSpaceBoundary1stLevel*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(9))); } void IfcRelSpaceBoundary1stLevel::setParentBoundary(IfcRelSpaceBoundary1stLevel* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v); } -IfcRelSpaceBoundary1stLevel::list::ptr IfcRelSpaceBoundary1stLevel::InnerBoundaries() const { return entity->getInverse(Type::IfcRelSpaceBoundary1stLevel)->as(); } +IfcRelSpaceBoundary1stLevel::list::ptr IfcRelSpaceBoundary1stLevel::InnerBoundaries() const { return entity->getInverse(Type::IfcRelSpaceBoundary1stLevel, 9)->as(); } bool IfcRelSpaceBoundary1stLevel::is(Type::Enum v) const { return v == Type::IfcRelSpaceBoundary1stLevel || IfcRelSpaceBoundary::is(v); } Type::Enum IfcRelSpaceBoundary1stLevel::type() const { return Type::IfcRelSpaceBoundary1stLevel; } Type::Enum IfcRelSpaceBoundary1stLevel::Class() { return Type::IfcRelSpaceBoundary1stLevel; } @@ -14333,7 +14333,7 @@ IfcRelSpaceBoundary1stLevel::IfcRelSpaceBoundary1stLevel(std::string v1_GlobalId bool IfcRelSpaceBoundary2ndLevel::hasCorrespondingBoundary() const { return !entity->getArgument(10)->isNull(); } IfcRelSpaceBoundary2ndLevel* IfcRelSpaceBoundary2ndLevel::CorrespondingBoundary() const { return (IfcRelSpaceBoundary2ndLevel*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(10))); } void IfcRelSpaceBoundary2ndLevel::setCorrespondingBoundary(IfcRelSpaceBoundary2ndLevel* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(10,v); } -IfcRelSpaceBoundary2ndLevel::list::ptr IfcRelSpaceBoundary2ndLevel::Corresponds() const { return entity->getInverse(Type::IfcRelSpaceBoundary2ndLevel)->as(); } +IfcRelSpaceBoundary2ndLevel::list::ptr IfcRelSpaceBoundary2ndLevel::Corresponds() const { return entity->getInverse(Type::IfcRelSpaceBoundary2ndLevel, 10)->as(); } bool IfcRelSpaceBoundary2ndLevel::is(Type::Enum v) const { return v == Type::IfcRelSpaceBoundary2ndLevel || IfcRelSpaceBoundary1stLevel::is(v); } Type::Enum IfcRelSpaceBoundary2ndLevel::type() const { return Type::IfcRelSpaceBoundary2ndLevel; } Type::Enum IfcRelSpaceBoundary2ndLevel::Class() { return Type::IfcRelSpaceBoundary2ndLevel; } @@ -14378,9 +14378,9 @@ std::string IfcRepresentation::RepresentationType() const { return *entity->getA void IfcRepresentation::setRepresentationType(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } IfcTemplatedEntityList< IfcRepresentationItem >::ptr IfcRepresentation::Items() const { IfcEntityList::ptr es = *entity->getArgument(3); return es->as(); } void IfcRepresentation::setItems(IfcTemplatedEntityList< IfcRepresentationItem >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(3,v->generalize()); } -IfcRepresentationMap::list::ptr IfcRepresentation::RepresentationMap() const { return entity->getInverse(Type::IfcRepresentationMap)->as(); } -IfcPresentationLayerAssignment::list::ptr IfcRepresentation::LayerAssignments() const { return entity->getInverse(Type::IfcPresentationLayerAssignment)->as(); } -IfcProductRepresentation::list::ptr IfcRepresentation::OfProductRepresentation() const { return entity->getInverse(Type::IfcProductRepresentation)->as(); } +IfcRepresentationMap::list::ptr IfcRepresentation::RepresentationMap() const { return entity->getInverse(Type::IfcRepresentationMap, 1)->as(); } +IfcPresentationLayerAssignment::list::ptr IfcRepresentation::LayerAssignments() const { return entity->getInverse(Type::IfcPresentationLayerAssignment, 2)->as(); } +IfcProductRepresentation::list::ptr IfcRepresentation::OfProductRepresentation() const { return entity->getInverse(Type::IfcProductRepresentation, 2)->as(); } bool IfcRepresentation::is(Type::Enum v) const { return v == Type::IfcRepresentation; } Type::Enum IfcRepresentation::type() const { return Type::IfcRepresentation; } Type::Enum IfcRepresentation::Class() { return Type::IfcRepresentation; } @@ -14394,7 +14394,7 @@ void IfcRepresentationContext::setContextIdentifier(std::string v) { if ( ! enti bool IfcRepresentationContext::hasContextType() const { return !entity->getArgument(1)->isNull(); } std::string IfcRepresentationContext::ContextType() const { return *entity->getArgument(1); } void IfcRepresentationContext::setContextType(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcRepresentation::list::ptr IfcRepresentationContext::RepresentationsInContext() const { return entity->getInverse(Type::IfcRepresentation)->as(); } +IfcRepresentation::list::ptr IfcRepresentationContext::RepresentationsInContext() const { return entity->getInverse(Type::IfcRepresentation, 0)->as(); } bool IfcRepresentationContext::is(Type::Enum v) const { return v == Type::IfcRepresentationContext; } Type::Enum IfcRepresentationContext::type() const { return Type::IfcRepresentationContext; } Type::Enum IfcRepresentationContext::Class() { return Type::IfcRepresentationContext; } @@ -14402,8 +14402,8 @@ IfcRepresentationContext::IfcRepresentationContext(IfcAbstractEntity* e) : IfcUt IfcRepresentationContext::IfcRepresentationContext(boost::optional< std::string > v1_ContextIdentifier, boost::optional< std::string > v2_ContextType) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_ContextIdentifier) { e->setArgument(0,(*v1_ContextIdentifier)); } else { e->setArgument(0); } if (v2_ContextType) { e->setArgument(1,(*v2_ContextType)); } else { e->setArgument(1); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcRepresentationItem -IfcPresentationLayerAssignment::list::ptr IfcRepresentationItem::LayerAssignment() const { return entity->getInverse(Type::IfcPresentationLayerAssignment)->as(); } -IfcStyledItem::list::ptr IfcRepresentationItem::StyledByItem() const { return entity->getInverse(Type::IfcStyledItem)->as(); } +IfcPresentationLayerAssignment::list::ptr IfcRepresentationItem::LayerAssignment() const { return entity->getInverse(Type::IfcPresentationLayerAssignment, 2)->as(); } +IfcStyledItem::list::ptr IfcRepresentationItem::StyledByItem() const { return entity->getInverse(Type::IfcStyledItem, 0)->as(); } bool IfcRepresentationItem::is(Type::Enum v) const { return v == Type::IfcRepresentationItem; } Type::Enum IfcRepresentationItem::type() const { return Type::IfcRepresentationItem; } Type::Enum IfcRepresentationItem::Class() { return Type::IfcRepresentationItem; } @@ -14415,8 +14415,8 @@ IfcAxis2Placement* IfcRepresentationMap::MappingOrigin() const { return (IfcAxis void IfcRepresentationMap::setMappingOrigin(IfcAxis2Placement* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(0,v); } IfcRepresentation* IfcRepresentationMap::MappedRepresentation() const { return (IfcRepresentation*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(1))); } void IfcRepresentationMap::setMappedRepresentation(IfcRepresentation* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcShapeAspect::list::ptr IfcRepresentationMap::HasShapeAspects() const { return entity->getInverse(Type::IfcShapeAspect)->as(); } -IfcMappedItem::list::ptr IfcRepresentationMap::MapUsage() const { return entity->getInverse(Type::IfcMappedItem)->as(); } +IfcShapeAspect::list::ptr IfcRepresentationMap::HasShapeAspects() const { return entity->getInverse(Type::IfcShapeAspect, 4)->as(); } +IfcMappedItem::list::ptr IfcRepresentationMap::MapUsage() const { return entity->getInverse(Type::IfcMappedItem, 0)->as(); } bool IfcRepresentationMap::is(Type::Enum v) const { return v == Type::IfcRepresentationMap; } Type::Enum IfcRepresentationMap::type() const { return Type::IfcRepresentationMap; } Type::Enum IfcRepresentationMap::Class() { return Type::IfcRepresentationMap; } @@ -14430,7 +14430,7 @@ void IfcResource::setIdentification(std::string v) { if ( ! entity->isWritable() bool IfcResource::hasLongDescription() const { return !entity->getArgument(6)->isNull(); } std::string IfcResource::LongDescription() const { return *entity->getArgument(6); } void IfcResource::setLongDescription(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } -IfcRelAssignsToResource::list::ptr IfcResource::ResourceOf() const { return entity->getInverse(Type::IfcRelAssignsToResource)->as(); } +IfcRelAssignsToResource::list::ptr IfcResource::ResourceOf() const { return entity->getInverse(Type::IfcRelAssignsToResource, 6)->as(); } bool IfcResource::is(Type::Enum v) const { return v == Type::IfcResource || IfcObject::is(v); } Type::Enum IfcResource::type() const { return Type::IfcResource; } Type::Enum IfcResource::Class() { return Type::IfcResource; } @@ -14765,7 +14765,7 @@ IfcShapeAspect::IfcShapeAspect(IfcAbstractEntity* e) : IfcUtil::IfcBaseEntity() IfcShapeAspect::IfcShapeAspect(IfcTemplatedEntityList< IfcShapeModel >::ptr v1_ShapeRepresentations, boost::optional< std::string > v2_Name, boost::optional< std::string > v3_Description, bool v4_ProductDefinitional, IfcProductRepresentationSelect* v5_PartOfProductDefinitionShape) : IfcUtil::IfcBaseEntity() { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_ShapeRepresentations)->generalize()); if (v2_Name) { e->setArgument(1,(*v2_Name)); } else { e->setArgument(1); } if (v3_Description) { e->setArgument(2,(*v3_Description)); } else { e->setArgument(2); } e->setArgument(3,(v4_ProductDefinitional)); e->setArgument(4,(v5_PartOfProductDefinitionShape)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcShapeModel -IfcShapeAspect::list::ptr IfcShapeModel::OfShapeAspect() const { return entity->getInverse(Type::IfcShapeAspect)->as(); } +IfcShapeAspect::list::ptr IfcShapeModel::OfShapeAspect() const { return entity->getInverse(Type::IfcShapeAspect, 0)->as(); } bool IfcShapeModel::is(Type::Enum v) const { return v == Type::IfcShapeModel || IfcRepresentation::is(v); } Type::Enum IfcShapeModel::type() const { return Type::IfcShapeModel; } Type::Enum IfcShapeModel::Class() { return Type::IfcShapeModel; } @@ -14930,8 +14930,8 @@ void IfcSpace::setPredefinedType(IfcSpaceTypeEnum::IfcSpaceTypeEnum v) { if ( ! bool IfcSpace::hasElevationWithFlooring() const { return !entity->getArgument(10)->isNull(); } double IfcSpace::ElevationWithFlooring() const { return *entity->getArgument(10); } void IfcSpace::setElevationWithFlooring(double v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(10,v); } -IfcRelCoversSpaces::list::ptr IfcSpace::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversSpaces)->as(); } -IfcRelSpaceBoundary::list::ptr IfcSpace::BoundedBy() const { return entity->getInverse(Type::IfcRelSpaceBoundary)->as(); } +IfcRelCoversSpaces::list::ptr IfcSpace::HasCoverings() const { return entity->getInverse(Type::IfcRelCoversSpaces, 4)->as(); } +IfcRelSpaceBoundary::list::ptr IfcSpace::BoundedBy() const { return entity->getInverse(Type::IfcRelSpaceBoundary, 4)->as(); } bool IfcSpace::is(Type::Enum v) const { return v == Type::IfcSpace || IfcSpatialStructureElement::is(v); } Type::Enum IfcSpace::type() const { return Type::IfcSpace; } Type::Enum IfcSpace::Class() { return Type::IfcSpace; } @@ -14973,9 +14973,9 @@ IfcSpaceType::IfcSpaceType(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHis bool IfcSpatialElement::hasLongName() const { return !entity->getArgument(7)->isNull(); } std::string IfcSpatialElement::LongName() const { return *entity->getArgument(7); } void IfcSpatialElement::setLongName(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcRelContainedInSpatialStructure::list::ptr IfcSpatialElement::ContainsElements() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure)->as(); } -IfcRelServicesBuildings::list::ptr IfcSpatialElement::ServicedBySystems() const { return entity->getInverse(Type::IfcRelServicesBuildings)->as(); } -IfcRelReferencedInSpatialStructure::list::ptr IfcSpatialElement::ReferencesElements() const { return entity->getInverse(Type::IfcRelReferencedInSpatialStructure)->as(); } +IfcRelContainedInSpatialStructure::list::ptr IfcSpatialElement::ContainsElements() const { return entity->getInverse(Type::IfcRelContainedInSpatialStructure, 5)->as(); } +IfcRelServicesBuildings::list::ptr IfcSpatialElement::ServicedBySystems() const { return entity->getInverse(Type::IfcRelServicesBuildings, 5)->as(); } +IfcRelReferencedInSpatialStructure::list::ptr IfcSpatialElement::ReferencesElements() const { return entity->getInverse(Type::IfcRelReferencedInSpatialStructure, 5)->as(); } bool IfcSpatialElement::is(Type::Enum v) const { return v == Type::IfcSpatialElement || IfcProduct::is(v); } Type::Enum IfcSpatialElement::type() const { return Type::IfcSpatialElement; } Type::Enum IfcSpatialElement::Class() { return Type::IfcSpatialElement; } @@ -15124,7 +15124,7 @@ IfcStructuralLoad* IfcStructuralActivity::AppliedLoad() const { return (IfcStruc void IfcStructuralActivity::setAppliedLoad(IfcStructuralLoad* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } IfcGlobalOrLocalEnum::IfcGlobalOrLocalEnum IfcStructuralActivity::GlobalOrLocal() const { return IfcGlobalOrLocalEnum::FromString(*entity->getArgument(8)); } void IfcStructuralActivity::setGlobalOrLocal(IfcGlobalOrLocalEnum::IfcGlobalOrLocalEnum v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v,IfcGlobalOrLocalEnum::ToString(v)); } -IfcRelConnectsStructuralActivity::list::ptr IfcStructuralActivity::AssignedToStructuralItem() const { return entity->getInverse(Type::IfcRelConnectsStructuralActivity)->as(); } +IfcRelConnectsStructuralActivity::list::ptr IfcStructuralActivity::AssignedToStructuralItem() const { return entity->getInverse(Type::IfcRelConnectsStructuralActivity, 5)->as(); } bool IfcStructuralActivity::is(Type::Enum v) const { return v == Type::IfcStructuralActivity || IfcProduct::is(v); } Type::Enum IfcStructuralActivity::type() const { return Type::IfcStructuralActivity; } Type::Enum IfcStructuralActivity::Class() { return Type::IfcStructuralActivity; } @@ -15156,7 +15156,7 @@ IfcStructuralAnalysisModel::IfcStructuralAnalysisModel(std::string v1_GlobalId, bool IfcStructuralConnection::hasAppliedCondition() const { return !entity->getArgument(7)->isNull(); } IfcBoundaryCondition* IfcStructuralConnection::AppliedCondition() const { return (IfcBoundaryCondition*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(7))); } void IfcStructuralConnection::setAppliedCondition(IfcBoundaryCondition* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcRelConnectsStructuralMember::list::ptr IfcStructuralConnection::ConnectsStructuralMembers() const { return entity->getInverse(Type::IfcRelConnectsStructuralMember)->as(); } +IfcRelConnectsStructuralMember::list::ptr IfcStructuralConnection::ConnectsStructuralMembers() const { return entity->getInverse(Type::IfcRelConnectsStructuralMember, 5)->as(); } bool IfcStructuralConnection::is(Type::Enum v) const { return v == Type::IfcStructuralConnection || IfcStructuralItem::is(v); } Type::Enum IfcStructuralConnection::type() const { return Type::IfcStructuralConnection; } Type::Enum IfcStructuralConnection::Class() { return Type::IfcStructuralConnection; } @@ -15222,7 +15222,7 @@ IfcStructuralCurveReaction::IfcStructuralCurveReaction(IfcAbstractEntity* e) : I IfcStructuralCurveReaction::IfcStructuralCurveReaction(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ObjectType, IfcObjectPlacement* v6_ObjectPlacement, IfcProductRepresentation* v7_Representation, IfcStructuralLoad* v8_AppliedLoad, IfcGlobalOrLocalEnum::IfcGlobalOrLocalEnum v9_GlobalOrLocal, IfcStructuralCurveActivityTypeEnum::IfcStructuralCurveActivityTypeEnum v10_PredefinedType) : IfcStructuralReaction((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ObjectType) { e->setArgument(4,(*v5_ObjectType)); } else { e->setArgument(4); } e->setArgument(5,(v6_ObjectPlacement)); e->setArgument(6,(v7_Representation)); e->setArgument(7,(v8_AppliedLoad)); e->setArgument(8,v9_GlobalOrLocal,IfcGlobalOrLocalEnum::ToString(v9_GlobalOrLocal)); e->setArgument(9,v10_PredefinedType,IfcStructuralCurveActivityTypeEnum::ToString(v10_PredefinedType)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcStructuralItem -IfcRelConnectsStructuralActivity::list::ptr IfcStructuralItem::AssignedStructuralActivity() const { return entity->getInverse(Type::IfcRelConnectsStructuralActivity)->as(); } +IfcRelConnectsStructuralActivity::list::ptr IfcStructuralItem::AssignedStructuralActivity() const { return entity->getInverse(Type::IfcRelConnectsStructuralActivity, 4)->as(); } bool IfcStructuralItem::is(Type::Enum v) const { return v == Type::IfcStructuralItem || IfcProduct::is(v); } Type::Enum IfcStructuralItem::type() const { return Type::IfcStructuralItem; } Type::Enum IfcStructuralItem::Class() { return Type::IfcStructuralItem; } @@ -15278,8 +15278,8 @@ void IfcStructuralLoadGroup::setCoefficient(double v) { if ( ! entity->isWritabl bool IfcStructuralLoadGroup::hasPurpose() const { return !entity->getArgument(9)->isNull(); } std::string IfcStructuralLoadGroup::Purpose() const { return *entity->getArgument(9); } void IfcStructuralLoadGroup::setPurpose(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(9,v); } -IfcStructuralResultGroup::list::ptr IfcStructuralLoadGroup::SourceOfResultGroup() const { return entity->getInverse(Type::IfcStructuralResultGroup)->as(); } -IfcStructuralAnalysisModel::list::ptr IfcStructuralLoadGroup::LoadGroupFor() const { return entity->getInverse(Type::IfcStructuralAnalysisModel)->as(); } +IfcStructuralResultGroup::list::ptr IfcStructuralLoadGroup::SourceOfResultGroup() const { return entity->getInverse(Type::IfcStructuralResultGroup, 6)->as(); } +IfcStructuralAnalysisModel::list::ptr IfcStructuralLoadGroup::LoadGroupFor() const { return entity->getInverse(Type::IfcStructuralAnalysisModel, 7)->as(); } bool IfcStructuralLoadGroup::is(Type::Enum v) const { return v == Type::IfcStructuralLoadGroup || IfcGroup::is(v); } Type::Enum IfcStructuralLoadGroup::type() const { return Type::IfcStructuralLoadGroup; } Type::Enum IfcStructuralLoadGroup::Class() { return Type::IfcStructuralLoadGroup; } @@ -15428,7 +15428,7 @@ IfcStructuralLoadTemperature::IfcStructuralLoadTemperature(IfcAbstractEntity* e) IfcStructuralLoadTemperature::IfcStructuralLoadTemperature(boost::optional< std::string > v1_Name, boost::optional< double > v2_DeltaTConstant, boost::optional< double > v3_DeltaTY, boost::optional< double > v4_DeltaTZ) : IfcStructuralLoadStatic((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); if (v1_Name) { e->setArgument(0,(*v1_Name)); } else { e->setArgument(0); } if (v2_DeltaTConstant) { e->setArgument(1,(*v2_DeltaTConstant)); } else { e->setArgument(1); } if (v3_DeltaTY) { e->setArgument(2,(*v3_DeltaTY)); } else { e->setArgument(2); } if (v4_DeltaTZ) { e->setArgument(3,(*v4_DeltaTZ)); } else { e->setArgument(3); } entity = e; EntityBuffer::Add(this); } // Function implementations for IfcStructuralMember -IfcRelConnectsStructuralMember::list::ptr IfcStructuralMember::ConnectedBy() const { return entity->getInverse(Type::IfcRelConnectsStructuralMember)->as(); } +IfcRelConnectsStructuralMember::list::ptr IfcStructuralMember::ConnectedBy() const { return entity->getInverse(Type::IfcRelConnectsStructuralMember, 4)->as(); } bool IfcStructuralMember::is(Type::Enum v) const { return v == Type::IfcStructuralMember || IfcStructuralItem::is(v); } Type::Enum IfcStructuralMember::type() const { return Type::IfcStructuralMember; } Type::Enum IfcStructuralMember::Class() { return Type::IfcStructuralMember; } @@ -15481,7 +15481,7 @@ IfcStructuralLoadGroup* IfcStructuralResultGroup::ResultForLoadGroup() const { r void IfcStructuralResultGroup::setResultForLoadGroup(IfcStructuralLoadGroup* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(6,v); } bool IfcStructuralResultGroup::IsLinear() const { return *entity->getArgument(7); } void IfcStructuralResultGroup::setIsLinear(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcStructuralAnalysisModel::list::ptr IfcStructuralResultGroup::ResultGroupFor() const { return entity->getInverse(Type::IfcStructuralAnalysisModel)->as(); } +IfcStructuralAnalysisModel::list::ptr IfcStructuralResultGroup::ResultGroupFor() const { return entity->getInverse(Type::IfcStructuralAnalysisModel, 8)->as(); } bool IfcStructuralResultGroup::is(Type::Enum v) const { return v == Type::IfcStructuralResultGroup || IfcGroup::is(v); } Type::Enum IfcStructuralResultGroup::type() const { return Type::IfcStructuralResultGroup; } Type::Enum IfcStructuralResultGroup::Class() { return Type::IfcStructuralResultGroup; } @@ -15763,8 +15763,8 @@ void IfcSurfaceTexture::setTextureTransform(IfcCartesianTransformationOperator2D bool IfcSurfaceTexture::hasParameter() const { return !entity->getArgument(4)->isNull(); } std::vector< std::string > /*[1:?]*/ IfcSurfaceTexture::Parameter() const { return *entity->getArgument(4); } void IfcSurfaceTexture::setParameter(std::vector< std::string > /*[1:?]*/ v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(4,v); } -IfcTextureCoordinate::list::ptr IfcSurfaceTexture::IsMappedBy() const { return entity->getInverse(Type::IfcTextureCoordinate)->as(); } -IfcSurfaceStyleWithTextures::list::ptr IfcSurfaceTexture::UsedInStyles() const { return entity->getInverse(Type::IfcSurfaceStyleWithTextures)->as(); } +IfcTextureCoordinate::list::ptr IfcSurfaceTexture::IsMappedBy() const { return entity->getInverse(Type::IfcTextureCoordinate, 0)->as(); } +IfcSurfaceStyleWithTextures::list::ptr IfcSurfaceTexture::UsedInStyles() const { return entity->getInverse(Type::IfcSurfaceStyleWithTextures, 0)->as(); } bool IfcSurfaceTexture::is(Type::Enum v) const { return v == Type::IfcSurfaceTexture || IfcPresentationItem::is(v); } Type::Enum IfcSurfaceTexture::type() const { return Type::IfcSurfaceTexture; } Type::Enum IfcSurfaceTexture::Class() { return Type::IfcSurfaceTexture; } @@ -15845,7 +15845,7 @@ IfcSwitchingDeviceType::IfcSwitchingDeviceType(IfcAbstractEntity* e) : IfcFlowCo IfcSwitchingDeviceType::IfcSwitchingDeviceType(std::string v1_GlobalId, IfcOwnerHistory* v2_OwnerHistory, boost::optional< std::string > v3_Name, boost::optional< std::string > v4_Description, boost::optional< std::string > v5_ApplicableOccurrence, boost::optional< IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr > v6_HasPropertySets, boost::optional< IfcTemplatedEntityList< IfcRepresentationMap >::ptr > v7_RepresentationMaps, boost::optional< std::string > v8_Tag, boost::optional< std::string > v9_ElementType, IfcSwitchingDeviceTypeEnum::IfcSwitchingDeviceTypeEnum v10_PredefinedType) : IfcFlowControllerType((IfcAbstractEntity*)0) { IfcWritableEntity* e = new IfcWritableEntity(Class()); e->setArgument(0,(v1_GlobalId)); e->setArgument(1,(v2_OwnerHistory)); if (v3_Name) { e->setArgument(2,(*v3_Name)); } else { e->setArgument(2); } if (v4_Description) { e->setArgument(3,(*v4_Description)); } else { e->setArgument(3); } if (v5_ApplicableOccurrence) { e->setArgument(4,(*v5_ApplicableOccurrence)); } else { e->setArgument(4); } if (v6_HasPropertySets) { e->setArgument(5,(*v6_HasPropertySets)->generalize()); } else { e->setArgument(5); } if (v7_RepresentationMaps) { e->setArgument(6,(*v7_RepresentationMaps)->generalize()); } else { e->setArgument(6); } if (v8_Tag) { e->setArgument(7,(*v8_Tag)); } else { e->setArgument(7); } if (v9_ElementType) { e->setArgument(8,(*v9_ElementType)); } else { e->setArgument(8); } e->setArgument(9,v10_PredefinedType,IfcSwitchingDeviceTypeEnum::ToString(v10_PredefinedType)); entity = e; EntityBuffer::Add(this); } // Function implementations for IfcSystem -IfcRelServicesBuildings::list::ptr IfcSystem::ServicesBuildings() const { return entity->getInverse(Type::IfcRelServicesBuildings)->as(); } +IfcRelServicesBuildings::list::ptr IfcSystem::ServicesBuildings() const { return entity->getInverse(Type::IfcRelServicesBuildings, 4)->as(); } bool IfcSystem::is(Type::Enum v) const { return v == Type::IfcSystem || IfcGroup::is(v); } Type::Enum IfcSystem::type() const { return Type::IfcSystem; } Type::Enum IfcSystem::Class() { return Type::IfcSystem; } @@ -15947,7 +15947,7 @@ void IfcTableRow::setRowCells(IfcEntityList::ptr v) { if ( ! entity->isWritable( bool IfcTableRow::hasIsHeading() const { return !entity->getArgument(1)->isNull(); } bool IfcTableRow::IsHeading() const { return *entity->getArgument(1); } void IfcTableRow::setIsHeading(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(1,v); } -IfcTable::list::ptr IfcTableRow::OfTable() const { return entity->getInverse(Type::IfcTable)->as(); } +IfcTable::list::ptr IfcTableRow::OfTable() const { return entity->getInverse(Type::IfcTable, 1)->as(); } bool IfcTableRow::is(Type::Enum v) const { return v == Type::IfcTableRow; } Type::Enum IfcTableRow::type() const { return Type::IfcTableRow; } Type::Enum IfcTableRow::Class() { return Type::IfcTableRow; } @@ -16175,8 +16175,8 @@ void IfcTessellatedFaceSet::setCoordinates(IfcCartesianPointList3D* v) { if ( ! bool IfcTessellatedFaceSet::hasClosed() const { return !entity->getArgument(2)->isNull(); } bool IfcTessellatedFaceSet::Closed() const { return *entity->getArgument(2); } void IfcTessellatedFaceSet::setClosed(bool v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(2,v); } -IfcIndexedColourMap::list::ptr IfcTessellatedFaceSet::HasColours() const { return entity->getInverse(Type::IfcIndexedColourMap)->as(); } -IfcIndexedTextureMap::list::ptr IfcTessellatedFaceSet::HasTextures() const { return entity->getInverse(Type::IfcIndexedTextureMap)->as(); } +IfcIndexedColourMap::list::ptr IfcTessellatedFaceSet::HasColours() const { return entity->getInverse(Type::IfcIndexedColourMap, 0)->as(); } +IfcIndexedTextureMap::list::ptr IfcTessellatedFaceSet::HasTextures() const { return entity->getInverse(Type::IfcIndexedTextureMap, 1)->as(); } bool IfcTessellatedFaceSet::is(Type::Enum v) const { return v == Type::IfcTessellatedFaceSet || IfcTessellatedItem::is(v); } Type::Enum IfcTessellatedFaceSet::type() const { return Type::IfcTessellatedFaceSet; } Type::Enum IfcTessellatedFaceSet::Class() { return Type::IfcTessellatedFaceSet; } @@ -16371,7 +16371,7 @@ void IfcTimeSeries::setUserDefinedDataOrigin(std::string v) { if ( ! entity->isW bool IfcTimeSeries::hasUnit() const { return !entity->getArgument(7)->isNull(); } IfcUnit* IfcTimeSeries::Unit() const { return (IfcUnit*)((IfcUtil::IfcBaseClass*)(*entity->getArgument(7))); } void IfcTimeSeries::setUnit(IfcUnit* v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcExternalReferenceRelationship::list::ptr IfcTimeSeries::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship)->as(); } +IfcExternalReferenceRelationship::list::ptr IfcTimeSeries::HasExternalReference() const { return entity->getInverse(Type::IfcExternalReferenceRelationship, 3)->as(); } bool IfcTimeSeries::is(Type::Enum v) const { return v == Type::IfcTimeSeries; } Type::Enum IfcTimeSeries::type() const { return Type::IfcTimeSeries; } Type::Enum IfcTimeSeries::Class() { return Type::IfcTimeSeries; } @@ -16504,7 +16504,7 @@ void IfcTypeObject::setApplicableOccurrence(std::string v) { if ( ! entity->isWr bool IfcTypeObject::hasHasPropertySets() const { return !entity->getArgument(5)->isNull(); } IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr IfcTypeObject::HasPropertySets() const { IfcEntityList::ptr es = *entity->getArgument(5); return es->as(); } void IfcTypeObject::setHasPropertySets(IfcTemplatedEntityList< IfcPropertySetDefinition >::ptr v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(5,v->generalize()); } -IfcRelDefinesByType::list::ptr IfcTypeObject::Types() const { return entity->getInverse(Type::IfcRelDefinesByType)->as(); } +IfcRelDefinesByType::list::ptr IfcTypeObject::Types() const { return entity->getInverse(Type::IfcRelDefinesByType, 5)->as(); } bool IfcTypeObject::is(Type::Enum v) const { return v == Type::IfcTypeObject || IfcObjectDefinition::is(v); } Type::Enum IfcTypeObject::type() const { return Type::IfcTypeObject; } Type::Enum IfcTypeObject::Class() { return Type::IfcTypeObject; } @@ -16521,7 +16521,7 @@ void IfcTypeProcess::setLongDescription(std::string v) { if ( ! entity->isWritab bool IfcTypeProcess::hasProcessType() const { return !entity->getArgument(8)->isNull(); } std::string IfcTypeProcess::ProcessType() const { return *entity->getArgument(8); } void IfcTypeProcess::setProcessType(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } -IfcRelAssignsToProcess::list::ptr IfcTypeProcess::OperatesOn() const { return entity->getInverse(Type::IfcRelAssignsToProcess)->as(); } +IfcRelAssignsToProcess::list::ptr IfcTypeProcess::OperatesOn() const { return entity->getInverse(Type::IfcRelAssignsToProcess, 6)->as(); } bool IfcTypeProcess::is(Type::Enum v) const { return v == Type::IfcTypeProcess || IfcTypeObject::is(v); } Type::Enum IfcTypeProcess::type() const { return Type::IfcTypeProcess; } Type::Enum IfcTypeProcess::Class() { return Type::IfcTypeProcess; } @@ -16535,7 +16535,7 @@ void IfcTypeProduct::setRepresentationMaps(IfcTemplatedEntityList< IfcRepresenta bool IfcTypeProduct::hasTag() const { return !entity->getArgument(7)->isNull(); } std::string IfcTypeProduct::Tag() const { return *entity->getArgument(7); } void IfcTypeProduct::setTag(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(7,v); } -IfcRelAssignsToProduct::list::ptr IfcTypeProduct::ReferencedBy() const { return entity->getInverse(Type::IfcRelAssignsToProduct)->as(); } +IfcRelAssignsToProduct::list::ptr IfcTypeProduct::ReferencedBy() const { return entity->getInverse(Type::IfcRelAssignsToProduct, 6)->as(); } bool IfcTypeProduct::is(Type::Enum v) const { return v == Type::IfcTypeProduct || IfcTypeObject::is(v); } Type::Enum IfcTypeProduct::type() const { return Type::IfcTypeProduct; } Type::Enum IfcTypeProduct::Class() { return Type::IfcTypeProduct; } @@ -16552,7 +16552,7 @@ void IfcTypeResource::setLongDescription(std::string v) { if ( ! entity->isWrita bool IfcTypeResource::hasResourceType() const { return !entity->getArgument(8)->isNull(); } std::string IfcTypeResource::ResourceType() const { return *entity->getArgument(8); } void IfcTypeResource::setResourceType(std::string v) { if ( ! entity->isWritable() ) { entity = new IfcWritableEntity(entity); } ((IfcWritableEntity*)entity)->setArgument(8,v); } -IfcRelAssignsToResource::list::ptr IfcTypeResource::ResourceOf() const { return entity->getInverse(Type::IfcRelAssignsToResource)->as(); } +IfcRelAssignsToResource::list::ptr IfcTypeResource::ResourceOf() const { return entity->getInverse(Type::IfcRelAssignsToResource, 6)->as(); } bool IfcTypeResource::is(Type::Enum v) const { return v == Type::IfcTypeResource || IfcTypeObject::is(v); } Type::Enum IfcTypeResource::type() const { return Type::IfcTypeResource; } Type::Enum IfcTypeResource::Class() { return Type::IfcTypeResource; } diff --git a/src/ifcparse/IfcFile.h b/src/ifcparse/IfcFile.h index f93c4af924..dc0f01040f 100644 --- a/src/ifcparse/IfcFile.h +++ b/src/ifcparse/IfcFile.h @@ -75,28 +75,25 @@ public: /// IfcWall will also return IfcWallStandardCase entities template typename T::list::ptr EntitiesByType() { - IfcEntityList::ptr e = EntitiesByType(T::Class()); - typename T::list::ptr l(new typename T::list); - if (e && e->Size()) { - for ( IfcEntityList::it it = e->begin(); it != e->end(); ++ it ) { - l->push((T*)*it); - } - } - return l; + return EntitiesByType(T::Class())->as(); } /// Returns all entities in the file that match the positional argument. /// NOTE: This also returns subtypes of the requested type, for example: /// IfcWall will also return IfcWallStandardCase entities IfcEntityList::ptr EntitiesByType(IfcSchema::Type::Enum t); + /// Returns all entities in the file that match the positional argument. /// NOTE: This also returns subtypes of the requested type, for example: /// IfcWall will also return IfcWallStandardCase entities IfcEntityList::ptr EntitiesByType(const std::string& t); + /// Returns all entities in the file that reference the id IfcEntityList::ptr EntitiesByReference(int id); + /// Returns the entity with the specified id IfcUtil::IfcBaseClass* EntityById(int id); + /// Returns the entity with the specified GlobalId IfcSchema::IfcRoot* EntityByGuid(const std::string& guid); @@ -105,7 +102,9 @@ public: bool Init(void* data, int len); bool Init(IfcParse::IfcSpfStream* f); - unsigned int FreshId() { MaxId ++; return MaxId; } + IfcEntityList::ptr getInverse(int instance_id, IfcSchema::Type::Enum type, int attribute_index); + + unsigned int FreshId() { return ++MaxId; } void AddEntity(IfcUtil::IfcBaseClass* entity); void AddEntities(IfcEntityList::ptr es); diff --git a/src/ifcparse/IfcHierarchyHelper.cpp b/src/ifcparse/IfcHierarchyHelper.cpp index cb73ead7d4..5281b2c649 100644 --- a/src/ifcparse/IfcHierarchyHelper.cpp +++ b/src/ifcparse/IfcHierarchyHelper.cpp @@ -251,7 +251,7 @@ void IfcHierarchyHelper::addExtrudedPolyline(IfcSchema::IfcShapeRepresentation* for (std::vector >::const_iterator i = points.begin(); i != points.end(); ++i) { cartesian_points->push(addDoublet(i->first, i->second)); } - if (cartesian_points->Size()) cartesian_points->push(*cartesian_points->begin()); + if (cartesian_points->size()) cartesian_points->push(*cartesian_points->begin()); IfcSchema::IfcPolyline* line = new IfcSchema::IfcPolyline(cartesian_points); IfcSchema::IfcArbitraryClosedProfileDef* profile = new IfcSchema::IfcArbitraryClosedProfileDef( IfcSchema::IfcProfileTypeEnum::IfcProfileType_AREA, boost::none, line); @@ -466,7 +466,7 @@ IfcSchema::IfcProductDefinitionShape* IfcHierarchyHelper::addMappedItem( { IfcSchema::IfcRepresentationMap::list::ptr maps = rep->RepresentationMap(); IfcSchema::IfcRepresentationMap* map; - if (maps->Size() == 1) { + if (maps->size() == 1) { map = *maps->begin(); } else { map = new IfcSchema::IfcRepresentationMap(addPlacement3d(), rep); diff --git a/src/ifcparse/IfcHierarchyHelper.h b/src/ifcparse/IfcHierarchyHelper.h index 9646bcee15..dbfa868fa2 100644 --- a/src/ifcparse/IfcHierarchyHelper.h +++ b/src/ifcparse/IfcHierarchyHelper.h @@ -59,7 +59,7 @@ public: template T* getSingle() { typename T::list::ptr ts = EntitiesByType(); - if (ts->Size() != 1) return 0; + if (ts->size() != 1) return 0; return *ts->begin(); } diff --git a/src/ifcparse/IfcLateBoundEntity.cpp b/src/ifcparse/IfcLateBoundEntity.cpp index a80fa7ddaa..8fc6d550cf 100644 --- a/src/ifcparse/IfcLateBoundEntity.cpp +++ b/src/ifcparse/IfcLateBoundEntity.cpp @@ -178,15 +178,7 @@ std::string IfcParse::IfcLateBoundEntity::toString() { } IfcEntityList::ptr IfcParse::IfcLateBoundEntity::get_inverse(const std::string& a) { std::pair inv = IfcSchema::Type::GetInverseAttribute(_type, a); - IfcEntityList::ptr invs = entity->getInverse(inv.first); - IfcEntityList::ptr filtered(new IfcEntityList()); - for (IfcEntityList::it it = invs->begin(); it != invs->end(); ++it) { - try { - const int id = *(*it)->entity->getArgument(inv.second); - if (id == this->entity->id()) { filtered->push(*it); } - } catch (...) {} - } - return filtered; + return entity->getInverse(inv.first, inv.second); } bool IfcParse::IfcLateBoundEntity::is_valid() { const unsigned arg_count = getArgumentCount(); diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index 10aaeb1554..3075a49d07 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -521,7 +521,7 @@ ArgumentList::operator IfcEntityListList::ptr() const { } return l; } -unsigned int ArgumentList::Size() const { return (unsigned int) list.size(); } +unsigned int ArgumentList::size() const { return (unsigned int) list.size(); } Argument* ArgumentList::operator [] (unsigned int i) const { if ( i >= list.size() ) throw IfcException("Argument index out of range"); @@ -576,7 +576,7 @@ TokenArgument::operator std::vector() const { throw IfcException("A TokenArgument::operator IfcUtil::IfcBaseClass*() const { return token.first->file->EntityById(TokenFunc::asInt(token)); } TokenArgument::operator IfcEntityList::ptr() const { throw IfcException("Argument is not a list of entities"); } TokenArgument::operator IfcEntityListList::ptr() const { throw IfcException("Argument is not a list of entity lists"); } -unsigned int TokenArgument::Size() const { return 1; } +unsigned int TokenArgument::size() const { return 1; } Argument* TokenArgument::operator [] (unsigned int i) const { throw IfcException("Argument is not a list of arguments"); } std::string TokenArgument::toString(bool upper) const { if ( upper && TokenFunc::isString(token) ) { @@ -605,7 +605,7 @@ EntityArgument::operator IfcUtil::IfcBaseClass*() const { return entity; } //EntityArgument::operator IfcUtil::IfcAbstractSelect::ptr() const { return entity; } EntityArgument::operator IfcEntityList::ptr() const { throw IfcException("Argument is not a list of entities"); } EntityArgument::operator IfcEntityListList::ptr() const { throw IfcException("Argument is not a list of entity lists"); } -unsigned int EntityArgument::Size() const { return 1; } +unsigned int EntityArgument::size() const { return 1; } Argument* EntityArgument::operator [] (unsigned int i) const { throw IfcException("Argument is not a list of arguments"); } std::string EntityArgument::toString(bool upper) const { return entity->entity->toString(upper); @@ -652,7 +652,7 @@ unsigned int Entity::getArgumentCount() const { std::vector ids; Load(ids, true); } - return args->Size(); + return args->size(); } // @@ -706,30 +706,12 @@ Entity::~Entity() { } // -// Returns the entities of type c that have this entity in their ArgumentList +// Returns the entities of Entity type that have this entity in their ArgumentList // -IfcEntityList::ptr Entity::getInverse(IfcSchema::Type::Enum c) { - IfcEntityList::ptr l = IfcEntityList::ptr(new IfcEntityList()); - IfcEntityList::ptr all = file->EntitiesByReference(_id); - if ( ! all ) return l; - for( IfcEntityList::it it = all->begin(); it != all->end();++ it ) { - if ( c == IfcSchema::Type::ALL || (*it)->is(c) ) { - l->push(*it); - } - } - return l; -} -IfcEntityList::ptr Entity::getInverse(IfcSchema::Type::Enum c, int i, const std::string& a) { - IfcEntityList::ptr l = IfcEntityList::ptr(new IfcEntityList()); - IfcEntityList::ptr all = getInverse(c); - for( IfcEntityList::it it = all->begin(); it != all->end();++ it ) { - const std::string s = *(*it)->entity->getArgument(i); - if ( s == a ) { - l->push(*it); - } - } - return l; +IfcEntityList::ptr Entity::getInverse(IfcSchema::Type::Enum type, int attribute_index) { + return file->getInverse(_id, type, attribute_index); } + bool Entity::is(IfcSchema::Type::Enum v) const { return _type == v; } unsigned int Entity::id() { return _id; } @@ -1067,4 +1049,33 @@ void IfcFile::initTimestamp() { if (strftime(buf,255,"%Y-%m-%dT%H:%M:%S",ti)) { _timestamp = std::string(buf); } +} + +IfcEntityList::ptr IfcFile::getInverse(int instance_id, IfcSchema::Type::Enum type, int attribute_index) { + IfcUtil::IfcBaseClass* instance = EntityById(instance_id); + + IfcEntityList::ptr l = IfcEntityList::ptr(new IfcEntityList); + IfcEntityList::ptr all = EntitiesByReference(instance_id); + if (!all) return l; + + for(IfcEntityList::it it = all->begin(); it != all->end(); ++it) { + bool valid = type == IfcSchema::Type::ALL || (*it)->is(type); + if (valid && attribute_index >= 0) { + Argument* arg = (*it)->entity->getArgument(attribute_index); + if (arg->type() == IfcUtil::Argument_ENTITY) { + valid = instance == *arg; + } else if (arg->type() == IfcUtil::Argument_ENTITY_LIST) { + IfcEntityList::ptr li = *arg; + valid = li->contains(instance); + } else if (arg->type() == IfcUtil::Argument_ENTITY_LIST_LIST) { + IfcEntityListList::ptr li = *arg; + valid = li->contains(instance); + } + } + if (valid) { + l->push(*it); + } + } + + return l; } \ No newline at end of file diff --git a/src/ifcparse/IfcParse.h b/src/ifcparse/IfcParse.h index c97bd65eb3..ce0634991c 100644 --- a/src/ifcparse/IfcParse.h +++ b/src/ifcparse/IfcParse.h @@ -139,7 +139,7 @@ namespace IfcParse { operator IfcUtil::IfcBaseClass*() const; operator IfcEntityList::ptr() const; operator IfcEntityListList::ptr() const; - unsigned int Size() const; + unsigned int size() const; Argument* operator [] (unsigned int i) const; std::string toString(bool upper=false) const; bool isNull() const; @@ -167,7 +167,7 @@ namespace IfcParse { operator IfcUtil::IfcBaseClass*() const; operator IfcEntityList::ptr() const; operator IfcEntityListList::ptr() const; - unsigned int Size() const; + unsigned int size() const; Argument* operator [] (unsigned int i) const; std::string toString(bool upper=false) const; bool isNull() const; @@ -195,7 +195,7 @@ namespace IfcParse { operator IfcUtil::IfcBaseClass*() const; operator IfcEntityList::ptr() const; operator IfcEntityListList::ptr() const; - unsigned int Size() const; + unsigned int size() const; Argument* operator [] (unsigned int i) const; std::string toString(bool upper=false) const; bool isNull() const; @@ -216,8 +216,7 @@ namespace IfcParse { Entity(unsigned int i, IfcFile* t); Entity(unsigned int i, IfcFile* t, unsigned int o); ~Entity(); - IfcEntityList::ptr getInverse(IfcSchema::Type::Enum c = IfcSchema::Type::ALL); - IfcEntityList::ptr getInverse(IfcSchema::Type::Enum c, int i, const std::string& a); + IfcEntityList::ptr getInverse(IfcSchema::Type::Enum type, int attribute_index); void Load(std::vector& ids, bool seek=false) const; Argument* getArgument (unsigned int i); unsigned int getArgumentCount() const; diff --git a/src/ifcparse/IfcUtil.cpp b/src/ifcparse/IfcUtil.cpp index 748054e33a..6f733bd398 100644 --- a/src/ifcparse/IfcUtil.cpp +++ b/src/ifcparse/IfcUtil.cpp @@ -18,6 +18,7 @@ ********************************************************************************/ #include +#include #include "../ifcparse/IfcException.h" @@ -31,27 +32,15 @@ void IfcEntityList::push(const IfcEntityList::ptr& l) { if ( *i ) ls.push_back(*i); } } -int IfcEntityList::Size() const { return (unsigned int) ls.size(); } +unsigned int IfcEntityList::size() const { return (unsigned int) ls.size(); } IfcEntityList::it IfcEntityList::begin() { return ls.begin(); } IfcEntityList::it IfcEntityList::end() { return ls.end(); } IfcUtil::IfcBaseClass* IfcEntityList::operator[] (int i) { return ls[i]; } -IfcEntityList::ptr IfcEntityList::getInverse(IfcSchema::Type::Enum c) { - IfcEntityList::ptr l = IfcEntityList::ptr(new IfcEntityList()); - for( it i = begin(); i != end(); ++i ) { - l->push((*i)->entity->getInverse(c)); - } - return l; +bool IfcEntityList::contains(IfcUtil::IfcBaseClass* instance) const { + return std::find(ls.begin(), ls.end(), instance) != ls.end(); } -IfcEntityList::ptr IfcEntityList::getInverse(IfcSchema::Type::Enum c, int ar, const std::string& a) { - IfcEntityList::ptr l = IfcEntityList::ptr(new IfcEntityList()); - for( it i = begin(); i != end(); ++i ) { - l->push((*i)->entity->getInverse(c,ar,a)); - } - return l; -} - unsigned int IfcUtil::IfcBaseType::getArgumentCount() const { return 1; } Argument* IfcUtil::IfcBaseType::getArgument(unsigned int i) const { return entity->getArgument(i); } diff --git a/src/ifcparse/IfcUtil.h b/src/ifcparse/IfcUtil.h index f7b6d4e6fb..8144f2b2f3 100644 --- a/src/ifcparse/IfcUtil.h +++ b/src/ifcparse/IfcUtil.h @@ -23,6 +23,7 @@ #include #include #include +#include #include "../ifcparse/SharedPointer.h" @@ -92,14 +93,13 @@ class IfcEntityList { public: typedef SHARED_PTR ptr; typedef std::vector::const_iterator it; - ptr getInverse(IfcSchema::Type::Enum c = IfcSchema::Type::ALL); - ptr getInverse(IfcSchema::Type::Enum c, int i, const std::string& a); void push(IfcUtil::IfcBaseClass* l); void push(const ptr& l); it begin(); it end(); IfcUtil::IfcBaseClass* operator[] (int i); - int Size() const; + unsigned int size() const; + bool contains(IfcUtil::IfcBaseClass*) const; template typename U::list::ptr as() { typename U::list::ptr r(new typename U::list); @@ -115,16 +115,17 @@ class IfcTemplatedEntityList { public: typedef SHARED_PTR< IfcTemplatedEntityList > ptr; typedef typename std::vector::const_iterator it; - inline void push(T* t) {if (t) ls.push_back(t);} - inline void push(ptr t) { for ( typename T::list::it it = t->begin(); it != t->end(); ++it ) push(*it); } - inline it begin() { return ls.begin(); } - inline it end() { return ls.end(); } - inline unsigned int Size() const { return (unsigned int) ls.size(); } + void push(T* t) {if (t) ls.push_back(t);} + void push(ptr t) { for ( typename T::list::it it = t->begin(); it != t->end(); ++it ) push(*it); } + it begin() { return ls.begin(); } + it end() { return ls.end(); } + unsigned int size() const { return (unsigned int) ls.size(); } IfcEntityList::ptr generalize() { IfcEntityList::ptr r (new IfcEntityList()); for ( it i = begin(); i != end(); ++ i ) r->push(*i); return r; } + bool contains(T* t) const { return std::find(ls.begin(), ls.end(), t) != ls.end(); } template typename U::list::ptr as() { typename U::list::ptr r(new typename U::list); @@ -153,9 +154,18 @@ public: } push(li); } - outer_it begin() { return ls.begin(); } - outer_it end() { return ls.end(); } - int Size() const { return ls.size(); } + outer_it begin() const { return ls.begin(); } + outer_it end() const { return ls.end(); } + int size() const { return ls.size(); } + bool contains(IfcUtil::IfcBaseClass* instance) const { + for (outer_it it = begin(); it != end(); ++it) { + const std::vector& inner = *it; + if (std::find(inner.begin(), inner.end(), instance) != inner.end()) { + return true; + } + } + return false; + } template typename IfcTemplatedEntityListList::ptr as() { typename IfcTemplatedEntityListList::ptr r(new IfcTemplatedEntityListList); @@ -182,7 +192,16 @@ public: void push(const std::vector& t) {ls.push_back(t);} outer_it begin() { return ls.begin(); } outer_it end() { return ls.end(); } - unsigned int Size() const { return (unsigned int) ls.size(); } + unsigned int size() const { return (unsigned int) ls.size(); } + bool contains(T* t) const { + for (outer_it it = begin(); it != end(); ++it) { + const std::vector& inner = *it; + if (std::find(inner.begin(), inner.end(), t) != inner.end()) { + return true; + } + } + return false; + } IfcEntityListList::ptr generalize() { IfcEntityListList::ptr r (new IfcEntityListList()); for (outer_it outer = begin(); outer != end(); ++ outer) { @@ -214,7 +233,7 @@ public: virtual operator IfcUtil::IfcBaseClass*() const = 0; virtual operator IfcEntityList::ptr() const = 0; virtual operator IfcEntityListList::ptr() const = 0; - virtual unsigned int Size() const = 0; + virtual unsigned int size() const = 0; virtual Argument* operator [] (unsigned int i) const = 0; virtual std::string toString(bool upper=false) const = 0; virtual bool isNull() const = 0; @@ -224,8 +243,7 @@ public: class IfcAbstractEntity { public: IfcParse::IfcFile* file; - virtual IfcEntityList::ptr getInverse(IfcSchema::Type::Enum c = IfcSchema::Type::ALL) = 0; - virtual IfcEntityList::ptr getInverse(IfcSchema::Type::Enum c, int i, const std::string& a) = 0; + virtual IfcEntityList::ptr getInverse(IfcSchema::Type::Enum type, int attribute_index) = 0; virtual std::string datatype() const = 0; virtual Argument* getArgument (unsigned int i) = 0; virtual unsigned int getArgumentCount() const = 0; diff --git a/src/ifcparse/IfcWritableEntity.h b/src/ifcparse/IfcWritableEntity.h index 06b52a60d5..90c60c7c67 100644 --- a/src/ifcparse/IfcWritableEntity.h +++ b/src/ifcparse/IfcWritableEntity.h @@ -51,8 +51,7 @@ namespace IfcWrite { int setId(int i=-1); IfcWritableEntity(IfcAbstractEntity* e); - IfcEntityList::ptr getInverse(IfcSchema::Type::Enum c = IfcSchema::Type::ALL); - IfcEntityList::ptr getInverse(IfcSchema::Type::Enum c, int i, const std::string& a); + IfcEntityList::ptr getInverse(IfcSchema::Type::Enum type, int attribute_index); std::string datatype() const; Argument* getArgument (unsigned int i); unsigned int getArgumentCount() const; diff --git a/src/ifcparse/IfcWrite.cpp b/src/ifcparse/IfcWrite.cpp index 1324ed55af..a77685e694 100644 --- a/src/ifcparse/IfcWrite.cpp +++ b/src/ifcparse/IfcWrite.cpp @@ -60,29 +60,14 @@ IfcWritableEntity::IfcWritableEntity(IfcAbstractEntity* e) writemask[i] = false; } } -// TODO: Reove redundancy with IfcParse::Entity -IfcEntityList::ptr IfcWritableEntity::getInverse(IfcSchema::Type::Enum c) { - IfcEntityList::ptr l = IfcEntityList::ptr(new IfcEntityList); - int id = _id ? *_id : setId(); - IfcEntityList::ptr all = file->EntitiesByReference(id); - if ( ! all ) return l; - for( IfcEntityList::it it = all->begin(); it != all->end();++ it ) { - if ( c == IfcSchema::Type::ALL || (*it)->is(c) ) { - l->push(*it); - } + +IfcEntityList::ptr IfcWritableEntity::getInverse(IfcSchema::Type::Enum type, int attribute_index) { + if (file) { + int id = _id ? *_id : setId(); + return file->getInverse(id, type, attribute_index); + } else { + throw IfcParse::IfcException("Instance not part of a file"); } - return l; -} -IfcEntityList::ptr IfcWritableEntity::getInverse(IfcSchema::Type::Enum c, int i, const std::string& a) { - IfcEntityList::ptr l = IfcEntityList::ptr(new IfcEntityList); - IfcEntityList::ptr all = getInverse(c); - for( IfcEntityList::it it = all->begin(); it != all->end();++ it ) { - const std::string s = *(*it)->entity->getArgument(i); - if ( s == a ) { - l->push(*it); - } - } - return l; } std::string IfcWritableEntity::datatype() const { return IfcSchema::Type::ToString(_type); } @@ -194,8 +179,8 @@ public: int operator()(const std::vector& i) const { return i.size(); } int operator()(const IfcWriteArgument::EnumerationReference& i) const { return -1; } int operator()(const IfcUtil::IfcBaseClass* const& i) const { return -1; } - int operator()(const IfcEntityList::ptr& i) const { return i->Size(); } - int operator()(const IfcEntityListList::ptr& i) const { return i->Size(); } + int operator()(const IfcEntityList::ptr& i) const { return i->size(); } + int operator()(const IfcEntityListList::ptr& i) const { return i->size(); } }; class StringBuilderVisitor : public boost::static_visitor { @@ -310,7 +295,7 @@ std::string IfcWriteArgument::toString(bool upper) const { container.apply_visitor(v); return v; } -unsigned int IfcWriteArgument::Size() const { +unsigned int IfcWriteArgument::size() const { SizeVisitor v; const int size = container.apply_visitor(v); if (size == -1) { @@ -324,8 +309,7 @@ IfcUtil::ArgumentType IfcWriteArgument::type() const { return static_cast(container.which()); } -IfcEntityList::ptr IfcSelectHelperEntity::getInverse(IfcSchema::Type::Enum,int,const std::string &) {throw IfcParse::IfcException("Invalid cast");} -IfcEntityList::ptr IfcSelectHelperEntity::getInverse(IfcSchema::Type::Enum) {throw IfcParse::IfcException("Invalid cast");} +IfcEntityList::ptr IfcSelectHelperEntity::getInverse(IfcSchema::Type::Enum, int) {throw IfcParse::IfcException("Invalid cast");} std::string IfcSelectHelperEntity::datatype() const { return IfcSchema::Type::ToString(_type); } Argument* IfcSelectHelperEntity::getArgument(unsigned int i) { if ( i != 0 ) throw IfcParse::IfcException("Invalid cast"); diff --git a/src/ifcparse/IfcWrite.h b/src/ifcparse/IfcWrite.h index e9f185cb84..4940f57ef2 100644 --- a/src/ifcparse/IfcWrite.h +++ b/src/ifcparse/IfcWrite.h @@ -115,7 +115,7 @@ namespace IfcWrite { bool isNull() const; Argument* operator [] (unsigned int i) const; std::string toString(bool upper=false) const; - unsigned int Size() const; + unsigned int size() const; IfcUtil::ArgumentType type() const; }; @@ -130,8 +130,7 @@ namespace IfcWrite { public: // FIXME: Make this a non-pointer argument and implement a copy constructor IfcSelectHelperEntity(IfcSchema::Type::Enum t, IfcWriteArgument* a) : _type(t), arg(a) {} - IfcEntityList::ptr getInverse(IfcSchema::Type::Enum,int,const std::string &); - IfcEntityList::ptr getInverse(IfcSchema::Type::Enum); + IfcEntityList::ptr getInverse(IfcSchema::Type::Enum type, int attribute_index); std::string datatype() const; Argument* getArgument(unsigned int i); unsigned int getArgumentCount() const; diff --git a/src/ifcwrap/IfcGeomWrapper.i b/src/ifcwrap/IfcGeomWrapper.i index 84a67747e7..211b35e41c 100644 --- a/src/ifcwrap/IfcGeomWrapper.i +++ b/src/ifcwrap/IfcGeomWrapper.i @@ -203,7 +203,7 @@ IfcParse::IfcFile* file = instance->entity->file; IfcSchema::IfcProject::list::ptr projects = file->EntitiesByType(); - if (projects->Size() != 1) { + if (projects->size() != 1) { throw IfcParse::IfcException("Not a single IfcProject instance"); } IfcSchema::IfcProject* project = *projects->begin(); diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index f874a48a2a..4596c662ef 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -71,7 +71,7 @@ } %typemap(out) IfcEntityList::ptr { - const unsigned size = $1 ? $1->Size() : 0; + const unsigned size = $1 ? $1->size() : 0; $result = PyList_New(size); for (unsigned i = 0; i < size; ++i) { PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*$1)[i]), SWIGTYPE_p_IfcParse__IfcLateBoundEntity, 0); @@ -135,7 +135,7 @@ break; } case IfcUtil::Argument_ENTITY_LIST: { IfcEntityList::ptr es = arg; - const unsigned size = es->Size(); + const unsigned size = es->size(); $result = PyList_New(size); for (unsigned i = 0; i < size; ++i) { PyObject *o = SWIG_NewPointerObj(SWIG_as_voidptr((*es)[i]), SWIGTYPE_p_IfcParse__IfcLateBoundEntity, 0);