#include <scunit.h>
Inheritance diagram for Qualifier:
Public Types | |
enum | QUALIFIER_SHOWN { IS_NOTSHOWN = 0, IS_SHOWN = 1 } |
enum | QUALIFIER_AFFIX { SUFFIX = 0, PREFIX = 1, NONE = -1 } |
Public Member Functions | |
Qualifier () | |
Default constructor. Scope: public. | |
virtual | ~Qualifier () |
Qualifier & | operator= (const Qualifier &OtherQualifier) |
Assignment. Required for CC_CLASS_MEMDUMP Scope: public. | |
BOOL | SetAttributes (const String_32 &NewToken, QUALIFIER_SHOWN WhetherShown) |
Sets the Qualifier string for the unit. This is an abbreviation for a unit. E.g. "%" specifies percentage. Only characters returning TRUE from Convert::IsCharUnitType() are permitted in the qualifier token. | |
String_32 | GetToken () const |
To determine this Qualifier's representation in a string Scope: public. | |
BOOL | IsShown () const |
Determine whether to display the token representing the qualifier Scope: public. | |
virtual BOOL | MakeDisplayString (const StringBase &InString, StringBase *pOutString) const =0 |
virtual QUALIFIER_AFFIX | GetAffix () const =0 |
Protected Attributes | |
String_32 | m_Token |
BOOL | m_bShow |
Private Member Functions | |
CC_DECLARE_MEMDUMP (Qualifier) |
Definition at line 120 of file scunit.h.
|
Definition at line 131 of file scunit.h.
|
|
Definition at line 125 of file scunit.h. 00126 { 00127 IS_NOTSHOWN = 0, 00128 IS_SHOWN = 1 00129 };
|
|
Default constructor. Scope: public.
Definition at line 128 of file scunit.cpp.
|
|
Definition at line 139 of file scunit.h.
|
|
|
|
Implemented in PrefixQualifier, SuffixQualifier, and NullQualifier. |
|
To determine this Qualifier's representation in a string Scope: public.
Definition at line 229 of file scunit.cpp. 00230 { 00231 return m_Token; 00232 }
|
|
Determine whether to display the token representing the qualifier Scope: public.
Definition at line 248 of file scunit.cpp.
|
|
Implemented in PrefixQualifier, SuffixQualifier, and NullQualifier. |
|
Assignment. Required for CC_CLASS_MEMDUMP Scope: public.
Definition at line 144 of file scunit.cpp. 00145 { 00146 if (&OtherQualifier == this) return *this; 00147 00148 m_bShow = OtherQualifier.m_bShow; 00149 m_Token = OtherQualifier.m_Token; 00150 return *this; 00151 }
|
|
Sets the Qualifier string for the unit. This is an abbreviation for a unit. E.g. "%" specifies percentage. Only characters returning TRUE from Convert::IsCharUnitType() are permitted in the qualifier token.
Definition at line 177 of file scunit.cpp. 00178 { 00179 ERROR2IF(WhetherShown != IS_SHOWN && WhetherShown != IS_NOTSHOWN, FALSE, "Not a QUALIFIER_SHOWN"); 00180 00181 INT32 nTokenLength = NewToken.Length(); 00182 if (nTokenLength == 0) 00183 { 00184 ERROR3("Qualifier::SetAttributes - token zero length"); 00185 return FALSE; 00186 } 00187 // Check for the existence of possible clash characters in the token. 00188 for (INT32 i = 0; i < nTokenLength; ++i) 00189 { 00190 // Get the next character to be checked in the new specifier string 00191 if (!Convert::IsCharUnitType(NewToken[i])) 00192 { 00193 // We found a problem character so return this result to the caller 00194 ERROR3("Qualifier::SetAttributes - invalid char in token"); 00195 return FALSE; 00196 } 00197 } 00198 m_Token = NewToken; 00199 00200 switch (WhetherShown) 00201 { 00202 case IS_SHOWN: 00203 m_bShow = TRUE; 00204 break; 00205 00206 case IS_NOTSHOWN: 00207 m_bShow = FALSE; 00208 break; 00209 00210 default: // should never happen 00211 return FALSE; 00212 } 00213 return TRUE; 00214 }
|
|
|
|
|