### IBitwiseCollation

  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.

### IBitwiseCollation - Member Functions and Data by Group

### Constructors & Destructor

Construct and destruct IBitwiseCollation objects.

~IBitwiseCollation

      public:
      virtual ~IBitwiseCollation()

  Destructor for deleting an IBitwiseCollation object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IBitwiseCollation

  Overload 1

      public:
      IBitwiseCollation()

  The default constructor for creating a bitwise comparison object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

  Overload 2

      protected:
      IBitwiseCollation(const IBitwiseCollation& copy)

  Initializes an IBitwiseCollation object from another IBitwiseCollation object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Assignment Operator

Assign one IBitwiseCollation object to another.

operator =

      protected:
      IBitwiseCollation&
        operator =( const IBitwiseCollation& that )

  Replaces the entire contents with the IBitwiseCollation object being copied in.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Displayable names

Access the displayable name.

displayName

      public:
      virtual IText
        displayName( const ILocaleKey& desiredLanguage = ILocaleKey::defaultLocale ( ),
                     ILocaleKey::ELookupStrategy strategy = ILocaleKey::kAnyLanguage ) const

  Returns the displayable name of a collation object in the specified language, using the given lookup strategy.
  desiredLanguage
    The locale which the current locale name of this collation object will be displayed in.
  strategy
    The look-up strategy for the display name of the current collation object. The default value is kAnyLanguage.

Exception

  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.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Implementation

Overrides of implementation methods of the parent.

do_compare
  The actual comparison algorithm.

      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.

  sourceLow
    Source string beginning offset.
  sourceHigh
    Source string ending offset.
  targetLow
    Target string beginning offset.
  targetHigh
    Target string ending offset.

Exception

  IInvalidParameter | If sourceHigh is less than sourceLow, or targetHigh is less than targetLow.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

do_transform

      protected:
      virtual IText do_transform(const IText& source) const

  The actual text transforming algorithm Use IText::operator== for the equality test of two transformed strings. Use transform when dealing with index building on large amount of data as one example. Returns the transformed text by value.
  source
    The source text to be transformed with.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IBitwiseCollation - Inherited Member Functions and Data

#### Inherited Public Functions

  ICollation

  -     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

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  ICollation

  -     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)

#### Inherited Protected Data

  - None