/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// // This file is generated automatically. #ifndef _IFC4X2_IFCREFERENCE_AUTO_IMPL_H #define _IFC4X2_IFCREFERENCE_AUTO_IMPL_H #include "Ifc4x2BaseClass.h" #include "Ifc4x2Enum.h" #include "Ifc4x2SelectTypes.h" #include "Ifc4x2CollectionTypes.h" #include "TD_PackPush.h" /** \details The namespace contains schema-dependent classes, definitions and sub routines for work with IFC4X2 express schema definitions. */ namespace OdIfc4x2 { /** \details This entity is used to refer to a value of an attribute on an instance. It can refer to the value of a scalar attribute or a value within a collection-based attribute. - Details - Referenced attributes can be direct values, object references, collections, inverse object references, and inverse collections. References can be chained to form a path of object-attribute references. An example of chained references to refer to a core layer thickness: */ class IFC4X2_EXPORT IfcReference : public OdIfc4x2Instance { //DOM-IGNORE-BEGIN OD_EXP_DECLARE_MEMBERS(OdIfc4x2::IfcReference); //DOM-IGNORE-END public: // // OdDAI early binding accessors // /** \details Returns the value of TypeIdentifier attribute. This attribute represents optional identifier of the entity or type such as 'IfcMaterialLayerSet'. For entity, type, or select-based references within a collection, this resolves the reference to such type. If omitted, the type is assumed to be the same as the declared referencing attribute. \returns Returns the value of TypeIdentifier attribute. \remarks EXAMPLE: IfcRelAssociatesMaterial.RelatingMaterial can be resolved to IfcMaterialLayerSet. */ const OdAnsiString& getTypeIdentifier() const; /** \details Sets the value of TypeIdentifier attribute. This attribute represents optional identifier of the entity or type such as 'IfcMaterialLayerSet'. For entity, type, or select-based references within a collection, this resolves the reference to such type. If omitted, the type is assumed to be the same as the declared referencing attribute. \param TypeIdentifier [in] Type identifier to set. \remarks EXAMPLE: IfcRelAssociatesMaterial.RelatingMaterial can be resolved to IfcMaterialLayerSet. */ void setTypeIdentifier(const OdAnsiString& TypeIdentifier); /** \details Returns the value of AttributeIdentifier attribute. This attribute optionally identifies a direct or inverse attribute within an entity such as 'MaterialLayers'. If TypeIdentifier is specified and refers to an entity, the attribute must exist within the referenced entity. A null value indicates a reference to the type or entity itself, such as for indicating that the type of a value must match a specified constraint. \returns Returns the value of AttributeIdentifier attribute. */ const OdAnsiString& getAttributeIdentifier() const; /** \details Sets the value of AttributeIdentifier attribute. This attribute optionally identifies a direct or inverse attribute within an entity such as 'MaterialLayers'. If TypeIdentifier is specified and refers to an entity, the attribute must exist within the referenced entity. A null value indicates a reference to the type or entity itself, such as for indicating that the type of a value must match a specified constraint. \param AttributeIdentifier [in] Attribute identifier to set. */ void setAttributeIdentifier(const OdAnsiString& AttributeIdentifier); /** \details Returns the value of InstanceName attribute. This attribute optionally identifies an instance within a collection according to name. If the instance has an attribute called 'Name', such attribute is used for comparison; otherwise the first STRING-based attribute of the entity is used. \returns Returns the value of InstanceName attribute. \remarks EXAMPLE: IfcRoot-based entities such as IfcPropertySet use the Name attribute; IfcRepresentation entities use the RepresentationIdentifier attribute. */ const OdAnsiString& getInstanceName() const; /** \details Sets the value of InstanceName attribute. This attribute represents optionally identifies an instance within a collection according to name. If the instance has an attribute called 'Name', such attribute is used for comparison; otherwise the first STRING-based attribute of the entity is used. \param InstanceName [in] Instance name to set. \remarks EXAMPLE: IfcRoot-based entities such as IfcPropertySet use the Name attribute; IfcRepresentation entities use the RepresentationIdentifier attribute. */ void setInstanceName(const OdAnsiString& InstanceName); /** \details Gets the value of ListPositions attribute. This attribute optionally identifies an instance within a collection according to position starting at 1. For referencing single-level collections, this attribute contains a single member; for referencing multi-level collections, then this LIST attribute contains multiple members starting from the outer-most index. \param ListPositions [out] Receives the list positions. */ void getListPositions(OdArray& ListPositions) const; /** \details Returns the value of ListPositions attribute. This attribute optionally identifies an instance within a collection according to position starting at 1. For referencing single-level collections, this attribute contains a single member; for referencing multi-level collections, then this LIST attribute contains multiple members starting from the outer-most index. \returns Returns the value of ListPositions attribute. */ OdDAI::ListOfInt& listPositions(); /** \details Returns the value of InnerReference attribute. This attribute represents optional reference to an inner value for ENTITY, SELECT, SET, or LIST attributes. A path can be formed by linking IfcReference instances together. \returns Returns the value of InnerReference attribute. \remarks EXAMPLE: A material layer thickness can be referenced using several instances:
  #1=IFCREFERENCE($,'IfcSlab','HasAssociations',#2); 
  #2=IFCREFERENCE($,'IfcMaterialLayerSet','MaterialLayers',#3); 
  #3=IFCREFERENCE('Core','IfcMaterialLayer','LayerThickness',$);
  
*/ const OdDAIObjectId& getInnerReference() const; /** \details Sets the value of InnerReference attribute. This attribute represents optional reference to an inner value for ENTITY, SELECT, SET, or LIST attributes. A path can be formed by linking IfcReference instances together. \param InnerReference [in] Inner reference to set. \remarks EXAMPLE: A material layer thickness can be referenced using several instances:
  #1=IFCREFERENCE($,'IfcSlab','HasAssociations',#2); 
  #2=IFCREFERENCE($,'IfcMaterialLayerSet','MaterialLayers',#3); 
  #3=IFCREFERENCE('Core','IfcMaterialLayer','LayerThickness',$);
  
*/ void setInnerReference(const OdDAIObjectId& InnerReference); public: /** \details Default constructor for the IfcReference class. */ IfcReference(); /** \details Reads object's data from the specified filer. \param rdFiler [in] Pointer to a filer from which to read the data. \returns A value of OdResult type that contains the result of the method execution. */ virtual OdResult inFields(OdDAI::OdSpfFilerBase* rdFiler) override; /** \details Writes object's data the the specified filer. \param wrFiler [in] Pointer to a filer to which to write the data. \returns A value of OdResult type that contains the result of the method execution. */ virtual OdResult outFields(OdDAI::OdSpfFilerBase* wrFiler) override; /** \details Returns a type of a class instance. \returns Pointer to the OdDAI::Entity type that determines an entity definition within a schema. */ virtual OdDAI::Entity* getInstanceType() const override; /** \details Returns an attribute value for the specified attribute name. \param attrName [in] Name of an attribute to query. \returns OdRxValue object that represents a generic variant type value. */ virtual OdRxValue getAttr(const char * attrName) const override; /** \details Resets a value for the specified attribute. \param explicitAttrName [in] Explicit name of the attribute to reset. */ virtual void unsetAttr(const char * explicitAttrName) override; /** \details Checks whether the specified attribute is set. \param explicitAttrName [in] Explicit name of the attribute to test. \returns true if the specified attribute is set, false otherwise. */ virtual bool testAttr(const char * explicitAttrName) const override; /** \details Sets the specified attribute with a given value. \param explicitAttrName [in] Explicit name of the attribute to set. \param val [in] Value to set. \returns true if the value is successfully set for the specified attribute, false otherwise. */ virtual bool putAttr(const char * explicitAttrName, const OdRxValue &val) override; /** \details Checks whether the specified instance is the object derived from or belongs to this class. \param entityType [in] Entity to check. \returns true if the specified instance is the object derived from or belongs to this class, false otherwise. */ virtual bool isKindOf(OdIfc::OdIfcEntityType entityType) const override; /** \details Returns the type of this entity. \returns A value of the OdIfc::OdIfcEntityType type that represents type of this entity. */ virtual OdIfc::OdIfcEntityType type() const override; /** \details Returns an attribute value for the specified attribute definition. \param attrDef [in] Attribute definition to query. \returns OdRxValue object that represents a generic variant type value. */ virtual OdRxValue getAttr(const OdIfc::OdIfcAttribute attrDef) const override; /** \details Resets a value for the specified attribute. \param explicitAttrDef [in] Explicit definition that represents an attribute to reset. */ virtual void unsetAttr(const OdIfc::OdIfcAttribute explicitAttrDef) override; /** \details Checks whether the specified attribute is set. \param explicitAttrDef [in] Attribute definition to test. \returns true if the specified attribute is set, false otherwise. */ virtual bool testAttr(const OdIfc::OdIfcAttribute explicitAttrDef) const override; /** \details Sets the specified attribute with a given value. \param explicitAttrDef [in] Explicit attribute definition to set. \param val [in] Value to set. \returns true if the value is successfully set for the specified attribute, false otherwise. */ virtual bool putAttr(const OdIfc::OdIfcAttribute explicitAttrDef, const OdRxValue &val) override; protected: // Fields declaration: OdAnsiString m_TypeIdentifier; // IfcIdentifier [optional] OdAnsiString m_AttributeIdentifier; // IfcIdentifier [optional] OdAnsiString m_InstanceName; // IfcLabel [optional] OdDAI::ListOfInt m_ListPositions; // LIST [1:?] of IfcInteger [optional] OdDAIObjectId m_InnerReference; // IfcReference [optional] }; /** \details A data type that represents a smart pointer to a IfcReference object. */ typedef OdSmartPtr IfcReferencePtr; } // namespace #include "TD_PackPop.h" #endif // _IFC4X2_IFCREFERENCE_AUTO_IMPL_H