![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TFormatResult
Inherited By:
None.
Purpose:
This class, derived from TFormatResult, contains information about the result of formatting a binary numeric value into a text string.
Instantiation:
Always allocate on the heap.
Deriving Classes:
This class is not designed to be derived.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TNumberFormatResult ()
- TNumberFormatResult (const TNumberFormatResult & copy)
Interface Category:
API.
Purpose:
- Default constructor. Resets the error fields, sets the integer boundary to 0, and sets the digit sequence end to 0.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and directly to instantiate this class.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TNumberFormatResult ()
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 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.
virtual void ResetErrors ()
Interface Category:
API.
Purpose:
Resets all of the error information.
Calling Context:
Called when the object is constructed. Also called directly to reset the result fields.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool GetOutOfBoundsError () const
Interface Category:
API.
Purpose:
Queries whether the number was out of the range of the number formatter. If this flag is set, the default out-of-bounds number formatter was used.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the number was out of the range of the number formatter.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual bool GetCanNormalize () const
Interface Category:
API.
Purpose:
Queries whether the string can be normalized.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if the string can be normalized.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual unsigned long GetIntegerBoundary () const
Interface Category:
API.
Purpose:
Gets the index of the integer boundary (the separation point between the integer and fractional parts of the number).
Calling Context:
Call this function directly.
Parameters:
Return Value:
An unsigned long representing the index of the integer boundary within the formatted text.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual unsigned long GetDigitSequenceEnd () const
Interface Category:
API.
Purpose:
Gets the index of the digit sequence end (the position within the text string where the number ends and any surrounding text data begins).
Calling Context:
Call this function directly.
Parameters:
Return Value:
An unsigned long representing the index of the digit sequence end within the formatted text.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetOutOfBoundsError (bool)
Interface Category:
API.
Purpose:
Sets the out-of-bounds error flag if the number was out of the bounds of the number formatter. If this error occurs, the default out-of-bounds number formatter is used.
Calling Context:
Called during the formatting operation if this error occurred.
Parameters:
- bool -Set to true if the number was out of the bounds of the number formatter.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetCanNormalize (bool)
Interface Category:
API.
Purpose:
Sets the can normalize flag if the string can be normalized.
Calling Context:
Called during the formatting operation if the string can be normalized.
Parameters:
- bool -Set to true if the string can be normalized.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetIntegerBoundary (const unsigned long)
Interface Category:
API.
Purpose:
Sets the index of the integer boundary (the separation point between the integer part of the value and the fractional part of the value).
Calling Context:
Called during the formatting operation.
Parameters:
- const unsigned long -The number representing the index into the text string of the integer boundary.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual void SetDigitSequenceEnd (const unsigned long)
Interface Category:
API.
Purpose:
Sets the index of the digit sequence end (the position in the text string where the number ends and any surrounding text begins).
Calling Context:
Called during the formatting operation.
Parameters:
- const unsigned long -The number representing the index into the text string of the digit sequence end.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- virtual TFormatResult & operator =(const TFormatResult &)
- virtual TNumberFormatResult & operator =(const TNumberFormatResult &)
Interface Category:
API.
Purpose:
- Inherited assignment operator from class TFormatResult.
- Assignment operator.
Calling Context:
- Called when a TFormatResult object is polymorphically assigned to another TNumberFormatResult object.
- Called when an object is assigned to another compatible object.
Parameters:
- const TFormatResult & -The format result object being assigned to this number format result object.
- const TNumberFormatResult & -The number format result object being assigned to this number format result object.
Return Value:
- Returns a TFormatResult reference to this number format result object.
- Returns a TNumberFormatResult reference to this number format result object.
Exceptions:
Throws the exception TFormatterException::kIncorrectScanOrFormatResultProvided if an incorrect format result is provided.
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.