CFx SDK Documentation
2023 SP0
|
#include <FxUnitsFormatter.h>
Public Types | |
enum | _Flags { eNone = 0 , eRelativeUnit = 0x0001 } |
typedef enum CFxUnitsFormatter::_Flags | Flags |
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 } |
Public Member Functions | |
CFxUnitsFormatter () | |
~CFxUnitsFormatter (void) override | |
void | SetFxDatabase (const CFxDatabase *) |
Flags | GetFlags () const |
const CFxDatabase * | GetFxDatabase () const |
virtual int | IntToString (CFxString &strResult, int iValue) const |
virtual int | StringToInt (int *iResult, const CFxString &strValue) const |
virtual int | RealToString (CFxString &strResult, double dValue, int iUnit=-1, int iPrecision=-1, int dimzin=-1) const |
virtual int | StringToReal (double *pResult, const CFxString &strValue, bool bNoDistance=false, bool bAllowArchitectural=true) const |
virtual int | PointToString (CFxString &strResult, const OdGePoint3d &ptValue, bool toPolar=false, int iUnit=kDecimal, int iPrecision=-1, OdChar seperator=',') const |
virtual int | PointToString (CFxString &strResult, const OdGePoint2d &ptValue, bool toPolar=false, int iUnit=kDecimal, int iPrecision=-1, OdChar seperator=',') const |
virtual int | StringToPoint (OdGePoint3d &geResultWCS, const CFxString &strValueUCS, Flags *pUnitFlags=0, const OdGePoint3d *pLastPointWCS=0) const |
virtual int | AngleToString (CFxString &strResult, double dValue, int iUnit=-1, int iPrecision=-1, int dimzin=-1, bool ignoreANGBASE=false) const |
virtual int | AngleToString (CFxString &strResult, double dValue, int iUNITMODE, int iAUPREC, int iDIMZIN, int iAUNITS, int iANGDIR, double dANGBASE) const |
virtual int | StringToAngle (double *pResult, const CFxString &strValue, int iUnit=-1, bool *isNegative=0, bool ignoreANGBASE=false) const |
virtual int | StringToAngle (double *pResult, const CFxString &strValue, int iAUNITS, bool *isNegative, int iANGDIR, double dANGBASE) const |
virtual int | PointToUCS (OdGePoint3d &ptResultUCS, const OdGePoint3d &ptValueWCS) const |
virtual int | PointFromUCS (OdGePoint3d &ptResultWCS, const OdGePoint3d &ptValueUCS) const |
virtual int | OrientToString (CFxString &strResult, double dValue, int iUnit=-1, int iPrecision=-1, int dimzin=-1) const |
virtual int | OrientToString (CFxString &strResult, double dValue, int iUNITMODE, int iAUPREC, int iDIMZIN, int iAUNITS, int iANGDIR, double dANGBASE) const |
virtual int | StringToOrient (double *pResult, const CFxString &strValue, int iUnit=-1) const |
virtual int | StringToOrient (double *pResult, const CFxString &strValue, int iAUNITS, int iANGDIR, double dANGBASE) const |
virtual int | StringToColor (OdCmColor *iResult, const CFxString &strValue) const |
virtual int | ResBufToString (CFxString &strResult, const OdResBuf *pRb) const |
virtual int | ReadDouble (double *pResult, const CFxString &value, CFxString *remainingString=0) const |
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 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 int | NameToString (CFxString &strResult, const fdt_name pRb) |
static int | StringToName (fdt_name *pResult, const CFxString &strValue) |
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 OdRxClass * | desc () |
Protected Member Functions | |
OdString | formatLinear (double value) const override |
double | unformatLinear (const OdString &string) const override |
OdString | formatAngle (double value) const override |
double | unformatAngle (const OdString &string) const override |
double | toUserAngle (double value) const override |
double | fromUserAngle (double value) const override |
virtual CFxString | additionalRealFormatting (const CFxString &strValue) const |
OdString | formatPoint (const OdGePoint3d &value) const override |
OdGePoint3d | unformatPoint (const OdString &string) const override |
OdGePoint3d | toUCS (const OdGePoint3d &wcsPt) const override |
OdGePoint3d | fromUCS (const OdGePoint3d &ucsPt) const override |
OdString | formatCmColor (const OdCmColorBase &value) const override |
OdSharedPtr< OdCmColorBase > | unformatCmColor (const OdString &string) const override |
Protected Member Functions inherited from OdDbBaseUnitsFormatter | |
OdDbBaseUnitsFormatter () | |
Static Protected Member Functions | |
static int | unformatL (const CFxString &string, double &resVal, bool bAllowArchitectural) |
static int | unformatScale (const CFxString &string, double &resVal) |
static int | unformatA (const CFxString &string, double &resVal, bool *isNegative=0) |
static OdString | formatL (double v, LUnits units, int precision, int dimzin, int mode, OdChar decsep=0, OdChar thsep=0) |
Protected Attributes | |
const CFxDatabase * | m_pDatabase |
Description: Represents the units formatting. Library: DDKERNEL
Definition at line 38 of file FxUnitsFormatter.h.
typedef enum CFxUnitsFormatter::_Flags CFxUnitsFormatter::Flags |
Enumerator | |
---|---|
eNone | |
eRelativeUnit |
Definition at line 42 of file FxUnitsFormatter.h.
CFxUnitsFormatter::CFxUnitsFormatter | ( | ) |
|
override |
|
protectedvirtual |
Description:
|
virtual |
|
virtual |
|
overrideprotectedvirtual |
Description: Returns the specified angle value as a string. Arguments: value (I) Value to format. Remarks: The returned value depends on the ANGBASE, AUNITS, AUPREC, DIMZIN, and UNITMODE system variables. Note: All angles are expressed in radians.
Reimplemented from OdDbBaseUnitsFormatter.
|
overrideprotectedvirtual |
Returns the specified color value or OdCmColorBase object as a string.
value | [in] Value to format. |
Reimplemented from OdDbBaseUnitsFormatter.
|
staticprotected |
Description: Format l. Arguments:
v | The v. |
units | The units. |
precision | The precision. |
dimzin | The dimzin. |
mode | The mode. |
decsep | (optional) the decsep. |
thsep | (optional) the thsep. |
Return Value: The formatted l.
|
overrideprotectedvirtual |
Description: Returns the specified distance value as a string. Arguments: value (I) Value to format. Remarks: The returned value depends on the DIMZIN, LUNITS, LUPREC, and UNITMODE system variables.
Reimplemented from OdDbBaseUnitsFormatter.
|
overrideprotectedvirtual |
Description: Returns the specified 3D point value as a string. Arguments: value (I) Value to format. Remarks: The returned value depends on the DIMZIN, LUNITS, LUPREC, and UNITMODE system variables.
Implements OdDbUnitsFormatter.
|
overrideprotectedvirtual |
Description:
Implements OdDbUnitsFormatter.
|
overrideprotectedvirtual |
Description:
Implements OdDbUnitsFormatter.
Flags CFxUnitsFormatter::GetFlags | ( | ) | const |
const CFxDatabase* CFxUnitsFormatter::GetFxDatabase | ( | ) | const |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void CFxUnitsFormatter::SetFxDatabase | ( | const CFxDatabase * | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
static |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
overrideprotectedvirtual |
Description:
Implements OdDbUnitsFormatter.
|
overrideprotectedvirtual |
Description:
Implements OdDbUnitsFormatter.
|
staticprotected |
Description: Unformat a. Arguments:
string | The string. | |
[in,out] | resVal | The resource value. |
isNegative | (optional) [in,out] If non-null, the is negative. |
Return Value: .
|
overrideprotectedvirtual |
Description: Returns the specified string as an angle value. Arguments: string (I) String to unformat. Remarks: The returned value depends on the ANGBASE system variable. Note: All angles are expressed in radians.
Reimplemented from OdDbBaseUnitsFormatter.
|
overrideprotectedvirtual |
Returns the specified string as an wrapped OdCmColorBase object.
string | [in] String to unformat. |
Reimplemented from OdDbBaseUnitsFormatter.
|
staticprotected |
Description:
|
overrideprotectedvirtual |
Description: Returns the specified string as a distance value. Arguments: string (I) String to unformat. Remarks: The returned value depends on the UNITMODE system variable.
Reimplemented from OdDbBaseUnitsFormatter.
|
overrideprotectedvirtual |
Description: Returns the specified string as a point value. Arguments: string (I) String to unformat.
Implements OdDbUnitsFormatter.
|
staticprotected |
Description: Unformat scale. Arguments:
string | The string. | |
[in,out] | resVal | The resource value. |
Return Value: .
|
protected |
Definition at line 227 of file FxUnitsFormatter.h.