CFx SDK Documentation  2020SP3
Public Member Functions | Protected Member Functions | List of all members
OdDbBaseUnitsFormatter Class Reference

#include <DbBaseUnitsFormatter.h>

Inheritance diagram for OdDbBaseUnitsFormatter:
OdUnitsFormatter OdRxObject OdDbUnitsFormatter CFxUnitsFormatter OdDbUnitsFormatterImpl

Public Member Functions

 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
 

Protected Member Functions

 OdDbBaseUnitsFormatter ()
 

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 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 defines the interface for a Units Formatter. <group OdDbRoot_Classes>

Definition at line 34 of file DbBaseUnitsFormatter.h.

Constructor & Destructor Documentation

◆ OdDbBaseUnitsFormatter()

OdDbBaseUnitsFormatter::OdDbBaseUnitsFormatter ( )
protected

Member Function Documentation

◆ formatAngle()

virtual OdString OdDbBaseUnitsFormatter::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.

Implements OdUnitsFormatter.

Reimplemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ formatCmColor()

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

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

Parameters
value[in] Value to format.

Implements OdUnitsFormatter.

Reimplemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ formatLinear()

virtual OdString OdDbBaseUnitsFormatter::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.

Implements OdUnitsFormatter.

Reimplemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ ODRX_DECLARE_MEMBERS()

OdDbBaseUnitsFormatter::ODRX_DECLARE_MEMBERS ( OdDbBaseUnitsFormatter  )

◆ unformatAngle()

virtual double OdDbBaseUnitsFormatter::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.

Implements OdUnitsFormatter.

Reimplemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ unformatCmColor()

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

Returns the specified string as an wrapped OdCmColorBase object.

Parameters
string[in] String to unformat.

Implements OdUnitsFormatter.

Reimplemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.

◆ unformatLinear()

virtual double OdDbBaseUnitsFormatter::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.

Implements OdUnitsFormatter.

Reimplemented in CFxUnitsFormatter, and OdDbUnitsFormatterImpl.


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