IBitwiseCollation provides bitwise comparison services for text strings. IBitwiseCollation is a concrete class derived from ICollation. It provides the protocol for language-insensitive comparison of text strings. The comparison functions in this class perform a bitwise comparison of the numeric Unicode values in the text strings. ICollation::createCollation creates a bitwise comparison object when the POSIX locale "C" is given as the locale key.
Do not derive from this class.
Construct and destruct IBitwiseCollation objects.
![]() |
public:
virtual ~IBitwiseCollation()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IBitwiseCollation()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
protected:
IBitwiseCollation(const IBitwiseCollation& copy)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Assign one IBitwiseCollation object to another.
![]() |
protected:
IBitwiseCollation& operator =( const IBitwiseCollation& that )
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Access the displayable name.
![]() |
public:
virtual IText displayName( const ILocaleKey& desiredLanguage = ILocaleKey::defaultLocale ( ), ILocaleKey::ELookupStrategy strategy = ILocaleKey::kAnyLanguage ) const
IOutofSystemResource | If there is no display name for the given collation object. |
IInvalidRequest | If the desired locale is supported but not installed. |
IInvalidParameter | If the desired locale ID is invalid. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Overrides of implementation methods of the parent.
![]() |
protected:
virtual int do_compare( const UniChar* sourceLow, const UniChar* sourceHigh, const UniChar* targetLow, const UniChar* targetHigh ) const
The actual comparison algorithm. Returns 1 if the source is greater than the target, 0 if both are equal and -1 if the source is less than the target.
IInvalidParameter | If sourceHigh is less than sourceLow, or targetHigh is less than targetLow. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual IText do_transform(const IText& source) const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
virtual ~ICollation()
int compare(const IText& source, const IText& target) const
int compare( const UniChar* sourceLow, const UniChar* sourceHigh, const UniChar* targetLow, const UniChar* targetHigh ) const
int compare( ITextIterator sourceBegin, ITextIterator sourceEnd, ITextIterator targetBegin, ITextIterator targetEnd ) const
static ICollation* createCollation( const ILocaleKey& localeId = ILocaleKey::defaultLocale ( ), ECollationStrength strength = kTertiaryDifference )
virtual IText displayName( const ILocaleKey& desiredLanguage = ILocaleKey::defaultLocale ( ), ILocaleKey::ELookupStrategy strategy = ILocaleKey::kAnyLanguage ) const = 0
long hash( const UniChar* sourceLow, const UniChar* sourceHigh ) const
long hash( ITextIterator sourceBegin, ITextIterator sourceEnd ) const
long hash(const IText& source) const
virtual bool isEqual( const IText& sourceText, const IText& targetText ) const
virtual bool isGreaterThan( const IText& sourceText, const IText& targetText ) const
virtual bool isLessThan( const IText& sourceText, const IText& targetText ) const
ILocaleKey localeKey() const
void setStrength(ECollationStrength newStrength)
ECollationStrength strength() const
IText transform( ITextIterator sourceBegin, ITextIterator sourceEnd ) const
IText transform(const IText& source) const
UniChar* createUniCharChunk( const IText& source, IText::length_type& chunkLength ) const
virtual int do_compare( const UniChar* sourceLow, const UniChar* sourceHigh, const UniChar* targetLow, const UniChar* targetHigh ) const = 0
virtual long do_hash( const UniChar* sourceLow, const UniChar* sourceHigh ) const
virtual IText do_transform(const IText& source) const = 0
ICollation()
ICollation(const ICollation& source)
ICollation& operator =(const ICollation& that)
void setLocaleKey(const ILocaleKey& newLocale)