CFx SDK Documentation  2022 SP0
Public Member Functions | Static Public Member Functions | List of all members
OdDbUnitsFormatter Class Referenceabstract

#include <DbUnitsFormatter.h>

Inheritance diagram for OdDbUnitsFormatter:
OdDbBaseUnitsFormatter OdUnitsFormatter OdRxObject CFxUnitsFormatter OdDbUnitsFormatterImpl

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdDbUnitsFormatter)
 
virtual double toUserAngle (double wcsAngle) const =0
 
virtual double fromUserAngle (double ucsAngle) const =0
 
virtual OdString formatPoint (const OdGePoint3d &value) const =0
 
virtual OdGePoint3d unformatPoint (const OdString &string) const =0
 
virtual OdGePoint3d toUCS (const OdGePoint3d &wcsPt) const =0
 
virtual OdGePoint3d fromUCS (const OdGePoint3d &ucsPt) const =0
 
- Public Member Functions inherited from OdDbBaseUnitsFormatter
 ODRX_DECLARE_MEMBERS (OdDbBaseUnitsFormatter)
 
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
 
- 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
 

Static Public Member Functions

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 ()
 

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
}
 
- Protected Member Functions inherited from OdDbBaseUnitsFormatter
 OdDbBaseUnitsFormatter ()
 

Detailed Description

This class defines the interface for a Units Formatter. <group OdDb_Classes>

Definition at line 36 of file DbUnitsFormatter.h.

Member Function Documentation

◆ formatColor()

static OdString OdDbUnitsFormatter::formatColor ( const OdCmColor value)
static

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

Parameters
value[in] Value to format.

◆ formatPoint()

virtual OdString OdDbUnitsFormatter::formatPoint ( const OdGePoint3d value) const
pure 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.

Implemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ fromUCS()

virtual OdGePoint3d OdDbUnitsFormatter::fromUCS ( const OdGePoint3d ucsPt) const
pure virtual

Returns the specified UCS point as a WCS point.

Parameters
ucsPt[in] UCS point.

Implemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ fromUserAngle()

virtual double OdDbUnitsFormatter::fromUserAngle ( double  ucsAngle) const
pure virtual

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

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

Implemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ ODRX_DECLARE_MEMBERS()

OdDbUnitsFormatter::ODRX_DECLARE_MEMBERS ( OdDbUnitsFormatter  )

◆ toUCS()

virtual OdGePoint3d OdDbUnitsFormatter::toUCS ( const OdGePoint3d wcsPt) const
pure virtual

Returns the specified WCS point as a UCS point.

Parameters
wcsPt[in] WCS point.

Implemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ toUserAngle()

virtual double OdDbUnitsFormatter::toUserAngle ( double  wcsAngle) const
pure virtual

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

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

Implemented in OdDbUnitsFormatterImpl, and CFxUnitsFormatter.

◆ unformatColor()

static OdCmColor OdDbUnitsFormatter::unformatColor ( const OdString string)
static

Returns the specified string as an OdCmColor object.

Parameters
string[in] String to unformat.

◆ unformatPoint()

virtual OdGePoint3d OdDbUnitsFormatter::unformatPoint ( const OdString string) const
pure virtual

Returns the specified string as a point value.

Parameters
string[in] String to unformat.

Implemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.


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