CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
OdIfcUnitConverter Class Reference

#include <IfcUnitConverter.h>

Public Member Functions

double convertToSIUnit (const OdAnsiString &unitType, double val) const
 
void appendUnit (const OdAnsiString &unitType, const OdDAIObjectId &unitId)
 
void appendUnit (const OdDAIObjectId &unitId)
 
void clearUnits ()
 

Friends

class OdIfcFile
 

Detailed Description

A class that implements conversion of different units to the SI units.

Definition at line 42 of file IfcUnitConverter.h.

Member Function Documentation

◆ appendUnit() [1/2]

void OdIfcUnitConverter::appendUnit ( const OdAnsiString &  unitType,
const OdDAIObjectId &  unitId 
)

Appends a new convertible unit.

Parameters
unitType[in] A string that contains the type of the convertible unit.
unitId[in] An identifier of the corresponding IfcConversionBasedUnit object.
Remarks
The unit type value must belong to the IfcUnitEnum of the current schema.

◆ appendUnit() [2/2]

void OdIfcUnitConverter::appendUnit ( const OdDAIObjectId &  unitId)

Appends a new convertible unit.

Parameters
unitId[in] An identifier of the corresponding IfcConversionBasedUnit object.

◆ clearUnits()

void OdIfcUnitConverter::clearUnits ( )

Removes all convertible units.

◆ convertToSIUnit()

double OdIfcUnitConverter::convertToSIUnit ( const OdAnsiString &  unitType,
double  val 
) const

Performs an attempt to convert a specified unit to the SI unit.

Parameters
unitType[in] A string that contains the type of the unit to be converted.
val[in] A unit value.
Returns
A double value that contains the converted value of the specified unit type.
Remarks
The unit type value must belong to the IfcUnitEnum of the current schema.

Friends And Related Function Documentation

◆ OdIfcFile

friend class OdIfcFile
friend

Definition at line 82 of file IfcUnitConverter.h.


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