18#if !UCONFIG_NO_COLLATION && !UCONFIG_NO_NORMALIZATION
551#ifndef U_HIDE_INTERNAL_API
565 UVector *firstStringsInScript(
UErrorCode &status);
582#ifndef U_HIDE_INTERNAL_API
592 int32_t serialNumber_;
648 UVector *bucketList_;
650 int32_t labelsIterIndex_;
651 int32_t itemsIterIndex_;
656 UBool indexBuildRequired_;
660 int32_t maxLabelCount_;
662 UHashtable *alreadyIn_;
683 UVector *firstScriptCharacters_;
698 typedef const UChar PinyinLookup[24][3];
699 static PinyinLookup HACK_PINYIN_LOOKUP_SHORT;
700 static PinyinLookup HACK_PINYIN_LOOKUP_LONG;
704 static PinyinLookup *HACK_PINYIN_LOOKUP;
705 static const UChar *PINYIN_LOWER_BOUNDS;
709 int32_t recordCounter_;
UAlphabeticIndexLabelType
Constants for Alphabetic Index Label Types.
@ U_ALPHAINDEX_OVERFLOW
Overflow Label.
@ U_ALPHAINDEX_UNDERFLOW
Undeflow Label.
@ U_ALPHAINDEX_NORMAL
Normal Label, typically the starting letter of the names in the bucket with this label.
@ U_ALPHAINDEX_INFLOW
Inflow Label.
class AlphabeticIndex supports the creation of a UI index appropriate for a given language,...
virtual AlphabeticIndex & setMaxLabelCount(int32_t maxLabelCount, UErrorCode &status)
Set a limit on the number of labels permitted in the index.
virtual AlphabeticIndex & setUnderflowLabel(const UnicodeString &underflowLabel, UErrorCode &status)
Set the label used for items that sort before the first normal label, and that would not otherwise ha...
static void staticCleanup()
Delete all shared (static) data associated with an AlphabeticIndex.
virtual int32_t getRecordCount(UErrorCode &status)
Get the total number of Records in this index, that is, the number of <name, data> pairs added.
virtual AlphabeticIndex & addLabels(const Locale &locale, UErrorCode &status)
Add the index characters from a Locale to the index.
virtual AlphabeticIndex & addLabels(const UnicodeSet &additions, UErrorCode &status)
Add Labels to this Index.
virtual UBool nextRecord(UErrorCode &status)
Advance to the next record in the current Bucket.
virtual int32_t getBucketIndex() const
Get the zero based index of the current Bucket from an iteration over the Buckets of this index.
virtual int32_t getBucketIndex(const UnicodeString &itemName, UErrorCode &status)
Given the name of a record, return the zero-based index of the Bucket in which the item should appear...
virtual const RuleBasedCollator & getCollator() const
Get the Collator that establishes the ordering of the items in this index.
UVector * inputRecords_
Holds all user records before they are distributed into buckets.
virtual const UnicodeString & getInflowLabel() const
Get the default label used for abbreviated buckets between other index characters.
virtual int32_t getMaxLabelCount() const
Get the limit on the number of labels permitted in the index.
virtual const UnicodeString & getOverflowLabel() const
Get the special label used for items that sort after the last normal label, and that would not otherw...
virtual int32_t getBucketCount(UErrorCode &status)
Get the number of labels in this index.
virtual ~AlphabeticIndex()
Destructor.
static ELangType langTypeFromLocale(const Locale &loc)
Get the Language Type for this Index.
virtual AlphabeticIndex & resetRecordIterator()
Reset the Record iterator position to before the first Record in the current Bucket.
virtual const UnicodeString & getUnderflowLabel() const
Get the special label used for items that sort before the first normal label, and that would not othe...
virtual const UnicodeString & getBucketLabel() const
Return the name of the Label of the current bucket from an iteration over the buckets.
virtual AlphabeticIndex & setOverflowLabel(const UnicodeString &overflowLabel, UErrorCode &status)
Set the label used for items that sort after the last normal label, and that would not otherwise have...
virtual AlphabeticIndex & clearRecords(UErrorCode &status)
Remove all Records from the Index.
virtual const void * getRecordData() const
Return the data pointer of the Record currently being iterated over.
virtual const UnicodeString & getOverflowComparisonString(const UnicodeString &lowerLimit, UErrorCode &status)
Get the Unicode character (or tailored string) that defines an overflow bucket; that is anything grea...
virtual AlphabeticIndex & setInflowLabel(const UnicodeString &inflowLabel, UErrorCode &status)
Set the default label used for abbreviated buckets between other index characters.
virtual AlphabeticIndex & addRecord(const UnicodeString &name, const void *data, UErrorCode &status)
Add a record to the index.
virtual AlphabeticIndex & resetBucketIterator(UErrorCode &status)
Reset the Bucket iteration for this index.
virtual UAlphabeticIndexLabelType getBucketLabelType() const
Return the type of the label for the current Bucket (selected by the iteration over Buckets....
AlphabeticIndex(const Locale &locale, UErrorCode &status)
Construct an AlphabeticIndex object for the specified locale.
virtual int32_t getBucketRecordCount() const
Get the number of <name, data> Records in the current Bucket.
virtual const UnicodeString & getRecordName() const
Get the name of the current Record.
virtual UBool nextBucket(UErrorCode &status)
Advance the iteration over the Buckets of this index.
The Collator class performs locale-sensitive string comparison.
A Locale object represents a specific geographical, political, or cultural region.
The RuleBasedCollator class provides the simple implementation of Collator, using data-driven tables.
Base class for 'pure' C++ implementations of uenum api.
UMemory is the common ICU base class.
UObject is the common ICU "boilerplate" class.
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
A mutable set of Unicode characters and multicharacter strings.
UnicodeString is a string class that stores Unicode characters directly and provides similar function...
C++ API: Locale ID object.
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
A Bucket holds an index label and references to everything belonging to that label.
#define U_CDECL_END
This is used to end a declaration of a library private ICU C API.
int8_t UBool
The ICU boolean type.
#define U_CDECL_BEGIN
This is used to begin a declaration of a library private ICU C API.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.