CFx SDK Documentation  2023 SP0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OdDbUnitsFormatterImpl Class Reference

#include <DbUnitsFormatterImpl.h>

Inheritance diagram for OdDbUnitsFormatterImpl:
OdDbUnitsFormatter OdDbBaseUnitsFormatter OdUnitsFormatter OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdDbUnitsFormatterImpl)
 
virtual OdString formatCmColor (const OdCmColorBase &value) const
 
virtual OdSharedPtr< OdCmColorBaseunformatCmColor (const OdString &string) const
 
virtual OdString formatLinear (double value) const
 
virtual double unformatLinear (const OdString &string) const
 
virtual OdString formatAngle (double value) const
 
virtual double unformatAngle (const OdString &string) const
 
virtual double toUserAngle (double wcsAngle) const
 
virtual double fromUserAngle (double ucsAngle) const
 
virtual OdString formatPoint (const OdGePoint3d &value) const
 
virtual OdGePoint3d unformatPoint (const OdString &string) const
 
virtual OdGePoint3d toUCS (const OdGePoint3d &wcsPt) const
 
virtual OdGePoint3d fromUCS (const OdGePoint3d &ucsPt) const
 
void setDatabase (OdDbDatabase *db)
 
- Public Member Functions inherited from OdDbUnitsFormatter
 ODRX_DECLARE_MEMBERS (OdDbUnitsFormatter)
 
- Public Member Functions inherited from OdDbBaseUnitsFormatter
 ODRX_DECLARE_MEMBERS (OdDbBaseUnitsFormatter)
 
- Public Member Functions inherited from OdUnitsFormatter
 ODRX_DECLARE_MEMBERS (OdUnitsFormatter)
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdDbUnitsFormatterImpl ()
 
- Protected Member Functions inherited from OdDbBaseUnitsFormatter
 OdDbBaseUnitsFormatter ()
 

Protected Attributes

OdDbDatabasem_pDb
 

Additional Inherited Members

- Public Types inherited from OdUnitsFormatter
enum  LUnits {
  kScientific = 1 , kDecimal = 2 , kEngineering = 3 , kArchitectural = 4 ,
  kFractional = 5 , kWindowsDesktop = 6
}
 
enum  DimzinValues {
  kSuppressesZeroFeetAndPreciselyZeroInches = 0 , kIncludesZeroFeetAndPreciselyZeroInches = 1 , kIncludesZeroFeetAndSuppressesZeroInches = 2 , kIncludesZeroInchesAndSuppressesZeroFeet = 3 ,
  kSuppressesLeadingZeros = 4 , kSuppressesTrailingZeros = 8 , kSuppressesBothLeadingAndTrailingZeros = 12
}
 
enum  AUnits {
  kDegrees = 0 , kDegMinSec = 1 , kGrads = 2 , kRadians = 3 ,
  kSurveyors = 4
}
 
- Static Public Member Functions inherited from OdDbUnitsFormatter
static OdString formatColor (const OdCmColor &value)
 
static OdCmColor unformatColor (const OdString &string)
 
- Static Public Member Functions inherited from OdUnitsFormatter
static bool isZeroFeetSuppressed (int dimzin)
 
static bool isZeroInchesSuppressed (int dimzin)
 
static OdString formatL (double value, LUnits lUnits, int precision, int dimzin, int unitMode, const OdChar *decsep=0, const OdChar *thsep=0)
 
static OdString formatArea (double value, LUnits lUnits, int precision, int dimzin, int unitMode, const OdChar *decsep=0, const OdChar *thsep=0)
 
static double unformatL (const OdString &string)
 
static OdString formatA (double value, AUnits aUnits, int precision, int dimzin, int unitMode, const OdChar *decsep=0)
 
static double unformatA (const OdString &string)
 
static double unformatA_unnorm (const OdString &string, bool refuseDots=false)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class provides default implementation for OdDbUnitsFormatter. <group OdDb_Classes>

Definition at line 37 of file DbUnitsFormatterImpl.h.

Constructor & Destructor Documentation

◆ OdDbUnitsFormatterImpl()

OdDbUnitsFormatterImpl::OdDbUnitsFormatterImpl ( )
protected

Member Function Documentation

◆ formatAngle()

virtual OdString OdDbUnitsFormatterImpl::formatAngle ( double  value) const
virtual

Returns the specified angle value as a string.

Parameters
value[in] Value to format.
Remarks
The returned value depends on the ANGBASE, AUNITS, AUPREC, DIMZIN, and UNITMODE system variables.
All angles are expressed in radians.

Reimplemented from OdDbBaseUnitsFormatter.

◆ formatCmColor()

virtual OdString OdDbUnitsFormatterImpl::formatCmColor ( const OdCmColorBase value) const
virtual

Returns the specified color value or OdCmColorBase object as a string.

Parameters
value[in] Value to format.

Reimplemented from OdDbBaseUnitsFormatter.

◆ formatLinear()

virtual OdString OdDbUnitsFormatterImpl::formatLinear ( double  value) const
virtual

Returns the specified distance value as a string.

Parameters
value[in] Value to format.
Remarks
The returned value depends on the DIMZIN, LUNITS, LUPREC, and UNITMODE system variables.

Reimplemented from OdDbBaseUnitsFormatter.

◆ formatPoint()

virtual OdString OdDbUnitsFormatterImpl::formatPoint ( const OdGePoint3d value) const
virtual

Returns the specified 3D point value as a string.

Parameters
value[in] Value to format.
Remarks
The returned value depends on the DIMZIN, LUNITS, LUPREC, and UNITMODE system variables.

Implements OdDbUnitsFormatter.

◆ fromUCS()

virtual OdGePoint3d OdDbUnitsFormatterImpl::fromUCS ( const OdGePoint3d ucsPt) const
virtual

Returns the specified UCS point as a WCS point.

Parameters
ucsPt[in] UCS point.

Implements OdDbUnitsFormatter.

◆ fromUserAngle()

virtual double OdDbUnitsFormatterImpl::fromUserAngle ( double  ucsAngle) const
virtual

Returns the specified UCS angle as an angle in the WCS.

Parameters
ucsAngle[in] UCS angle.
Remarks
All angles are expressed in radians.

Implements OdDbUnitsFormatter.

◆ ODRX_DECLARE_MEMBERS()

OdDbUnitsFormatterImpl::ODRX_DECLARE_MEMBERS ( OdDbUnitsFormatterImpl  )

◆ setDatabase()

void OdDbUnitsFormatterImpl::setDatabase ( OdDbDatabase db)

◆ toUCS()

virtual OdGePoint3d OdDbUnitsFormatterImpl::toUCS ( const OdGePoint3d wcsPt) const
virtual

Returns the specified WCS point as a UCS point.

Parameters
wcsPt[in] WCS point.

Implements OdDbUnitsFormatter.

◆ toUserAngle()

virtual double OdDbUnitsFormatterImpl::toUserAngle ( double  wcsAngle) const
virtual

Returns the specified WCS angle as an angle in the UCS.

Parameters
wcsAngle[in] WCS angle.
Remarks
All angles are expressed in radians.

Implements OdDbUnitsFormatter.

◆ unformatAngle()

virtual double OdDbUnitsFormatterImpl::unformatAngle ( const OdString string) const
virtual

Returns the specified string as an angle value.

Parameters
string[in] String to unformat.
Remarks
The returned value depends on the ANGBASE system variable.
All angles are expressed in radians.

Reimplemented from OdDbBaseUnitsFormatter.

◆ unformatCmColor()

virtual OdSharedPtr<OdCmColorBase> OdDbUnitsFormatterImpl::unformatCmColor ( const OdString string) const
virtual

Returns the specified string as an wrapped OdCmColorBase object.

Parameters
string[in] String to unformat.

Reimplemented from OdDbBaseUnitsFormatter.

◆ unformatLinear()

virtual double OdDbUnitsFormatterImpl::unformatLinear ( const OdString string) const
virtual

Returns the specified string as a distance value.

Parameters
string[in] String to unformat.
Remarks
The returned value depends on the UNITMODE system variable.

Reimplemented from OdDbBaseUnitsFormatter.

◆ unformatPoint()

virtual OdGePoint3d OdDbUnitsFormatterImpl::unformatPoint ( const OdString string) const
virtual

Returns the specified string as a point value.

Parameters
string[in] String to unformat.

Implements OdDbUnitsFormatter.

Member Data Documentation

◆ m_pDb

OdDbDatabase* OdDbUnitsFormatterImpl::m_pDb
protected

Definition at line 136 of file DbUnitsFormatterImpl.h.


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