#include "unicode/utypes.h"
#include "unicode/bytestrie.h"
#include "unicode/localematcher.h"
#include "unicode/locid.h"
#include "unicode/uobject.h"
#include "unicode/ures.h"
#include "cstring.h"
#include "locdistance.h"
#include "loclikelysubtags.h"
#include "uassert.h"
#include "ucln_cmn.h"
#include "uinvchar.h"
#include "umutex.h"
U_NAMESPACE_BEGIN
namespace {
constexpr int32_t END_OF_SUBTAG = …;
constexpr int32_t DISTANCE_SKIP_SCRIPT = …;
constexpr int32_t DISTANCE_IS_FINAL = …;
constexpr int32_t DISTANCE_IS_FINAL_OR_SKIP_SCRIPT = …;
constexpr int32_t ABOVE_THRESHOLD = …;
enum { … };
LocaleDistance *gLocaleDistance = …;
UInitOnce gInitOnce { … };
UBool U_CALLCONV cleanup() { … }
}
void U_CALLCONV LocaleDistance::initLocaleDistance(UErrorCode &errorCode) { … }
const LocaleDistance *LocaleDistance::getSingleton(UErrorCode &errorCode) { … }
LocaleDistance::LocaleDistance(const LocaleDistanceData &data, const XLikelySubtags &likely) : … { … }
int32_t LocaleDistance::getBestIndexAndDistance(
const LSR &desired,
const LSR **supportedLSRs, int32_t supportedLSRsLength,
int32_t shiftedThreshold,
ULocMatchFavorSubtag favorSubtag, ULocMatchDirection direction) const { … }
int32_t LocaleDistance::getDesSuppScriptDistance(
BytesTrie &iter, uint64_t startState, const char *desired, const char *supported) { … }
int32_t LocaleDistance::getRegionPartitionsDistance(
BytesTrie &iter, uint64_t startState,
const char *desiredPartitions, const char *supportedPartitions, int32_t threshold) { … }
int32_t LocaleDistance::getFallbackRegionDistance(BytesTrie &iter, uint64_t startState) { … }
int32_t LocaleDistance::trieNext(BytesTrie &iter, const char *s, bool wantValue) { … }
UBool LocaleDistance::isParadigmLSR(const LSR &lsr) const { … }
U_NAMESPACE_END