CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdIfc4::IfcMetric Class Reference

#include <IfcMetricAutoImpl.h>

Inheritance diagram for OdIfc4::IfcMetric:
OdIfc4::IfcConstraint OdIfc4::OdIfc4Instance OdIfc::OdIfcInstance

Public Member Functions

IfcBenchmarkEnum getBenchmark () const
 
void setBenchmark (IfcBenchmarkEnum Benchmark)
 
const OdAnsiString & getValueSource () const
 
void setValueSource (const OdAnsiString &ValueSource)
 
IfcMetricValueSelect dataValue ()
 
const OdDAIObjectId & getReferencePath () const
 
void setReferencePath (const OdDAIObjectId &ReferencePath)
 
 IfcMetric ()
 
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 bool comparedToEarlyImpl (const OdDAI::ApplicationInstance *pOther, OdRx::Ordering &ordering) 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 OdIfc4::IfcConstraint
const OdAnsiString & getName () const
 
void setName (const OdAnsiString &Name)
 
const OdAnsiString & getDescription () const
 
void setDescription (const OdAnsiString &Description)
 
IfcConstraintEnum getConstraintGrade () const
 
void setConstraintGrade (IfcConstraintEnum ConstraintGrade)
 
const OdAnsiString & getConstraintSource () const
 
void setConstraintSource (const OdAnsiString &ConstraintSource)
 
IfcActorSelect creatingActor ()
 
const OdAnsiString & getCreationTime () const
 
void setCreationTime (const OdAnsiString &CreationTime)
 
const OdAnsiString & getUserDefinedGrade () const
 
void setUserDefinedGrade (const OdAnsiString &UserDefinedGrade)
 
void getInvHasExternalReferences (OdDAIObjectIds &HasExternalReferences) const
 
void getInvPropertiesForConstraint (OdDAIObjectIds &PropertiesForConstraint) const
 
 IfcConstraint ()
 
- Public Member Functions inherited from OdIfc4::OdIfc4Instance
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

OdDAI::Enum m_Benchmark
 
OdAnsiString m_ValueSource
 
OdDAI::Select m_DataValue
 
OdDAIObjectId m_ReferencePath
 
- Protected Attributes inherited from OdIfc4::IfcConstraint
OdAnsiString m_Name
 
OdAnsiString m_Description
 
OdDAI::Enum m_ConstraintGrade
 
OdAnsiString m_ConstraintSource
 
OdDAI::Select m_CreatingActor
 
OdAnsiString m_CreationTime
 
OdAnsiString m_UserDefinedGrade
 
- 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

An IfcMetric is used to capture quantitative resultant metrics that can be applied to objectives. IfcMetric definition captures the quantitative aspects of a constraint.

  • Example - The image below shows an example of a user-defined constraint.

<IMAGE ifcmetric_userdefined_constraint>

\changes

IFC4 changes: Attribute DataValue is optional

Definition at line 52 of file Ifc4/IfcMetricAutoImpl.h.

Constructor & Destructor Documentation

◆ IfcMetric()

OdIfc4::IfcMetric::IfcMetric ( )

Default constructor for the IfcMetric class.

Member Function Documentation

◆ comparedToEarlyImpl()

virtual bool OdIfc4::IfcMetric::comparedToEarlyImpl ( const OdDAI::ApplicationInstance * pOther,
OdRx::Ordering & ordering ) const
overridevirtual

Early-bound version of instances comparison.

Parameters
pOther[in] Other application instance.
ordering[out] Receives the ordering (comparison) status.
Returns
true if comparison was performed, false if method has no implementation, so late-bound version could be applied.
Remarks
If the method returns true, the ordering parameter can receive one of the following statuses:
Value Description kLessThan -1 This object < Other Object. kEqual 0 This object = Other Object. kGreaterThan 1 This object > Other Object. kNotOrderable 2 This class is not orderable.

Reimplemented from OdIfc4::IfcConstraint.

◆ dataValue()

IfcMetricValueSelect OdIfc4::IfcMetric::dataValue ( )

Returns the value of DataValue attribute. This attribute represents a value to be compared on associated objects. A null value indicates comparison to null.

Returns
Returns the value of DataValue attribute.

◆ getAttr() [1/2]

virtual OdRxValue OdIfc4::IfcMetric::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.

Reimplemented from OdIfc4::IfcConstraint.

◆ getAttr() [2/2]

virtual OdRxValue OdIfc4::IfcMetric::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 OdIfc4::IfcConstraint.

◆ getBenchmark()

IfcBenchmarkEnum OdIfc4::IfcMetric::getBenchmark ( ) const

Returns the value of Benchmark attribute. This attribute represents the type of benchmark data.

Returns
Returns the value of Benchmark attribute.

◆ getInstanceType()

virtual OdDAI::Entity * OdIfc4::IfcMetric::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.

Reimplemented from OdIfc4::IfcConstraint.

◆ getReferencePath()

const OdDAIObjectId & OdIfc4::IfcMetric::getReferencePath ( ) const

Returns the value of ReferencePath attribute. This attribute represents optional path to an attribute to be constrained on associated objects. If provided, the metric can be validated by resolving the path to the current value on associated object(s), and comparing such value with DataValue according to the Benchmark.

Returns
Returns the value of ReferencePath attribute.

◆ getValueSource()

const OdAnsiString & OdIfc4::IfcMetric::getValueSource ( ) const

Returns the value of ValueSource attribute. This attribute represents reference source for data values. If DataValue refers to an IfcTable, this attribute identifies the relevant column identified by IfcTableColumn.Identifier.

Returns
Returns the value of ValueSource attribute.

◆ inFields()

virtual OdResult OdIfc4::IfcMetric::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.

Reimplemented from OdIfc4::IfcConstraint.

◆ isKindOf()

virtual bool OdIfc4::IfcMetric::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 OdIfc4::IfcConstraint.

◆ outFields()

virtual OdResult OdIfc4::IfcMetric::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.

Reimplemented from OdIfc4::IfcConstraint.

◆ putAttr() [1/2]

virtual bool OdIfc4::IfcMetric::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 OdIfc4::IfcConstraint.

◆ putAttr() [2/2]

virtual bool OdIfc4::IfcMetric::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 OdIfc4::IfcConstraint.

◆ setBenchmark()

void OdIfc4::IfcMetric::setBenchmark ( IfcBenchmarkEnum Benchmark)

Sets the value of Benchmark attribute. This attribute represents the type of benchmark data.

Parameters
Benchmark[in] Benchmark to set.

◆ setReferencePath()

void OdIfc4::IfcMetric::setReferencePath ( const OdDAIObjectId & ReferencePath)

Sets the value of ReferencePath attribute. This attribute represents optional path to an attribute to be constrained on associated objects. If provided, the metric can be validated by resolving the path to the current value on associated object(s), and comparing such value with DataValue according to the Benchmark.

Parameters
ReferencePath[in] Reference path to set.

◆ setValueSource()

void OdIfc4::IfcMetric::setValueSource ( const OdAnsiString & ValueSource)

Sets the value of ValueSource attribute. This attribute represents reference source for data values. If DataValue refers to an IfcTable, this attribute identifies the relevant column identified by IfcTableColumn.Identifier.

Parameters
ValueSource[in] Value source to set.

◆ testAttr() [1/2]

virtual bool OdIfc4::IfcMetric::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 OdIfc4::IfcConstraint.

◆ testAttr() [2/2]

virtual bool OdIfc4::IfcMetric::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 OdIfc4::IfcConstraint.

◆ type()

virtual OdIfc::OdIfcEntityType OdIfc4::IfcMetric::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 OdIfc4::IfcConstraint.

◆ unsetAttr() [1/2]

virtual void OdIfc4::IfcMetric::unsetAttr ( const char * explicitAttrName)
overridevirtual

Resets a value for the specified attribute.

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

Reimplemented from OdIfc4::IfcConstraint.

◆ unsetAttr() [2/2]

virtual void OdIfc4::IfcMetric::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 OdIfc4::IfcConstraint.

Member Data Documentation

◆ m_Benchmark

OdDAI::Enum OdIfc4::IfcMetric::m_Benchmark
protected

Definition at line 255 of file Ifc4/IfcMetricAutoImpl.h.

◆ m_DataValue

OdDAI::Select OdIfc4::IfcMetric::m_DataValue
protected

Definition at line 257 of file Ifc4/IfcMetricAutoImpl.h.

◆ m_ReferencePath

OdDAIObjectId OdIfc4::IfcMetric::m_ReferencePath
protected

Definition at line 258 of file Ifc4/IfcMetricAutoImpl.h.

◆ m_ValueSource

OdAnsiString OdIfc4::IfcMetric::m_ValueSource
protected

Definition at line 256 of file Ifc4/IfcMetricAutoImpl.h.


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