godot/thirdparty/icu4c/common/locid.cpp

// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
 **********************************************************************
 *   Copyright (C) 1997-2016, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
*
* File locid.cpp
*
* Created by: Richard Gillam
*
* Modification History:
*
*   Date        Name        Description
*   02/11/97    aliu        Changed gLocPath to fgDataDirectory and added
*                           methods to get and set it.
*   04/02/97    aliu        Made operator!= inline; fixed return value
*                           of getName().
*   04/15/97    aliu        Cleanup for AIX/Win32.
*   04/24/97    aliu        Numerous changes per code review.
*   08/18/98    stephen     Changed getDisplayName()
*                           Added SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE
*                           Added getISOCountries(), getISOLanguages(),
*                           getLanguagesForCountry()
*   03/16/99    bertrand    rehaul.
*   07/21/99    stephen     Added U_CFUNC setDefault
*   11/09/99    weiv        Added const char * getName() const;
*   04/12/00    srl         removing unicodestring api's and cached hash code
*   08/10/01    grhoten     Change the static Locales to accessor functions
******************************************************************************
*/

#include <utility>

#include "unicode/bytestream.h"
#include "unicode/locid.h"
#include "unicode/localebuilder.h"
#include "unicode/strenum.h"
#include "unicode/stringpiece.h"
#include "unicode/uloc.h"
#include "unicode/ures.h"

#include "bytesinkutil.h"
#include "charstr.h"
#include "charstrmap.h"
#include "cmemory.h"
#include "cstring.h"
#include "mutex.h"
#include "putilimp.h"
#include "uassert.h"
#include "ucln_cmn.h"
#include "uhash.h"
#include "ulocimp.h"
#include "umutex.h"
#include "uniquecharstr.h"
#include "ustr_imp.h"
#include "uvector.h"

U_NAMESPACE_BEGIN

static Locale   *gLocaleCache =;
static UInitOnce gLocaleCacheInitOnce {};

// gDefaultLocaleMutex protects all access to gDefaultLocalesHashT and gDefaultLocale.
static UMutex gDefaultLocaleMutex;
static UHashtable *gDefaultLocalesHashT =;
static Locale *gDefaultLocale =;

/**
 * \def ULOC_STRING_LIMIT
 * strings beyond this value crash in CharString
 */
#define ULOC_STRING_LIMIT

U_NAMESPACE_END

ELocalePos;

namespace {

//
// Deleter function for Locales owned by the default Locale hash table/
//
void U_CALLCONV
deleteLocale(void *obj) {}

UBool U_CALLCONV locale_cleanup()
{}

void U_CALLCONV locale_init(UErrorCode &status) {}

}  // namespace

U_NAMESPACE_BEGIN

Locale *locale_set_default_internal(const char *id, UErrorCode& status) {}

U_NAMESPACE_END

/* sfb 07/21/99 */
U_CFUNC void
locale_set_default(const char *id)
{}
/* end */

U_CFUNC const char *
locale_get_default()
{}


U_NAMESPACE_BEGIN

// Function for testing.
U_EXPORT const char* const*
ulocimp_getKnownCanonicalizedLocaleForTest(int32_t& length)
{}

// Function for testing.
U_EXPORT bool
ulocimp_isCanonicalizedLocaleForTest(const char* localeName)
{}

U_NAMESPACE_BEGIN

/*This function initializes a Locale from a C locale ID*/
Locale& Locale::init(const char* localeID, UBool canonicalize)
{}

/*
 * Set up the base name.
 * If there are no key words, it's exactly the full name.
 * If key words exist, it's the full name truncated at the '@' character.
 * Need to set up both at init() and after setting a keyword.
 */
void
Locale::initBaseName(UErrorCode &status) {}


int32_t
Locale::hashCode() const
{}

void
Locale::setToBogus() {}

const Locale& U_EXPORT2
Locale::getDefault()
{}



void U_EXPORT2
Locale::setDefault( const   Locale&     newLocale,
                            UErrorCode&  status)
{}

void
Locale::addLikelySubtags(UErrorCode& status) {}

void
Locale::minimizeSubtags(UErrorCode& status) {}
void
Locale::minimizeSubtags(bool favorScript, UErrorCode& status) {}

void
Locale::canonicalize(UErrorCode& status) {}

Locale U_EXPORT2
Locale::forLanguageTag(StringPiece tag, UErrorCode& status)
{}

void
Locale::toLanguageTag(ByteSink& sink, UErrorCode& status) const
{}

Locale U_EXPORT2
Locale::createFromName (const char *name)
{}

Locale U_EXPORT2
Locale::createCanonical(const char* name) {}

const char *
Locale::getISO3Language() const
{}


const char *
Locale::getISO3Country() const
{}

/**
 * Return the LCID value as specified in the "LocaleID" resource for this
 * locale.  The LocaleID must be expressed as a hexadecimal number, from
 * one to four digits.  If the LocaleID resource is not present, or is
 * in an incorrect format, 0 is returned.  The LocaleID is for use in
 * Windows (it is an LCID), but is available on all platforms.
 */
uint32_t
Locale::getLCID() const
{}

const char* const* U_EXPORT2 Locale::getISOCountries()
{}

const char* const* U_EXPORT2 Locale::getISOLanguages()
{}

// Set the locale's data based on a posix id.
void Locale::setFromPOSIXID(const char *posixID)
{}

const Locale & U_EXPORT2
Locale::getRoot()
{}

const Locale & U_EXPORT2
Locale::getEnglish()
{}

const Locale & U_EXPORT2
Locale::getFrench()
{}

const Locale & U_EXPORT2
Locale::getGerman()
{}

const Locale & U_EXPORT2
Locale::getItalian()
{}

const Locale & U_EXPORT2
Locale::getJapanese()
{}

const Locale & U_EXPORT2
Locale::getKorean()
{}

const Locale & U_EXPORT2
Locale::getChinese()
{}

const Locale & U_EXPORT2
Locale::getSimplifiedChinese()
{}

const Locale & U_EXPORT2
Locale::getTraditionalChinese()
{}


const Locale & U_EXPORT2
Locale::getFrance()
{}

const Locale & U_EXPORT2
Locale::getGermany()
{}

const Locale & U_EXPORT2
Locale::getItaly()
{}

const Locale & U_EXPORT2
Locale::getJapan()
{}

const Locale & U_EXPORT2
Locale::getKorea()
{}

const Locale & U_EXPORT2
Locale::getChina()
{}

const Locale & U_EXPORT2
Locale::getPRC()
{}

const Locale & U_EXPORT2
Locale::getTaiwan()
{}

const Locale & U_EXPORT2
Locale::getUK()
{}

const Locale & U_EXPORT2
Locale::getUS()
{}

const Locale & U_EXPORT2
Locale::getCanada()
{}

const Locale & U_EXPORT2
Locale::getCanadaFrench()
{}

const Locale &
Locale::getLocale(int locid)
{}

/*
This function is defined this way in order to get around static
initialization and static destruction.
 */
Locale *
Locale::getLocaleCache()
{}

class KeywordEnumeration : public StringEnumeration {};

const char KeywordEnumeration::fgClassID =;

// Out-of-line virtual destructor to serve as the "key function".
KeywordEnumeration::~KeywordEnumeration() = default;

// A wrapper around KeywordEnumeration that calls uloc_toUnicodeLocaleKey() in
// the next() method for each keyword before returning it.
class UnicodeKeywordEnumeration : public KeywordEnumeration {};

// Out-of-line virtual destructor to serve as the "key function".
UnicodeKeywordEnumeration::~UnicodeKeywordEnumeration() = default;

StringEnumeration *
Locale::createKeywords(UErrorCode &status) const
{}

StringEnumeration *
Locale::createUnicodeKeywords(UErrorCode &status) const
{}

int32_t
Locale::getKeywordValue(const char* keywordName, char *buffer, int32_t bufLen, UErrorCode &status) const
{}

void
Locale::getKeywordValue(StringPiece keywordName, ByteSink& sink, UErrorCode& status) const {}

void
Locale::getUnicodeKeywordValue(StringPiece keywordName,
                               ByteSink& sink,
                               UErrorCode& status) const {}

void
Locale::setKeywordValue(const char* keywordName, const char* keywordValue, UErrorCode &status)
{}

void
Locale::setKeywordValue(StringPiece keywordName,
                        StringPiece keywordValue,
                        UErrorCode& status) {}

void
Locale::setUnicodeKeywordValue(StringPiece keywordName,
                               StringPiece keywordValue,
                               UErrorCode& status) {}

const char *
Locale::getBaseName() const {}

Locale::Iterator::~Iterator() = default;

//eof
U_NAMESPACE_END