Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TScanResult
Inherited By:
None.
Purpose:
This class, derived from TScanResult, contains information about the result of scanning a text string and converting it to a number.
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.
- TNumberScanResult ()
- TNumberScanResult (const TNumberScanResult & copy)
Interface Category:
API.
Purpose:
- Default constructor. Resets the error fields and sets the length scanned 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 ~ TNumberScanResult ()
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. Not multithread safe.
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 ParseDone (const TTextRange &, unsigned long lastIndex)
Interface Category:
API.
Purpose:
Sets the confidence of a parsing operation when the operation is finished.
Calling Context:
Called during the scanning operation.
Parameters:
- const TTextRange & -The text range specified for the scanning operation.
- unsigned long lastIndex -The last text index in the scanned range.
Return Value:
None.
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.
Member Function: TNumberScanResult::GetSeparatorError
virtual bool GetSeparatorError () const
Interface Category:
API.
Purpose:
Queries whether there was a separator error in the scanned text; that is, whether a digit group separator was incorrectly placed.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if there was a separator error in the scanned text.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TNumberScanResult::GetIncompleteSign
virtual bool GetIncompleteSign () const
Interface Category:
API.
Purpose:
Queries whether there was an incomplete sign error in the scanned text; for example, if the negative prefix was attached to the text but the negative suffix was not attached.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if there was an incomplete sign error in the scanned text.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TNumberScanResult::GetValueOrderError
virtual bool GetValueOrderError () const
Interface Category:
API.
Purpose:
Queries whether there was a value order error in the scanned text, for scanning using a numbering system sensitive to order, such as the Roman numbering system.
Calling Context:
Call this function directly.
Parameters:
Return Value:
Returns true if there was a value order error in the scanned text.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TNumberScanResult::GetOutOfBoundsError
virtual bool GetOutOfBoundsError () const
Interface Category:
API.
Purpose:
Queries whether the number was out of the range of the number formatter.
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.
Member Function: TNumberScanResult::SetSeparatorError
virtual void SetSeparatorError (bool)
Interface Category:
API.
Purpose:
Sets the separator error flag if a separator error occurred.
Calling Context:
Called during the scanning operation if this type of error occurred.
Parameters:
- bool -Set to true if a separator error occurred.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TNumberScanResult::SetIncompleteSign
virtual void SetIncompleteSign (bool)
Interface Category:
API.
Purpose:
Sets the incomplete sign flag if an incomplete sign error occurred.
Calling Context:
Called during the scanning operation if this type of error occurred.
Parameters:
- bool -Set to true if an incomplete sign error occurred.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TNumberScanResult::SetValueOrderError
virtual void SetValueOrderError (bool)
Interface Category:
API.
Purpose:
Sets the value order error flag if a value order error occurred.
Calling Context:
Called during the scanning operation if this type of error occurred.
Parameters:
- bool -Set to true if a value order error occurred.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TNumberScanResult::SetOutOfBoundsError
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 scanning operation if this type of 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 field if the string can be normalized.
Calling Context:
Called during the scanning 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 TScanResult & operator =(const TScanResult &)
- virtual TNumberScanResult & operator =(const TNumberScanResult &)
Interface Category:
API.
Purpose:
- Inherited assignment operator from class TScanResult.
- Assignment operator.
Calling Context:
- Called when a TScanResult object is polymorphically assigned to a TNumberScanResult object.
- Called when an object is assigned to another compatible object.
Parameters:
- const TScanResult & -The scan result object being assigned to this scan result object.
- const TNumberScanResult & -The number scan result object being assigned to this number scan result object.
Return Value:
- Returns a TScanResult reference to this number scan result object.
- Returns a TNumberScanResult reference to this scan result object.
Exceptions:
Throws the exception TFormatterException::kIncorrectScanOrFormatResultProvided if incorrect scan 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.