Class: TNumberFormatter

Declaration: NumberFormat.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TFormatter

Inherited By:

TAdditiveNumberFormatter TOutlineNumberFormatter TPositionalNumberFormatter TRationalNumberFormatter

Purpose:

An abstract class that provides basic number formatting services. It can scan a text string representing a number and convert it into a TFormattableNumber object, or format the number wrapped by a TFormattableNumber object into a text string.

Instantiation:

Abstract class; do not allocate.

Deriving Classes:

Derived classes must override the TextToCanonicalNumber and CanonicalNumberToText functions. The system provides these derived classes: TAdditiveNumberFormatter, TOutlineNumberFormatter, and TPositionalNumberFormatter.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TNumberFormatter::~TNumberFormatter

virtual ~ TNumberFormatter ()

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: TNumberFormatter::Format

  1. virtual void Format (const TFormattable &, TText &) const
  2. virtual void Format (const TFormattable &, TText &, TFormatResult &) const

Interface Category:

API.

Purpose:

  1. Formats the specified formattable into a text string.
  2. Formats the specified formattable into a text string, returning the results of the formatting operation in the specified TFormatResult object.

Calling Context:

  1. Call this function directly.
  2. Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws TFormatterException if you pass the formatter a type of formattable or a type of format result that it cannot handle.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::Scan

virtual void Scan (const TText &, const TTextRange &, TFormattable &, TScanResult &) const

Interface Category:

API.

Purpose:

Scans the specified text string, converting it to a number.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws TFormatterException if you pass the formatter a type of formattable or a type of scan result that it cannot handle.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::CreateFormattable

virtual TFormattable * CreateFormattable () const

Interface Category:

API.

Purpose:

Creates a TFormattableNumber.

Calling Context:

Called during the scanning operation.

Parameters:

Return Value:

A pointer to the new TFormattableNumber object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::CreateScanResult

virtual TScanResult * CreateScanResult () const

Interface Category:

API.

Purpose:

Creates a TNumberScanResult.

Calling Context:

Called during the scanning operation.

Parameters:

Return Value:

A pointer to the new TNumberScanResult object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::CreateFormatResult

virtual TFormatResult * CreateFormatResult () const

Interface Category:

API.

Purpose:

Creates a TNumberFormatResult.

Calling Context:

Called during the formatting operation.

Parameters:

Return Value:

A pointer to the new TNumberFormatResult object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::AdoptOutOfBoundsNumberFormatter

void AdoptOutOfBoundsNumberFormatter (TNumberFormatter *)

Interface Category:

API.

Purpose:

Sets a different formatter for use with out-of-bounds numbers.

Calling Context:

Called to reset the number formatter used for out-of-bounds numbers.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The formatter will not adopt the specified out-of-bounds number formatter if its range is not greater than the range of this formatter.

Member Function: TNumberFormatter::IsTextNumber

virtual bool IsTextNumber (const TText &, const TTextRange & =TTextRange :: GetMaximumRange ()) const

Interface Category:

API.

Purpose:

Queries whether a text string represents a number.

Calling Context:

Call this function directly. This function calls TNumberFormatter::IsNumeral.

Parameters:

Return Value:

Returns true if the specified range of the text string represents a number.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::IsNumeral

virtual bool IsNumeral (UniChar) const

Interface Category:

API.

Purpose:

Queries whether a UniChar represents a number.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns true if the UniChar represents a number.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::IsValidNumber

virtual bool IsValidNumber (double) const

Interface Category:

API.

Purpose:

Queries whether a number is within the bounds of this number formatter.

Calling Context:

Called during the formatting operation to determine whether the out-of-bounds number formatter should be used.

Parameters:

Return Value:

Returns true if the number is within the bounds of this number formatter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetMinNumber

virtual double GetMinNumber () const

Interface Category:

API.

Purpose:

Gets the lower bound of the range of this number formatter.

Calling Context:

Call this function directly. Also called by the IsValidNumber function.

Parameters:

Return Value:

The lower bound of the range of this number formatter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetMaxNumber

virtual double GetMaxNumber () const

Interface Category:

API.

Purpose:

Gets the upper bound of the range of this number formatter.

Calling Context:

Call this function directly. Also called by the IsValidNumber function.

Parameters:

Return Value:

The upper bound of the range of this number formatter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetBase

virtual unsigned short GetBase () const

Interface Category:

API.

Purpose:

Gets the base number of the numbering system this formatter is used for.

Calling Context:

Called to create a TCanonicalNumberConverter to use during conversion operations.

Parameters:

Return Value:

The base number of the numbering system this formatter is used for.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetBase

virtual void SetBase (unsigned short)

Interface Category:

API.

Purpose:

Sets the base number of the numbering system this formatter is used for.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws TStandardException if the number is not supported as a base by the TNumerals class.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetMinNumber

virtual void SetMinNumber (double)

Interface Category:

API.

Purpose:

Sets the lower bound of the range of this number formatter.

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: TNumberFormatter::SetMaxNumber

virtual void SetMaxNumber (double)

Interface Category:

API.

Purpose:

Sets the upper bound of the range of this number formatter.

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: TNumberFormatter::GetPlus

virtual void GetPlus (TText & prefix, TText & suffix) const

Interface Category:

API.

Purpose:

Gets the affixes used to indicate a positive number.

Calling Context:

Called during the formatting operation.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetPlus

virtual void SetPlus (const TText & prefix, const TText & suffix)

Interface Category:

API.

Purpose:

Sets the affixes used to indicate a positive number.

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: TNumberFormatter::GetMinus

virtual void GetMinus (TText & prefix, TText & suffix) const

Interface Category:

API.

Purpose:

Gets the affixes used to indicate a negative number.

Calling Context:

Called during the formatting operation.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetMinus

virtual void SetMinus (const TText & prefix, const TText & suffix)

Interface Category:

API.

Purpose:

Sets the affixes used to indicate a negative number.

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: TNumberFormatter::GetShowPlusSign

virtual bool GetShowPlusSign () const

Interface Category:

API.

Purpose:

Queries whether the formatter is set to display text affixes indicating a positive number.

Calling Context:

Called during the formatting operation.

Parameters:

Return Value:

Returns true if the formatter is set to display text affixes indicating a positive number.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetShowPlusSign

virtual void SetShowPlusSign (bool)

Interface Category:

API.

Purpose:

Specifies whether the formatter should display text affixes indicating a positive number.

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: TNumberFormatter::SetNumerals

virtual void SetNumerals (const TNumerals &)

Interface Category:

API.

Purpose:

Clones the TNumerals object passed in and sets it to be the TNumerals object used by this number formatter for character to value mappings.

Calling Context:

Called when concrete number formatter classes are constructed and directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::CopyNumerals

virtual TNumerals * CopyNumerals () const

Interface Category:

API.

Purpose:

Clones the TNumerals object of the number formatter and returns a pointer to it.

Calling Context:

Called by functions that need to access the formatter's TNumerals; for example, the IsNumeral function.

Parameters:

Return Value:

A copy of the number formatter's TNumerals.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The caller is responsible for deleting the returned TNumerals.

Member Function: TNumberFormatter::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: TNumberFormatter::operator=

TNumberFormatter & operator =(const TNumberFormatter &)

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: TNumberFormatter::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: TNumberFormatter::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: TNumberFormatter::TNumberFormatter

  1. TNumberFormatter (const TNumerals &)
  2. TNumberFormatter (const TNumberFormatter & format)
  3. TNumberFormatter ()

Interface Category:

API.

Purpose:

  1. Creates a number formatter that uses the specified TNumerals object. This formatter has the other characteristics of the default number formatter.
  2. Copy constructor.
  3. Default constructor. This constructor creates a number formatter with these characteristics: a range of negative infinity to infinity, negative numbers indicated by a preceding minus sign, no indicators displayed for positive numbers, and using a TUnicodeDecimalNumerals object for character to value mappings.

Calling Context:

  1. Called to create a formatter that uses the specified TNumerals object.
  2. Called to copy an object.
  3. Called by the stream-in operators and by constructors of derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetNumerals

virtual TNumerals * GetNumerals () const

Interface Category:

API.

Purpose:

Returns a pointer to the TNumerals object used by this number formatter for character to value mappings.

Calling Context:

Called to get a copy of the current TNumerals object.

Parameters:

Return Value:

A pointer to the TNumerals object used by this number formatter for character to value mappings.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetOutOfBoundsNumberFormatter

TNumberFormatter * GetOutOfBoundsNumberFormatter () const

Interface Category:

API.

Purpose:

Gets the number formatter to be used for numbers out of the range of this number formatter.

Calling Context:

Called during conversion operations for numbers out of the range of this number formatter.

Parameters:

Return Value:

A pointer to the out-of-bounds number formatter.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetCanonicalNumberConverter

virtual void GetCanonicalNumberConverter (TCanonicalNumberConverter &) const

Interface Category:

API.

Purpose:

Gets the canonical number converter used by this number formatter for conversion operation.

Calling Context:

Called during the formatting operation to set up the converter for use.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetCanonicalNumberConverter

virtual void SetCanonicalNumberConverter (const TCanonicalNumberConverter &)

Interface Category:

API.

Purpose:

Sets the canonical number converter used by this number formatter for conversion operation.

Calling Context:

Called by the SetUpCanonicalNumberConverter function.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetUpCanonicalNumberConverter

virtual void SetUpCanonicalNumberConverter ()

Interface Category:

API.

Purpose:

Sets up the canonical number converter for use in converting between binary numbers and text.

Calling Context:

Called by Format and Scan functions.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::TextToCanonicalNumber

virtual void TextToCanonicalNumber (const TText &, TCanonicalNumber &, TNumberScanResult &, const TTextRange &)

Interface Category:

API.

Purpose:

During a scanning operation, converts a text string into a TCanonicalNumber object. The scanning function then uses a TCanonicalNumberConverter to convert the canonical number to a binary number.

Calling Context:

Called by the Scan member function when converting a text string into a numeral.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::CanonicalNumberToText

virtual void CanonicalNumberToText (const TCanonicalNumber &, TText &, TNumberFormatResult &)

Interface Category:

API.

Purpose:

During a formatting operation, converts a TCanonicalNumber object into a text string. The formatting function first uses a TCanonicalNumberConverter to convert the binary number into the canonical number.

Calling Context:

Called by the Format function when converting a numeral into a text string.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::NormalizeSign

virtual void NormalizeSign (TText &, TNumberFormatResult &, bool &)

Interface Category:

API.

Purpose:

Normalizes and inserts the sign affixes.

Calling Context:

Called during conversion operations to verify the accuracy of the conversion.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::ConfirmSignPrefix

virtual void ConfirmSignPrefix (const TText &, TTextRange &, TNumberScanResult &, bool &)

Interface Category:

API.

Purpose:

Checks the sign of the prefix attached to the formatted number.

Calling Context:

Called during conversion to verify the accuracy of the conversion.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::ConfirmSignSuffix

virtual void ConfirmSignSuffix (const TText &, TTextRange &, TNumberScanResult &, bool &)

Interface Category:

API.

Purpose:

Checks the sign of the prefix attached to the formatted number.

Calling Context:

Called during conversion to verify the accuracy of the conversion.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::ConfirmPlusSign

virtual bool ConfirmPlusSign (const TText &, TTextRange &, TNumberScanResult &)

Interface Category:

API.

Purpose:

Queries whether the formatted number has the affixes for a positive number attached.

Calling Context:

Called during scanning operations.

Parameters:

Return Value:

Returns true if the formatted number has the affixes for a positive number attached.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::ConfirmMinusSign

virtual bool ConfirmMinusSign (const TText &, TTextRange &, TNumberScanResult &)

Interface Category:

API.

Purpose:

Queries whether the formatted number has the affixes for a negative number attached.

Calling Context:

Called during scanning operations.

Parameters:

Return Value:

Returns true if the formatted number has the affixes for a negative number attached.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::UsesStandardNegation

virtual bool UsesStandardNegation (void)

Interface Category:

API.

Purpose:

Queries whether this number formatter uses standard negation.

Calling Context:

Called during conversion operations.

Parameters:

Return Value:

Returns true if this number formatter uses standard negation.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SymbolStartsText

virtual bool SymbolStartsText (TTextIterator & symbolIterator, TTextRange & range) const;

Interface Category:

API.

Purpose:

Checks to see if the text in the symbol iterator appears at the beginning of the range of the text to be scanned.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns true if the specified symbol appears at the beginning of the text range.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SymbolEndsText

virtual bool SymbolEndsText (TTextIterator & symbolIterator, TTextRange & range) const;

Interface Category:

API.

Purpose:

Checks to see if the text in the symbol iterator appears at the end of the range of the text to be scanned.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns true if the specified symbol appears at the end of the text range.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetTextIterator

TTextIterator* GetTextIterator() const;

Interface Category:

API.

Purpose:

Returns the pointer to the TTextIterator of the text to be scanned.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns the pointer to the TTextIterator of the text to be scanned.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetPlusPrefixIterator

TTextIterator* GetPlusPrefixIterator() const;

Interface Category:

API.

Purpose:

Returns the pointer to the TTextIterator of the plus prefix text.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns the pointer to the TTextIterator of the plus prefix text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetPlusSuffixIterator

TTextIterator* GetPlusSuffixIterator() const;

Interface Category:

API.

Purpose:

Returns the pointer to the TTextIterator of the plus suffix text.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns the pointer to the TTextIterator of the plus suffix text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetMinusPrefixIterator

TTextIterator* GetMinusPrefixIterator() const;

Interface Category:

API.

Purpose:

Returns the pointer to the TTextIterator of the minus prefix text.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns the pointer to the TTextIterator of the minus prefix text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetMinusSuffixIterator

TTextIterator* GetMinusSuffixIterator() const;

Interface Category:

API.

Purpose:

Returns the pointer to the TTextIterator of the minus suffix text.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns the pointer to the TTextIterator of the minus suffix text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetNanSignIterator

TTextIterator* GetNanSignIterator() const;

Interface Category:

API.

Purpose:

Returns the pointer to the TTextIterator of the Nan sign text.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns the pointer to the TTextIterator of the Nan sign text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetInfinitySignIterator

TTextIterator* GetInfinitySignIterator() const;

Interface Category:

API.

Purpose:

Returns the pointer to the TTextIterator of the Infinity sign text.

Calling Context:

Called during scanning operation.

Parameters:

Return Value:

Returns the pointer to the TTextIterator of the Infinity sign text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetMinusSuffixIterator

TTextIterator * GetMinusSuffixIterator () const

Interface Category:

API.

Purpose:

Gets the pointer the the minus suffix text iterator.

Calling Context:

Called during scanning.

Parameters:

Return Value:

The pointer to the text iterator of the minus suffix text.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetName

virtual void SetName (const TLocalizableName & name)

Interface Category:

API.

Purpose:

Sets the localizable name for the number formatter.

Calling Context:

Called by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetName

virtual void GetName (TLocalizableName & name) const

Interface Category:

API.

Purpose:

Gets the localizable name of this number formatter.

Calling Context:

Called by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetInfinitySign

virtual void SetInfinitySign (const TText &)

Interface Category:

API.

Purpose:

Sets the text for representing infinity value.

Calling Context:

Called by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::SetNanSign

virtual void SetNanSign (const TText &)

Interface Category:

API.

Purpose:

Sets the text for representing Nan value

Calling Context:

Called by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetInfinitySign

virtual void GetInfinitySign (TText &) const

Interface Category:

API.

Purpose:

Gets the text which represents infinity value.

Calling Context:

Called by client.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::GetNanSign

virtual void GetNanSign (TText &) const

Interface Category:

API.

Purpose:

Gets the text which represents Nan value.

Calling Context:

Called by clients.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TNumberFormatter::NormalizeText

  1. void NormalizeText (TText &, TNumberScanResult &)
  2. void NormalizeText (TText & theText, TNumberScanResult & scanResult, TInsertionOffset & newInsertionOffset, const TTextRange & replaceRange, const TText & replace)

Interface Category:

API.

Purpose:

  1. Normalize the given text. It basically scan the given text to a formattable, and reformat the result formattable.
  2. Normalize the given text whose part of the text range is replaced by a new text given. It passes back the new insertion offset after normalizing the result text.

Calling Context:

  1. Called by client.
  2. Called by client, particularly numeric text control.

Parameters:

Return Value:

None.

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.