![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TNumerals
Inherited By:
None.
Purpose:
This class, derived from TNumerals, performs mappings between values and any characters identified by Unicode as digits. When mapping values to characters, this class maps into the digits used by a particular script.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
None.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TUnicodeDecimalNumerals ()
- TUnicodeDecimalNumerals (TUnicode :: EUnicodeScript theScript)
- TUnicodeDecimalNumerals (const TUnicodeDecimalNumerals &)
Interface Category:
API.
Purpose:
- Default constructor. Creates an object that has a base of 10, a range of bases between 2 and 10, and uses the Roman script.
- Creates an object that uses the specified script for value to character mappings. This object will also have a base of 10 and a range of bases between 2 and 10.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and directly to instantiate this class.
- Called to create an object that uses a script other than Roman.
- Called to copy an object.
Parameters:
- Takes no parameters.
- TUnicode :: EUnicodeScript theScript -The script this object should use for value to character mappings.
- const TUnicodeDecimalNumerals & -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TUnicodeDecimalNumerals ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool NumeralToValue (UniChar ch, long & value)
Interface Category:
API.
Purpose:
Converts a character into a numeric value.
Calling Context:
Called during the scanning operation.
Parameters:
- UniChar ch -The character to convert into a value.
- long & value -Receives the value represented by the character.
Return Value:
Returns true if the character can be converted into a numeric value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool ValueToNumeral (long value, UniChar & ch)
Interface Category:
API.
Purpose:
Converts a numeric value into a character representation.
Calling Context:
Called during the formatting operation.
Parameters:
- long value -The numeric value to convert into a character.
- UniChar & ch -Receives the character representing the numeric value.
Return Value:
Returns true if the number can be converted into a character.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
void SetScript (TUnicode :: EUnicodeScript)
Interface Category:
API.
Purpose:
Sets the script for this object to use for value to character mappings.
Calling Context:
Call this function directly.
Parameters:
- TUnicode :: EUnicodeScript -The script for this object to use for value to character mappings.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TUnicodeDecimalNumerals & operator =(const TUnicodeDecimalNumerals &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object is streamed out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object is streamed in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws a TStandardException if the version of the formatter cannot be used on the current system.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual long Hash () const
Interface Category:
API.
Purpose:
Generates a hash value.
Calling Context:
Called to generate a hash value.
Parameters:
Return Value:
The numeric value of the hash.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
TUnicode :: EUnicodeScript GetScript () const
Interface Category:
API.
Purpose:
Gets the script for this object to use for value to character mappings.
Calling Context:
Call this function directly.
Parameters:
Return Value:
The script for this object to use for value to character mappings.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.