Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TTextOrder
Inherited By:
None.
Purpose:
TBitwiseTextOrder is a concrete class derived from TTextOrder. It provides the protocol for language-insensitive comparison of text strings. The comparison functions in this class perform a bitwise comparison of the Unicode values in the text strings.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
This class is designed to be used directly.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
- TBitwiseTextOrder ()
- TBitwiseTextOrder (const TBitwiseTextOrder & order)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and by clients.
- 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 ~ TBitwiseTextOrder ()
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 ETextComparisonResult Compare (const TText & sourceText, const TText & targetText) const
- virtual ETextComparisonResult Compare (const TText & sourceText, const TText & targetText, TTextCount & sourceCharactersMatched, TTextCount & targetCharactersMatched) const
Interface Category:
API.
Purpose:
- Compares two text objects and returns the result as an ETextComparisonResult value.
- Compares two text objects and returns the result as an ETextComparisonResult value. Also fills in the given TTextCounts with the number of characters matched in both the source and the target strings.
Calling Context:
- Called by clients.
- Called by clients.
Parameters:
- const TText & sourceText -The source string for the comparison.
- const TText & targetText -The target string for the comparison.
- const TText & sourceText -The source string for the comparison.
- const TText & targetText -The target string for the comparison.
- TTextCount & sourceCharactersMatched -Variable to be filled in with the number of characters matched in the source string.
- TTextCount & targetCharactersMatched -Variable to be filled in with the number of characters matched in the target string.
Return Value:
The ETextComparisonResult value containing the results of the comparison.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TTextOrder function. This function does not distinguish between different ordering strengths. It returns only the values kSourceEqual, kSourcePrimaryGreater, and kSourcePrimaryLess.
Member Function: TBitwiseTextOrder::CreateTextPatternIterator
virtual TTextPatternIterator * CreateTextPatternIterator (const TText * text, const TText & pattern, const TTextRange & searchRange) const
Interface Category:
API.
Purpose:
Creates an object of the text pattern iterator class, TExactTextPatternIterator, that uses this text ordering class for pattern iteration.
Calling Context:
Called by clients.
Parameters:
- const TText * text -The text object to iterate through.
- const TText & pattern -The pattern to search for.
- const TTextRange & searchRange -The range of the text object to iterate through.
Return Value:
A TExactTextPatternIterator object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TTextOrder function.
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:
Overrides inherited MCollectible function.
TBitwiseTextOrder & operator =(const TBitwiseTextOrder & order)
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 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.