CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdIfc4x1::IfcReference Class Reference

#include <IfcReferenceAutoImpl.h>

Inheritance diagram for OdIfc4x1::IfcReference:
OdIfc4x1::OdIfc4x1Instance OdIfc::OdIfcInstance

Public Member Functions

const OdAnsiString & getTypeIdentifier () const
 
void setTypeIdentifier (const OdAnsiString &TypeIdentifier)
 
const OdAnsiString & getAttributeIdentifier () const
 
void setAttributeIdentifier (const OdAnsiString &AttributeIdentifier)
 
const OdAnsiString & getInstanceName () const
 
void setInstanceName (const OdAnsiString &InstanceName)
 
void getListPositions (OdArray< int > &ListPositions) const
 
OdDAI::ListOfInt & listPositions ()
 
const OdDAIObjectId & getInnerReference () const
 
void setInnerReference (const OdDAIObjectId &InnerReference)
 
 IfcReference ()
 
virtual OdResult inFields (OdDAI::OdSpfFilerBase *rdFiler) override
 
virtual OdResult outFields (OdDAI::OdSpfFilerBase *wrFiler) override
 
virtual OdDAI::Entity * getInstanceType () const override
 
virtual OdRxValue getAttr (const char *attrName) const override
 
virtual void unsetAttr (const char *explicitAttrName) override
 
virtual bool testAttr (const char *explicitAttrName) const override
 
virtual bool putAttr (const char *explicitAttrName, const OdRxValue &val) override
 
virtual bool isKindOf (OdIfc::OdIfcEntityType entityType) const override
 
virtual OdIfc::OdIfcEntityType type () const override
 
virtual OdRxValue getAttr (const OdIfc::OdIfcAttribute attrDef) const override
 
virtual void unsetAttr (const OdIfc::OdIfcAttribute explicitAttrDef) override
 
virtual bool testAttr (const OdIfc::OdIfcAttribute explicitAttrDef) const override
 
virtual bool putAttr (const OdIfc::OdIfcAttribute explicitAttrDef, const OdRxValue &val) override
 
- Public Member Functions inherited from OdIfc4x1::OdIfc4x1Instance
void setInverseCounterParts () override
 
- Public Member Functions inherited from OdIfc::OdIfcInstance
 ODRX_DECLARE_MEMBERS (OdIfcInstance)
 
 OdIfcInstance ()
 
 ~OdIfcInstance ()
 
bool isInstanceOf (OdIfcEntityType entityType) const
 
IfcOpResult resolved ()
 
void resolve (IfcOpResult resolved, void *resPtr)
 
void unresolve ()
 
virtual void setGsNode (OdGsCache *pGsNode)
 
virtual OdGsCachegsNode () const
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *traits) const
 
virtual bool subWorldDraw (OdGiWorldDraw *wd) const
 
virtual OdDbStub * ownerId () const
 

Protected Attributes

OdAnsiString m_TypeIdentifier
 
OdAnsiString m_AttributeIdentifier
 
OdAnsiString m_InstanceName
 
OdDAI::ListOfInt m_ListPositions
 
OdDAIObjectId m_InnerReference
 
- Protected Attributes inherited from OdIfc::OdIfcInstance
voidm_resPtr
 
IfcOpResult m_resolved
 

Additional Inherited Members

- Static Public Member Functions inherited from OdIfc::OdIfcInstance
static const OdGePoint3dasPoint3d (const OdIfcInstance *inst)
 
static const OdGePoint2dasPoint2d (const OdIfcInstance *inst)
 
static const OdGeVector3dasVector3d (const OdIfcInstance *inst)
 
static const OdGeVector2dasVector2d (const OdIfcInstance *inst)
 
static const OdGeMatrix2dasMatrix2d (const OdIfcInstance *inst)
 
static const OdGeMatrix3dasMatrix3d (const OdIfcInstance *inst)
 
static OdIfcCompoundPtr asCompound (OdSmartPtr< OdIfcInstance > inst)
 
static const OdCmEntityColorasRgbColor (const OdIfcInstance *inst)
 

Detailed Description

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:

<IMAGE ifcreference_chained_reference>

Definition at line 53 of file Ifc4x1/IfcReferenceAutoImpl.h.

Constructor & Destructor Documentation

◆ IfcReference()

OdIfc4x1::IfcReference::IfcReference ( )

Default constructor for the IfcReference class.

Member Function Documentation

◆ getAttr() [1/2]

virtual OdRxValue OdIfc4x1::IfcReference::getAttr ( const char * attrName) const
overridevirtual

Returns an attribute value for the specified attribute name.

Parameters
attrName[in] Name of an attribute to query.
Returns
OdRxValue object that represents a generic variant type value.

◆ getAttr() [2/2]

virtual OdRxValue OdIfc4x1::IfcReference::getAttr ( const OdIfc::OdIfcAttribute attrDef) const
overridevirtual

Returns an attribute value for the specified attribute definition.

Parameters
attrDef[in] Attribute definition to query.
Returns
OdRxValue object that represents a generic variant type value.

Reimplemented from OdIfc::OdIfcInstance.

◆ getAttributeIdentifier()

const OdAnsiString & OdIfc4x1::IfcReference::getAttributeIdentifier ( ) const

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.

◆ getInnerReference()

const OdDAIObjectId & OdIfc4x1::IfcReference::getInnerReference ( ) const

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',$);

◆ getInstanceName()

const OdAnsiString & OdIfc4x1::IfcReference::getInstanceName ( ) const

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.

◆ getInstanceType()

virtual OdDAI::Entity * OdIfc4x1::IfcReference::getInstanceType ( ) const
overridevirtual

Returns a type of a class instance.

Returns
Pointer to the <exref target=https://docs.opendesign.com/tkernel_api_cpp/OdDAI__Entity.html>>OdDAI::Entity</exref> type that determines an entity definition within a schema.

◆ getListPositions()

void OdIfc4x1::IfcReference::getListPositions ( OdArray< int > & ListPositions) const

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.

Parameters
ListPositions[out] Receives the list positions.

◆ getTypeIdentifier()

const OdAnsiString & OdIfc4x1::IfcReference::getTypeIdentifier ( ) const

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.

◆ inFields()

virtual OdResult OdIfc4x1::IfcReference::inFields ( OdDAI::OdSpfFilerBase * rdFiler)
overridevirtual

Reads object's data from the specified filer.

Parameters
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.

◆ isKindOf()

virtual bool OdIfc4x1::IfcReference::isKindOf ( OdIfc::OdIfcEntityType entityType) const
overridevirtual

Checks whether the specified instance is the object derived from or belongs to this class.

Parameters
entityType[in] Entity to check.
Returns
true if the specified instance is the object derived from or belongs to this class, false otherwise.

Reimplemented from OdIfc::OdIfcInstance.

◆ listPositions()

OdDAI::ListOfInt & OdIfc4x1::IfcReference::listPositions ( )

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.

◆ outFields()

virtual OdResult OdIfc4x1::IfcReference::outFields ( OdDAI::OdSpfFilerBase * wrFiler)
overridevirtual

Writes object's data the the specified filer.

Parameters
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.

◆ putAttr() [1/2]

virtual bool OdIfc4x1::IfcReference::putAttr ( const char * explicitAttrName,
const OdRxValue & val )
overridevirtual

Sets the specified attribute with a given value.

Parameters
explicitAttrName[in] Explicit name of the attribute to set.
val[in] Value to set.
Returns
true if the value is successfully set for the specified attribute, false otherwise.

Reimplemented from OdIfc::OdIfcInstance.

◆ putAttr() [2/2]

virtual bool OdIfc4x1::IfcReference::putAttr ( const OdIfc::OdIfcAttribute explicitAttrDef,
const OdRxValue & val )
overridevirtual

Sets the specified attribute with a given value.

Parameters
explicitAttrDef[in] Explicit attribute definition to set.
val[in] Value to set.
Returns
true if the value is successfully set for the specified attribute, false otherwise.

Reimplemented from OdIfc::OdIfcInstance.

◆ setAttributeIdentifier()

void OdIfc4x1::IfcReference::setAttributeIdentifier ( const OdAnsiString & AttributeIdentifier)

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.

Parameters
AttributeIdentifier[in] Attribute identifier to set.

◆ setInnerReference()

void OdIfc4x1::IfcReference::setInnerReference ( const OdDAIObjectId & InnerReference)

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.

Parameters
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',$);

◆ setInstanceName()

void OdIfc4x1::IfcReference::setInstanceName ( const OdAnsiString & InstanceName)

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.

Parameters
InstanceName[in] Instance name to set.
Remarks
EXAMPLE: IfcRoot-based entities such as IfcPropertySet use the Name attribute; IfcRepresentation entities use the RepresentationIdentifier attribute.

◆ setTypeIdentifier()

void OdIfc4x1::IfcReference::setTypeIdentifier ( const OdAnsiString & TypeIdentifier)

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.

Parameters
TypeIdentifier[in] Type identifier to set.
Remarks
EXAMPLE: IfcRelAssociatesMaterial.RelatingMaterial can be resolved to IfcMaterialLayerSet.

◆ testAttr() [1/2]

virtual bool OdIfc4x1::IfcReference::testAttr ( const char * explicitAttrName) const
overridevirtual

Checks whether the specified attribute is set.

Parameters
explicitAttrName[in] Explicit name of the attribute to test.
Returns
true if the specified attribute is set, false otherwise.

Reimplemented from OdIfc::OdIfcInstance.

◆ testAttr() [2/2]

virtual bool OdIfc4x1::IfcReference::testAttr ( const OdIfc::OdIfcAttribute explicitAttrDef) const
overridevirtual

Checks whether the specified attribute is set.

Parameters
explicitAttrDef[in] Attribute definition to test.
Returns
true if the specified attribute is set, false otherwise.

Reimplemented from OdIfc::OdIfcInstance.

◆ type()

virtual OdIfc::OdIfcEntityType OdIfc4x1::IfcReference::type ( ) const
overridevirtual

Returns the type of this entity.

Returns
A value of the <exref target=https://docs.opendesign.com/tkernel_api_cpp/OdIfc__OdIfcEntityType.html>>OdIfc::OdIfcEntityType</exref> type that represents type of this entity.

Reimplemented from OdIfc::OdIfcInstance.

◆ unsetAttr() [1/2]

virtual void OdIfc4x1::IfcReference::unsetAttr ( const char * explicitAttrName)
overridevirtual

Resets a value for the specified attribute.

Parameters
explicitAttrName[in] Explicit name of the attribute to reset.

Reimplemented from OdIfc::OdIfcInstance.

◆ unsetAttr() [2/2]

virtual void OdIfc4x1::IfcReference::unsetAttr ( const OdIfc::OdIfcAttribute explicitAttrDef)
overridevirtual

Resets a value for the specified attribute.

Parameters
explicitAttrDef[in] Explicit definition that represents an attribute to reset.

Reimplemented from OdIfc::OdIfcInstance.

Member Data Documentation

◆ m_AttributeIdentifier

OdAnsiString OdIfc4x1::IfcReference::m_AttributeIdentifier
protected

Definition at line 297 of file Ifc4x1/IfcReferenceAutoImpl.h.

◆ m_InnerReference

OdDAIObjectId OdIfc4x1::IfcReference::m_InnerReference
protected

Definition at line 301 of file Ifc4x1/IfcReferenceAutoImpl.h.

◆ m_InstanceName

OdAnsiString OdIfc4x1::IfcReference::m_InstanceName
protected

Definition at line 298 of file Ifc4x1/IfcReferenceAutoImpl.h.

◆ m_ListPositions

OdDAI::ListOfInt OdIfc4x1::IfcReference::m_ListPositions
protected

Definition at line 299 of file Ifc4x1/IfcReferenceAutoImpl.h.

◆ m_TypeIdentifier

OdAnsiString OdIfc4x1::IfcReference::m_TypeIdentifier
protected

Definition at line 296 of file Ifc4x1/IfcReferenceAutoImpl.h.


The documentation for this class was generated from the following file: