Class: TUnicodeDecimalNumerals

Declaration: Numerals.h

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.

Member Function: TUnicodeDecimalNumerals::TUnicodeDecimalNumerals

  1. TUnicodeDecimalNumerals ()
  2. TUnicodeDecimalNumerals (TUnicode :: EUnicodeScript theScript)
  3. TUnicodeDecimalNumerals (const TUnicodeDecimalNumerals &)

Interface Category:

API.

Purpose:

  1. Default constructor. Creates an object that has a base of 10, a range of bases between 2 and 10, and uses the Roman script.
  2. 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.
  3. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and directly to instantiate this class.
  2. Called to create an object that uses a script other than Roman.
  3. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeDecimalNumerals::~TUnicodeDecimalNumerals

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.

Member Function: TUnicodeDecimalNumerals::NumeralToValue

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:

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.

Member Function: TUnicodeDecimalNumerals::ValueToNumeral

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:

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.

Member Function: TUnicodeDecimalNumerals::SetScript

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TUnicodeDecimalNumerals::operator=

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.

Member Function: TUnicodeDecimalNumerals::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

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.

Member Function: TUnicodeDecimalNumerals::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

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.

Member Function: TUnicodeDecimalNumerals::Hash

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.

Member Function: TUnicodeDecimalNumerals::GetScript

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.