godot/thirdparty/icu4c/common/normalizer2.cpp

// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
*   Copyright (C) 2009-2016, International Business Machines
*   Corporation and others.  All Rights Reserved.
*
*******************************************************************************
*   file name:  normalizer2.cpp
*   encoding:   UTF-8
*   tab size:   8 (not used)
*   indentation:4
*
*   created on: 2009nov22
*   created by: Markus W. Scherer
*/

#include "unicode/utypes.h"

#if !UCONFIG_NO_NORMALIZATION

#include "unicode/edits.h"
#include "unicode/normalizer2.h"
#include "unicode/stringoptions.h"
#include "unicode/unistr.h"
#include "unicode/unorm.h"
#include "cstring.h"
#include "mutex.h"
#include "norm2allmodes.h"
#include "normalizer2impl.h"
#include "uassert.h"
#include "ucln_cmn.h"

Normalizer2Impl;

#if NORM2_HARDCODE_NFC_DATA
// NFC/NFD data machine-generated by gennorm2 --csource
#define INCLUDED_FROM_NORMALIZER2_CPP
#include "norm2_nfc_data.h"
#endif

U_NAMESPACE_BEGIN

// Public API dispatch via Normalizer2 subclasses -------------------------- ***

Normalizer2::~Normalizer2() {}

void
Normalizer2::normalizeUTF8(uint32_t /*options*/, StringPiece src, ByteSink &sink,
                           Edits *edits, UErrorCode &errorCode) const {}

UBool
Normalizer2::getRawDecomposition(UChar32, UnicodeString &) const {}

UChar32
Normalizer2::composePair(UChar32, UChar32) const {}

uint8_t
Normalizer2::getCombiningClass(UChar32 /*c*/) const {}

UBool
Normalizer2::isNormalizedUTF8(StringPiece s, UErrorCode &errorCode) const {}

// Normalizer2 implementation for the old UNORM_NONE.
class NoopNormalizer2 : public Normalizer2 {};

NoopNormalizer2::~NoopNormalizer2() {}

Normalizer2WithImpl::~Normalizer2WithImpl() {}

DecomposeNormalizer2::~DecomposeNormalizer2() {}

ComposeNormalizer2::~ComposeNormalizer2() {}

FCDNormalizer2::~FCDNormalizer2() {}

// instance cache ---------------------------------------------------------- ***

U_CDECL_BEGIN
static UBool U_CALLCONV uprv_normalizer2_cleanup();
U_CDECL_END

static Normalizer2   *noopSingleton;
static icu::UInitOnce noopInitOnce {};

static void U_CALLCONV initNoopSingleton(UErrorCode &errorCode) {}

const Normalizer2 *Normalizer2Factory::getNoopInstance(UErrorCode &errorCode) {}

const Normalizer2Impl *
Normalizer2Factory::getImpl(const Normalizer2 *norm2) {}

Norm2AllModes::~Norm2AllModes() {}

Norm2AllModes *
Norm2AllModes::createInstance(Normalizer2Impl *impl, UErrorCode &errorCode) {}

#if NORM2_HARDCODE_NFC_DATA
Norm2AllModes *
Norm2AllModes::createNFCInstance(UErrorCode &errorCode) {}

static Norm2AllModes *nfcSingleton;

static icu::UInitOnce nfcInitOnce {};

static void U_CALLCONV initNFCSingleton(UErrorCode &errorCode) {}

const Norm2AllModes *
Norm2AllModes::getNFCInstance(UErrorCode &errorCode) {}

const Normalizer2 *
Normalizer2::getNFCInstance(UErrorCode &errorCode) {}

const Normalizer2 *
Normalizer2::getNFDInstance(UErrorCode &errorCode) {}

const Normalizer2 *Normalizer2Factory::getFCDInstance(UErrorCode &errorCode) {}

const Normalizer2 *Normalizer2Factory::getFCCInstance(UErrorCode &errorCode) {}

const Normalizer2Impl *
Normalizer2Factory::getNFCImpl(UErrorCode &errorCode) {}
#endif  // NORM2_HARDCODE_NFC_DATA

U_CDECL_BEGIN

static UBool U_CALLCONV uprv_normalizer2_cleanup() {}

U_CDECL_END

U_NAMESPACE_END

// C API ------------------------------------------------------------------- ***

U_NAMESPACE_USE

U_CAPI const UNormalizer2 * U_EXPORT2
unorm2_getNFCInstance(UErrorCode *pErrorCode) {}

U_CAPI const UNormalizer2 * U_EXPORT2
unorm2_getNFDInstance(UErrorCode *pErrorCode) {}

U_CAPI void U_EXPORT2
unorm2_close(UNormalizer2 *norm2) {}

U_CAPI int32_t U_EXPORT2
unorm2_normalize(const UNormalizer2 *norm2,
                 const char16_t *src, int32_t length,
                 char16_t *dest, int32_t capacity,
                 UErrorCode *pErrorCode) {}

static int32_t
normalizeSecondAndAppend(const UNormalizer2 *norm2,
                         char16_t *first, int32_t firstLength, int32_t firstCapacity,
                         const char16_t *second, int32_t secondLength,
                         UBool doNormalize,
                         UErrorCode *pErrorCode) {}

U_CAPI int32_t U_EXPORT2
unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2,
                                char16_t *first, int32_t firstLength, int32_t firstCapacity,
                                const char16_t *second, int32_t secondLength,
                                UErrorCode *pErrorCode) {}

U_CAPI int32_t U_EXPORT2
unorm2_append(const UNormalizer2 *norm2,
              char16_t *first, int32_t firstLength, int32_t firstCapacity,
              const char16_t *second, int32_t secondLength,
              UErrorCode *pErrorCode) {}

U_CAPI int32_t U_EXPORT2
unorm2_getDecomposition(const UNormalizer2 *norm2,
                        UChar32 c, char16_t *decomposition, int32_t capacity,
                        UErrorCode *pErrorCode) {}

U_CAPI int32_t U_EXPORT2
unorm2_getRawDecomposition(const UNormalizer2 *norm2,
                           UChar32 c, char16_t *decomposition, int32_t capacity,
                           UErrorCode *pErrorCode) {}

U_CAPI UChar32 U_EXPORT2
unorm2_composePair(const UNormalizer2 *norm2, UChar32 a, UChar32 b) {}

U_CAPI uint8_t U_EXPORT2
unorm2_getCombiningClass(const UNormalizer2 *norm2, UChar32 c) {}

U_CAPI UBool U_EXPORT2
unorm2_isNormalized(const UNormalizer2 *norm2,
                    const char16_t *s, int32_t length,
                    UErrorCode *pErrorCode) {}

U_CAPI UNormalizationCheckResult U_EXPORT2
unorm2_quickCheck(const UNormalizer2 *norm2,
                  const char16_t *s, int32_t length,
                  UErrorCode *pErrorCode) {}

U_CAPI int32_t U_EXPORT2
unorm2_spanQuickCheckYes(const UNormalizer2 *norm2,
                         const char16_t *s, int32_t length,
                         UErrorCode *pErrorCode) {}

U_CAPI UBool U_EXPORT2
unorm2_hasBoundaryBefore(const UNormalizer2 *norm2, UChar32 c) {}

U_CAPI UBool U_EXPORT2
unorm2_hasBoundaryAfter(const UNormalizer2 *norm2, UChar32 c) {}

U_CAPI UBool U_EXPORT2
unorm2_isInert(const UNormalizer2 *norm2, UChar32 c) {}

// Some properties APIs ---------------------------------------------------- ***

U_CAPI uint8_t U_EXPORT2
u_getCombiningClass(UChar32 c) {}

U_CFUNC uint16_t
unorm_getFCD16(UChar32 c) {}

#endif  // !UCONFIG_NO_NORMALIZATION