Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qunicodetables_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: Unicode-3.0
3// Qt-Security score:significant reason:default
4
5/* This file is autogenerated from the Unicode 16.0 database. Do not edit */
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists for the convenience
12// of internal files. This header file may change from version to version
13// without notice, or even be removed.
14//
15// We mean it.
16//
17
18#ifndef QUNICODETABLES_P_H
19#define QUNICODETABLES_P_H
20
21#include <QtCore/private/qglobal_p.h>
22
23#include <QtCore/qchar.h>
24
25#include <QtCore/qspan.h>
26
27#include <array>
28
29QT_BEGIN_NAMESPACE
30
31#define UNICODE_DATA_VERSION QChar::Unicode_16_0
32
33namespace QUnicodeTables {
34
43
46 signed short diff : 15;
47};
48
49struct Properties {
52 ushort emojiFlags : 6; /* 5 used */
55 signed short digitValue : 5;
56 signed short mirrorDiff : 16;
57 ushort unicodeVersion : 5; /* 5 used */
58 ushort eastAsianWidth : 3; /* 3 used */
61 ushort graphemeBreakClass : 5; /* 5 used */
62 ushort wordBreakClass : 5; /* 5 used */
63 ushort lineBreakClass : 6; /* 6 used */
64 ushort sentenceBreakClass : 4; /* 4 used */
65 ushort idnaStatus : 4; /* 3 used */
67};
68
69Q_DECL_CONST_FUNCTION
70Q_CORE_EXPORT const Properties * QT_FASTCALL properties(char32_t ucs4) noexcept;
71
72Q_DECL_CONST_FUNCTION Q_CORE_EXPORT
74
75static_assert(sizeof(Properties) == 20);
76
77enum class EastAsianWidth : unsigned int {
84};
85
105
129
148
149// see http://www.unicode.org/reports/tr14/tr14-30.html
150// we don't use the XX and AI classes but map them to AL instead.
151// VI and VF classes are mapped to CM.
175
183
192
193Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(char32_t ucs4) noexcept;
194inline GraphemeBreakClass graphemeBreakClass(QChar ch) noexcept
195{ return graphemeBreakClass(ch.unicode()); }
196
197Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(char32_t ucs4) noexcept;
198inline WordBreakClass wordBreakClass(QChar ch) noexcept
199{ return wordBreakClass(ch.unicode()); }
200
201Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(char32_t ucs4) noexcept;
202inline SentenceBreakClass sentenceBreakClass(QChar ch) noexcept
203{ return sentenceBreakClass(ch.unicode()); }
204
205Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(char32_t ucs4) noexcept;
206inline LineBreakClass lineBreakClass(QChar ch) noexcept
207{ return lineBreakClass(ch.unicode()); }
208
209Q_CORE_EXPORT IdnaStatus QT_FASTCALL idnaStatus(char32_t ucs4) noexcept;
210inline IdnaStatus idnaStatus(QChar ch) noexcept
211{ return idnaStatus(ch.unicode()); }
212
213Q_CORE_EXPORT QStringView QT_FASTCALL idnaMapping(char32_t usc4) noexcept;
214inline QStringView idnaMapping(QChar ch) noexcept
215{ return idnaMapping(ch.unicode()); }
216
217Q_CORE_EXPORT EastAsianWidth QT_FASTCALL eastAsianWidth(char32_t ucs4) noexcept;
218inline EastAsianWidth eastAsianWidth(QChar ch) noexcept
219{ return eastAsianWidth(ch.unicode()); }
220
221} // namespace QUnicodeTables
222
223QT_END_NAMESPACE
224
225#endif // QUNICODETABLES_P_H
EastAsianWidth eastAsianWidth(QChar ch) noexcept
GraphemeBreakClass graphemeBreakClass(QChar ch) noexcept
IdnaStatus idnaStatus(QChar ch) noexcept
LineBreakClass lineBreakClass(QChar ch) noexcept
SentenceBreakClass sentenceBreakClass(QChar ch) noexcept
static constexpr unsigned short specialCaseMap[]
WordBreakClass wordBreakClass(QChar ch) noexcept
constexpr unsigned int MaxSpecialCaseLength
QStringView idnaMapping(QChar ch) noexcept
static constexpr unsigned short uc_ligature_map[]
static Q_DECL_CONST_FUNCTION Q_ALWAYS_INLINE const Properties * qGetProp(char32_t ucs4) noexcept
constexpr QLatin1Char operator""_L1(char ch) noexcept
Definition qchar.h:697
Definition qcompare.h:76
bool operator<(const UCS2SurrogatePair &ligature, char32_t u1)
Definition qchar.cpp:1888
static constexpr quint32 Hangul_VCount
Definition qchar.cpp:1399
static constexpr char32_t Hangul_SBase
Definition qchar.cpp:1394
static constexpr char32_t Hangul_VBase
Definition qchar.cpp:1396
bool operator<(ushort u1, const UCS2Pair &ligature)
Definition qchar.cpp:1874
#define FLAG(x)
Definition qchar.cpp:14
static constexpr quint32 Hangul_LCount
Definition qchar.cpp:1398
static char32_t ligatureHelper(char32_t u1, char32_t u2)
Definition qchar.cpp:1891
bool operator<(const UCS2Pair &ligature, ushort u1)
Definition qchar.cpp:1876
static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, qsizetype from)
Definition qchar.cpp:1991
static constexpr char32_t Hangul_LBase
Definition qchar.cpp:1395
static constexpr char32_t Hangul_TBase
Definition qchar.cpp:1397
bool operator<(char32_t u1, const UCS2SurrogatePair &ligature)
Definition qchar.cpp:1886
static char32_t foldCase(char32_t ch, char32_t &last) noexcept
Definition qchar.cpp:1689
bool operator<(const UCS2SurrogatePair &ligature1, const UCS2SurrogatePair &ligature2)
Definition qchar.cpp:1884
bool operator<(const UCS2Pair &ligature1, const UCS2Pair &ligature2)
Definition qchar.cpp:1872
static auto fullConvertCase(char32_t uc, QUnicodeTables::Case which) noexcept
Definition qchar.cpp:1557
static constexpr quint32 Hangul_NCount
Definition qchar.cpp:1401
static void decomposeHelper(QString *str, bool canonical, QChar::UnicodeVersion version, qsizetype from)
Definition qchar.cpp:1831
static void composeHelper(QString *str, QChar::UnicodeVersion version, qsizetype from)
Definition qchar.cpp:1931
static constexpr quint32 Hangul_SCount
Definition qchar.cpp:1402
static bool normalizationQuickCheckHelper(QString *str, QString::NormalizationForm mode, qsizetype from, qsizetype *lastStable)
Definition qchar.cpp:2073
static QChar foldCase(QChar ch) noexcept
Definition qchar.cpp:1703
static constexpr quint32 Hangul_TCount
Definition qchar.cpp:1400
static char16_t foldCase(char16_t ch) noexcept
Definition qchar.cpp:1698
static char32_t foldCase(const char16_t *ch, const char16_t *start)
Definition qchar.cpp:1681
#define QT_CHAR_FASTCALL
Definition qchar.h:47
uint QT_FASTCALL fetch1Pixel< QPixelLayout::BPP1LSB >(const uchar *src, int index)
Q_DECLARE_TYPEINFO(QObjectPrivate::ConnectionList, Q_RELOCATABLE_TYPE)
#define GET_LIGATURE_INDEX(ucs4)
#define GET_DECOMPOSITION_INDEX(ucs4)
#define UNICODE_DATA_VERSION
\inmodule QtCore \reentrant
Definition qchar.h:18
friend constexpr Qt::strong_ordering compareThreeWay(const QLatin1Char &lhs, const QLatin1Char &rhs) noexcept
Definition qchar.h:28
constexpr char16_t unicode() const noexcept
Converts a Latin-1 character to an 16-bit-encoded Unicode representation of the character.
Definition qchar.h:22
friend constexpr bool comparesEqual(const QLatin1Char &lhs, const QLatin1Char &rhs) noexcept
Definition qchar.h:25
constexpr char toLatin1() const noexcept
Converts a Latin-1 character to an 8-bit ASCII representation of the character.
Definition qchar.h:21
constexpr QLatin1Char(char c) noexcept
Constructs a Latin-1 character for c.
Definition qchar.h:20
std::array< CaseConversion, NumCases > cases
ushort u1
Definition qchar.cpp:1868
ushort u2
Definition qchar.cpp:1869