#include "unicode/utypes.h"
#if !UCONFIG_NO_COLLATION
#include "unicode/alphaindex.h"
#include "unicode/coll.h"
#include "unicode/localpointer.h"
#include "unicode/normalizer2.h"
#include "unicode/tblcoll.h"
#include "unicode/uchar.h"
#include "unicode/ulocdata.h"
#include "unicode/uniset.h"
#include "unicode/uobject.h"
#include "unicode/usetiter.h"
#include "unicode/utf16.h"
#include "cmemory.h"
#include "cstring.h"
#include "uassert.h"
#include "uvector.h"
#include "uvectr64.h"
U_NAMESPACE_BEGIN
namespace {
const char16_t BASE[1] = …;
const int32_t BASE_LENGTH = …;
UBool isOneLabelBetterThanOther(const Normalizer2 &nfkdNormalizer,
const UnicodeString &one, const UnicodeString &other);
}
static int32_t U_CALLCONV
collatorComparator(const void *context, const void *left, const void *right);
static int32_t U_CALLCONV
recordCompareFn(const void *context, const void *left, const void *right);
static void U_CALLCONV
alphaIndex_deleteRecord(void *obj) { … }
namespace {
UnicodeString *ownedString(const UnicodeString &s, LocalPointer<UnicodeString> &owned,
UErrorCode &errorCode) { … }
inline UnicodeString *getString(const UVector &list, int32_t i) { … }
inline AlphabeticIndex::Bucket *getBucket(const UVector &list, int32_t i) { … }
inline AlphabeticIndex::Record *getRecord(const UVector &list, int32_t i) { … }
int32_t binarySearch(const UVector &list, const UnicodeString &s, const Collator &coll) { … }
}
class BucketList : public UObject { … };
BucketList::~BucketList() { … }
AlphabeticIndex::ImmutableIndex::~ImmutableIndex() { … }
int32_t
AlphabeticIndex::ImmutableIndex::getBucketCount() const { … }
int32_t
AlphabeticIndex::ImmutableIndex::getBucketIndex(
const UnicodeString &name, UErrorCode &errorCode) const { … }
const AlphabeticIndex::Bucket *
AlphabeticIndex::ImmutableIndex::getBucket(int32_t index) const { … }
AlphabeticIndex::AlphabeticIndex(const Locale &locale, UErrorCode &status)
: … { … }
AlphabeticIndex::AlphabeticIndex(RuleBasedCollator *collator, UErrorCode &status)
: … { … }
AlphabeticIndex::~AlphabeticIndex() { … }
AlphabeticIndex &AlphabeticIndex::addLabels(const UnicodeSet &additions, UErrorCode &status) { … }
AlphabeticIndex &AlphabeticIndex::addLabels(const Locale &locale, UErrorCode &status) { … }
AlphabeticIndex::ImmutableIndex *AlphabeticIndex::buildImmutableIndex(UErrorCode &errorCode) { … }
int32_t AlphabeticIndex::getBucketCount(UErrorCode &status) { … }
int32_t AlphabeticIndex::getRecordCount(UErrorCode &status) { … }
void AlphabeticIndex::initLabels(UVector &indexCharacters, UErrorCode &errorCode) const { … }
namespace {
const UnicodeString &fixLabel(const UnicodeString ¤t, UnicodeString &temp) { … }
UBool hasMultiplePrimaryWeights(
const RuleBasedCollator &coll, uint32_t variableTop,
const UnicodeString &s, UVector64 &ces, UErrorCode &errorCode) { … }
}
BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { … }
void AlphabeticIndex::initBuckets(UErrorCode &errorCode) { … }
void AlphabeticIndex::clearBuckets() { … }
void AlphabeticIndex::internalResetBucketIterator() { … }
void AlphabeticIndex::addIndexExemplars(const Locale &locale, UErrorCode &status) { … }
UBool AlphabeticIndex::addChineseIndexCharacters(UErrorCode &errorCode) { … }
static const char16_t CGJ = …;
UnicodeString AlphabeticIndex::separated(const UnicodeString &item) { … }
bool AlphabeticIndex::operator==(const AlphabeticIndex& ) const { … }
bool AlphabeticIndex::operator!=(const AlphabeticIndex& ) const { … }
const RuleBasedCollator &AlphabeticIndex::getCollator() const { … }
const UnicodeString &AlphabeticIndex::getInflowLabel() const { … }
const UnicodeString &AlphabeticIndex::getOverflowLabel() const { … }
const UnicodeString &AlphabeticIndex::getUnderflowLabel() const { … }
AlphabeticIndex &AlphabeticIndex::setInflowLabel(const UnicodeString &label, UErrorCode &) { … }
AlphabeticIndex &AlphabeticIndex::setOverflowLabel(const UnicodeString &label, UErrorCode &) { … }
AlphabeticIndex &AlphabeticIndex::setUnderflowLabel(const UnicodeString &label, UErrorCode &) { … }
int32_t AlphabeticIndex::getMaxLabelCount() const { … }
AlphabeticIndex &AlphabeticIndex::setMaxLabelCount(int32_t maxLabelCount, UErrorCode &status) { … }
void AlphabeticIndex::init(const Locale *locale, UErrorCode &status) { … }
static int32_t U_CALLCONV
collatorComparator(const void *context, const void *left, const void *right) { … }
static int32_t U_CALLCONV
recordCompareFn(const void *context, const void *left, const void *right) { … }
UVector *AlphabeticIndex::firstStringsInScript(UErrorCode &status) { … }
namespace {
UBool isOneLabelBetterThanOther(const Normalizer2 &nfkdNormalizer,
const UnicodeString &one, const UnicodeString &other) { … }
}
AlphabeticIndex::Record::Record(const UnicodeString &name, const void *data)
: … { … }
AlphabeticIndex::Record::~Record() { … }
AlphabeticIndex & AlphabeticIndex::addRecord(const UnicodeString &name, const void *data, UErrorCode &status) { … }
AlphabeticIndex &AlphabeticIndex::clearRecords(UErrorCode &status) { … }
int32_t AlphabeticIndex::getBucketIndex(const UnicodeString &name, UErrorCode &status) { … }
int32_t AlphabeticIndex::getBucketIndex() const { … }
UBool AlphabeticIndex::nextBucket(UErrorCode &status) { … }
const UnicodeString &AlphabeticIndex::getBucketLabel() const { … }
UAlphabeticIndexLabelType AlphabeticIndex::getBucketLabelType() const { … }
int32_t AlphabeticIndex::getBucketRecordCount() const { … }
AlphabeticIndex &AlphabeticIndex::resetBucketIterator(UErrorCode &status) { … }
UBool AlphabeticIndex::nextRecord(UErrorCode &status) { … }
const UnicodeString &AlphabeticIndex::getRecordName() const { … }
const void *AlphabeticIndex::getRecordData() const { … }
AlphabeticIndex & AlphabeticIndex::resetRecordIterator() { … }
AlphabeticIndex::Bucket::Bucket(const UnicodeString &label,
const UnicodeString &lowerBoundary,
UAlphabeticIndexLabelType type)
: … { … }
AlphabeticIndex::Bucket::~Bucket() { … }
U_NAMESPACE_END
#endif