#include <scunit.h>
Static Public Member Functions | |
static BOOL | Init () |
Initializes the Standard ScaleUnits & UnitGroups. | |
static BOOL | DeInit () |
Returns the StandardUnit class to a stable state as it was prior to Init() being called. Actually does nothing. | |
Static Public Attributes | |
static NullQualifier | TheNullQualifier |
static ScaleUnit | UnitPercent |
static ScaleUnit | UnitDecimalD |
static ScaleUnit | UnitDecimald |
static ScaleUnit | UnitDegree |
static UnitGroup | PercentGroup |
static UnitGroup | AngleGroup |
Private Member Functions | |
CC_DECLARE_MEMDUMP (StandardUnit) |
Definition at line 380 of file scunit.h.
|
|
|
Returns the StandardUnit class to a stable state as it was prior to Init() being called. Actually does nothing.
Definition at line 1764 of file scunit.cpp. 01765 { 01766 UnitDecimalD.SetQualifier(StandardUnit::TheNullQualifier); 01767 UnitDecimald.SetQualifier(StandardUnit::TheNullQualifier); 01768 UnitPercent.SetQualifier(StandardUnit::TheNullQualifier); 01769 return TRUE; 01770 }
|
|
Initializes the Standard ScaleUnits & UnitGroups. / Globals for StandardUnit class... Sets ScaleUnit StandardUnit::UnitPercent(100.0, 1); ScaleUnit StandardUnit::UnitDecimalD(255.0, 0); ScaleUnit StandardUnit::UnitDecimald(255.0, 0); ScaleUnit StandardUnit::UnitDegree(360.0, 1); UnitGroup StandardUnit::PercentGroup; UnitGroup StandardUnit::AngleGroup; NullQualifier StandardUnit::TheNullQualifier; // the Qualifier with no token /*!
Definition at line 1715 of file scunit.cpp. 01716 { 01717 String_32 qualifierToken; 01718 01719 ERROR2IF(!qualifierToken.Load(_R(IDS_PARSE_PERCENT)), FALSE, "Could not get percent token"); 01720 ERROR2IF(!UnitPercent.SetQualifier(qualifierToken, Qualifier::IS_SHOWN), FALSE, "Could not set qualifier"); 01721 01722 ERROR2IF(!qualifierToken.Load(_R(IDS_PARSE_LARGED)), FALSE, "Could not get decimal token"); 01723 ERROR2IF(!UnitDecimalD.SetQualifier(qualifierToken, Qualifier::IS_NOTSHOWN), FALSE, "Could not set qualifier"); 01724 01725 ERROR2IF(!qualifierToken.Load(_R(IDS_PARSE_SMALLD)), FALSE, "Could not get decimal token"); 01726 ERROR2IF(!UnitDecimald.SetQualifier(qualifierToken, Qualifier::IS_NOTSHOWN), FALSE, "Could not set qualifier"); 01727 01728 ERROR2IF(!PercentGroup.AddUnit(&UnitPercent), FALSE, "could not add unit"); 01729 ERROR2IF(!PercentGroup.AddUnit(&UnitDecimald), FALSE, "could not add unit"); 01730 ERROR2IF(!PercentGroup.AddUnit(&UnitDecimalD), FALSE, "could not add unit"); 01731 01732 ERROR2IF(!UnitDegree.SetQualifier(StandardUnit::TheNullQualifier), FALSE, "Could not set qualifier"); 01733 ERROR2IF(!AngleGroup.AddUnit(&UnitDegree), FALSE, "could not add unit"); 01734 01735 #ifdef _DEBUG 01736 ERROR2IF(!qualifierToken.Load(_R(IDS_PARSE_PERCENT)), FALSE, "Could not get percent token"); 01737 ScaleUnit testUnit(100.0, 1); 01738 testUnit.SetQualifier(qualifierToken, Qualifier::IS_NOTSHOWN); 01739 double num = 50.0; 01740 testUnit.StringFromScale(num, &qualifierToken, 5); 01741 #endif 01742 01743 return TRUE; 01744 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|