Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

UnicodeRange Class Reference

%%% INTERNAL CLASS USED BY RuleBasedTransliterator %%%. More...

#include <unirange.h>

List of all members.

Public Methods

 UnicodeRange (UChar start, int32_t length)
UnicodeRange* clone () const
 CALLER OWNS RESULT.

UBool contains (UChar c) const
UnicodeRange* split (UChar c)
 Assume that contains(c) is true. More...

UnicodeRange* largestUnusedSubrange (const UnicodeString& str) const
 Finds the largest subrange of this range that is unused by the given string. More...


Public Attributes

UChar start
int32_t length


Detailed Description

%%% INTERNAL CLASS USED BY RuleBasedTransliterator %%%.

A range of Unicode characters. Support the operations of testing for inclusion (does this range contain this character?) and splitting. Splitting involves breaking a range into two smaller ranges around a character inside the original range. The split character is not included in either range. If the split character is at either extreme end of the range, one of the split products is an empty range.

This class is used internally to determine the largest available private use character range for variable stand-ins.

Definition at line 29 of file unirange.h.


Constructor & Destructor Documentation

UnicodeRange::UnicodeRange ( UChar start,
int32_t length )
 


Member Function Documentation

UnicodeRange * UnicodeRange::clone ( void ) const
 

CALLER OWNS RESULT.

UBool UnicodeRange::contains ( UChar c ) const
 

UnicodeRange * UnicodeRange::largestUnusedSubrange ( const UnicodeString & str ) const
 

Finds the largest subrange of this range that is unused by the given string.

A subrange is unused by a string if the string contains no characters in that range. If the given string contains no characters in this range, then this range itself is returned.

CALLER OWNS RESULT.

UnicodeRange * UnicodeRange::split ( UChar c )
 

Assume that contains(c) is true.

Split this range into two new ranges around the character c. Make this range one of the new ranges (modify it in place) and return the other new range. The character itself is not included in either range. If the split results in an empty range (that is, if c == start or c == start + length - 1) then return null.

MODIFIES THIS RANGE IN PLACE.

CALLER OWNS RESULT.


Member Data Documentation

int32_t UnicodeRange::length
 

Definition at line 35 of file unirange.h.

UChar UnicodeRange::start
 

Definition at line 33 of file unirange.h.


The documentation for this class was generated from the following file:
Generated at Tue Dec 5 17:56:31 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000