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.
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.
- virtual void Format (const TFormattable &, TText &) const
- virtual void Format (const TFormattable &, TText &, TFormatResult &) const
Interface Category:
API.
Purpose:
- Formats the specified formattable into a text string.
- Formats the specified formattable into a text string, returning the results of the formatting operation in the specified TFormatResult object.
Calling Context:
- Call this function directly.
- Call this function directly.
Parameters:
- const TFormattable & -The formattable containing the number to format.
- TText & -Receives the formatted text string.
- const TFormattable & -The formattable containing the number to format.
- TText & -Receives the formatted text string.
- TFormatResult & -Receives the results of the formatting operation.
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.
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:
- const TText & -The text string to scan.
- const TTextRange & -The range within the text string to scan.
- TFormattable & -Receives the scanned number.
- TScanResult & -Receives the results of the scanning operation.
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.
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:
- const TText & -The text object containing the string to examine.
- const TTextRange & =TTextRange :: GetMaximumRange () -The range within the text string to examine.
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.
virtual bool IsNumeral (UniChar) const
Interface Category:
API.
Purpose:
Queries whether a UniChar represents a number.
Calling Context:
Call this function directly.
Parameters:
- UniChar -The UniChar to examine.
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.
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:
- double -The number to query about.
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.
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.
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.
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.
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:
- unsigned short -The base number of the numbering system this formatter is used for.
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.
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:
- double -The lower bound of the range of this number formatter.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- double -The upper bound of the range of this number formatter.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- TText & prefix -The prefix used to indicate a positive number.
- TText & suffix -The suffix used to indicate a positive number.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- const TText & prefix -The prefix used to indicate a positive number.
- const TText & suffix -The suffix used to indicate a positive number.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- TText & prefix -The prefix used to indicate a negative number.
- TText & suffix -The suffix used to indicate a negative number.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- const TText & prefix -The prefix used to indicate a negative number.
- const TText & suffix -The suffix used to indicate a negative number.
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:
- bool -Set to true if the formatter should display text affixes indicating a positive number.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- const TNumerals & -The TNumerals object to be used by this formatter for character to value mappings.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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.
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.
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.
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.
- TNumberFormatter (const TNumerals &)
- TNumberFormatter (const TNumberFormatter & format)
- TNumberFormatter ()
Interface Category:
API.
Purpose:
- Creates a number formatter that uses the specified TNumerals object. This formatter has the other characteristics of the default number formatter.
- Copy constructor.
- 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:
- Called to create a formatter that uses the specified TNumerals object.
- Called to copy an object.
- Called by the stream-in operators and by constructors of derived classes.
Parameters:
- const TNumerals & -The TNumerals object this formatter should use for character to value mappings.
- const TNumberFormatter & format -The object to copy.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- const TText & -Contains the text string to scan.
- TCanonicalNumber & -Receives the canonical number produced by the conversion.
- TNumberScanResult & -Receives information about the result of the scanning operation.
- const TTextRange & -Specifies the range of the text string to scan.
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:
- const TCanonicalNumber & -Specifies the canonical number to convert.
- TText & -Receives the text string produced by the conversion.
- TNumberFormatResult & -Receives information about the result of the formatting operation.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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:
- TText & -The text containing formatted number.
- TNumberFormatResult & -Receives results of the normalizing operations.
- bool & -Flags whether the number is negative.
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:
- const TText & -The text object containing the formatted number.
- TTextRange & -The range within the text object containing the formatted number.
- TNumberScanResult & -The information about the accuracy of the conversion.
- bool & -Receives the result of the sign check; returns true if the number is negative.
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:
- const TText & -The text object containing the formatted number.
- TTextRange & -The range within the text object containing the formatted number.
- TNumberScanResult & -The information about the accuracy of the conversion.
- bool & -Receives the result of the sign check; returns true if the number is negative.
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:
- const TText & -The text object containing the formatted number.
- TTextRange & -The range within the text object containing the formatted number.
- TNumberScanResult & -Receives the results of the scanning operation.
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:
- const TText & -The text object containing the formatted number.
- TTextRange & -The range within the text object containing the formatted number.
- TNumberScanResult & -Receives the results of the scanning operation.
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:
- TTextIterator & symbolIterator -The iterator of the symbol.
- TTextRange & range -The range within the text object to examine.
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:
- TTextIterator & symbolIterator -The iterator of the symbol.
- TTextRange & range -The range within the text object to examine.
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.
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.
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:
- const TText & -The text which represents infinity value.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetNanSign (const TText &)
Interface Category:
API.
Purpose:
Sets the text for representing Nan value
Calling Context:
Called by clients.
Parameters:
- const TText & -The text which represents Nan value.
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:
- TText & -The text which represents infinity value.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void GetNanSign (TText &) const
Interface Category:
API.
Purpose:
Gets the text which represents Nan value.
Calling Context:
Called by clients.
Parameters:
- TText & -The text which represents Nan value.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- void NormalizeText (TText &, TNumberScanResult &)
- void NormalizeText (TText & theText, TNumberScanResult & scanResult, TInsertionOffset & newInsertionOffset, const TTextRange & replaceRange, const TText & replace)
Interface Category:
API.
Purpose:
- Normalize the given text. It basically scan the given text to a formattable, and reformat the result formattable.
- 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:
- Called by client.
- Called by client, particularly numeric text control.
Parameters:
- TText & -The text to be normalized.
- TNumberScanResult & -The scan result from normalizing the text.
- TText & theText -The text to be normalized.
- TNumberScanResult & scanResult -The scan result from normalizing the text.
- TInsertionOffset & newInsertionOffset -The new insertion offset after replacing the specified range of text with the new text, and normalizing the result text.
- const TTextRange & replaceRange -The range of the text to be replaced by the new text given.
- const TText & replace -The new text which is replacing the specified range of the original text to be normalized.
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.