CFx SDK Documentation
2020SP3
|
#include <OdUnitsFormatter.h>
Public Types | |
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 } |
Public Member Functions | |
ODRX_DECLARE_MEMBERS (OdUnitsFormatter) | |
virtual OdString | formatCmColor (const OdCmColorBase &value) const =0 |
virtual OdSharedPtr< OdCmColorBase > | unformatCmColor (const OdString &string) const =0 |
virtual OdString | formatLinear (double value) const =0 |
virtual double | unformatLinear (const OdString &string) const =0 |
virtual OdString | formatAngle (double value) const =0 |
virtual double | unformatAngle (const OdString &string) const =0 |
Public Member Functions inherited from OdRxObject | |
ODRX_HEAP_OPERATORS () | |
OdRxObject () | |
virtual | ~OdRxObject () |
virtual OdRxObject * | queryX (const OdRxClass *pClass) const |
virtual OdRxObject * | x (const OdRxClass *pClass) const |
virtual OdRxClass * | isA () 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 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 OdRxClass * | desc () |
This class defines the interface for a Units Formatter.
<group Other_Classes>
Definition at line 41 of file OdUnitsFormatter.h.
Enumerator | |
---|---|
kDegrees | |
kDegMinSec | |
kGrads | |
kRadians | |
kSurveyors |
Definition at line 141 of file OdUnitsFormatter.h.
Definition at line 56 of file OdUnitsFormatter.h.
Enumerator | |
---|---|
kScientific | |
kDecimal | |
kEngineering | |
kArchitectural | |
kFractional | |
kWindowsDesktop |
Definition at line 46 of file OdUnitsFormatter.h.
|
static |
Returns the specified angular value as a string.
value | [in] Value to format. |
aUnits | [in] Angle units. |
precision | [in] Number of decimal places. |
dimzin | [in] A combination of ZeroSuppressionFlags. |
unitMode | [in] UNITMODE value. |
decsep | [in] Decimal separator. |
|
pure virtual |
Returns the specified angle value as a string.
value | [in] Value to format. |
Implemented in CFxUnitsFormatter, OdDbUnitsFormatterImpl, and OdDbBaseUnitsFormatter.
|
static |
|
pure virtual |
Returns the specified color value or OdCmColorBase object as a string.
value | [in] Value to format. |
Implemented in CFxUnitsFormatter, OdDbUnitsFormatterImpl, and OdDbBaseUnitsFormatter.
|
static |
Returns the specified distance value as a string.
value | [in] Value to format. |
lUnits | [in] Length units. |
precision | [in] Number of decimal places. |
dimzin | [in] A combination of ZeroSuppressionFlags. |
unitMode | [in] UNITMODE value. |
decsep | [in] Decimal separator. |
thsep | [in] Thousands separator. |
|
pure virtual |
Returns the specified distance value as a string.
value | [in] Value to format. |
Implemented in CFxUnitsFormatter, OdDbUnitsFormatterImpl, and OdDbBaseUnitsFormatter.
|
static |
|
static |
OdUnitsFormatter::ODRX_DECLARE_MEMBERS | ( | OdUnitsFormatter | ) |
|
static |
Returns the specified string as an angular value.
string | [in] String to unformat. |
|
static |
|
pure virtual |
Returns the specified string as an angle value.
string | [in] String to unformat. |
Implemented in CFxUnitsFormatter, OdDbUnitsFormatterImpl, and OdDbBaseUnitsFormatter.
|
pure virtual |
Returns the specified string as an wrapped OdCmColorBase object.
string | [in] String to unformat. |
Implemented in CFxUnitsFormatter, OdDbUnitsFormatterImpl, and OdDbBaseUnitsFormatter.
|
static |
Returns the specified length string as a length value.
string | [in] String to unformat. |
|
pure virtual |
Returns the specified string as a distance value.
string | [in] String to unformat. |
Implemented in CFxUnitsFormatter, OdDbUnitsFormatterImpl, and OdDbBaseUnitsFormatter.