chromium/third_party/icu/source/common/loclikelysubtags.cpp

// © 2019 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html

// loclikelysubtags.cpp
// created: 2019may08 Markus W. Scherer

#include <utility>
#include "unicode/utypes.h"
#include "unicode/bytestrie.h"
#include "unicode/localpointer.h"
#include "unicode/locid.h"
#include "unicode/uobject.h"
#include "unicode/ures.h"
#include "unicode/uscript.h"
#include "charstr.h"
#include "cstring.h"
#include "loclikelysubtags.h"
#include "lsr.h"
#include "uassert.h"
#include "ucln_cmn.h"
#include "uhash.h"
#include "uinvchar.h"
#include "umutex.h"
#include "uniquecharstr.h"
#include "uresdata.h"
#include "uresimp.h"
#include "uvector.h"

U_NAMESPACE_BEGIN

namespace {

constexpr char PSEUDO_ACCENTS_PREFIX =;  // -XA, -PSACCENT
constexpr char PSEUDO_BIDI_PREFIX =;  // -XB, -PSBIDI
constexpr char PSEUDO_CRACKED_PREFIX =;  // -XC, -PSCRACK

}  // namespace

LocaleDistanceData::LocaleDistanceData(LocaleDistanceData &&data) :{}

LocaleDistanceData::~LocaleDistanceData() {}

// TODO(ICU-20777): Rename to just LikelySubtagsData.
struct XLikelySubtagsData {};

namespace {

XLikelySubtags *gLikelySubtags =;
UVector *gMacroregions =;
UInitOnce gInitOnce {};

UBool U_CALLCONV cleanup() {}

static const char16_t RANGE_MARKER =; /* '~' */
UVector* loadMacroregions(UErrorCode &status) {}

}  // namespace

void U_CALLCONV XLikelySubtags::initLikelySubtags(UErrorCode &errorCode) {}

const XLikelySubtags *XLikelySubtags::getSingleton(UErrorCode &errorCode) {}

XLikelySubtags::XLikelySubtags(XLikelySubtagsData &data) :{}

XLikelySubtags::~XLikelySubtags() {}

LSR XLikelySubtags::makeMaximizedLsrFrom(const Locale &locale,
                                         bool returnInputIfUnmatch,
                                         UErrorCode &errorCode) const {}

namespace {

const char *getCanonical(const CharStringMap &aliases, const char *alias) {}

}  // namespace

LSR XLikelySubtags::makeMaximizedLsr(const char *language, const char *script, const char *region,
                                     const char *variant,
                                     bool returnInputIfUnmatch,
                                     UErrorCode &errorCode) const {}

LSR XLikelySubtags::maximize(const char *language, const char *script, const char *region,
                             bool returnInputIfUnmatch,
                             UErrorCode &errorCode) const {}

bool XLikelySubtags::isMacroregion(StringPiece& region, UErrorCode& errorCode) const {}

LSR XLikelySubtags::maximize(StringPiece language, StringPiece script, StringPiece region,
                             bool returnInputIfUnmatch,
                             UErrorCode &errorCode) const {}

int32_t XLikelySubtags::compareLikely(const LSR &lsr, const LSR &other, int32_t likelyInfo) const {}

// Subset of maximize().
int32_t XLikelySubtags::getLikelyIndex(const char *language, const char *script) const {}

int32_t XLikelySubtags::trieNext(BytesTrie &iter, const char *s, int32_t i) {}
int32_t XLikelySubtags::trieNext(BytesTrie &iter, StringPiece s, int32_t i) {}

LSR XLikelySubtags::minimizeSubtags(StringPiece language, StringPiece script,
                                    StringPiece region,
                                    bool favorScript,
                                    UErrorCode &errorCode) const {}

U_NAMESPACE_END