![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TLanguageTextOrder
Inherited By:
None.
Purpose:
TTableBasedTextOrder is a concrete class derived from TLanguageTextOrder. It provides the protocol for language-sensitive comparison of text strings based on a collation table that provides the ordering rules for a particular language.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
This class is designed to be used directly.
Concurrency:
Not multithread safe.
Resource Use:
The tables used by a TTableBasedTextOrder object live in shared memory and can be shared system wide. The actual TTableBasedTextOrder object is therefore not particularly large. Because of the data encapsulated by an instance of this class, it can be very large. Only instantiate it when necessary.
virtual ~ TTableBasedTextOrder ()
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.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TLanguageTextOrder function.
Member Function: TTableBasedTextOrder::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, TStandardTextPatternIterator, 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 TStandardTextPatternIterator object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
Overrides inherited TLanguageTextOrder 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.
TTableBasedTextOrder & operator =(const TTableBasedTextOrder & 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.
- TTableBasedTextOrder (const TTableBasedTextOrder & order)
- TTableBasedTextOrder (const TToken & name)
Interface Category:
API.
Purpose:
- Copy constructor.
- Constructs a text ordering object using the collation table identified by the argument.
Calling Context:
- Called to copy an object.
- Called to construct a text ordering object with a particular collation table.
Parameters:
- const TTableBasedTextOrder & order -The object to copy.
- const TToken & name -The name identifying the collation table for this object.
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.