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
4/* This file is autogenerated from the Unicode 16.0 database. Do not edit */
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists for the convenience
11// of internal files. This header file may change from version to version
12// without notice, or even be removed.
13//
14// We mean it.
15//
16
17#ifndef QUNICODETABLES_P_H
18#define QUNICODETABLES_P_H
19
20#include <QtCore/private/qglobal_p.h>
21
22#include <QtCore/qchar.h>
23
24QT_BEGIN_NAMESPACE
25
26#define UNICODE_DATA_VERSION QChar::Unicode_16_0
27
28namespace QUnicodeTables {
29
38
39struct Properties {
42 ushort emojiFlags : 6; /* 5 used */
45 signed short digitValue : 5;
46 signed short mirrorDiff : 16;
47 ushort unicodeVersion : 5; /* 5 used */
48 ushort eastAsianWidth : 3; /* 3 used */
50#ifdef Q_OS_WASM
51 unsigned char : 0; //wasm 64 packing trick
52#endif
53 struct {
55 signed short diff : 15;
56 } cases[NumCases];
57#ifdef Q_OS_WASM
58 unsigned char : 0; //wasm 64 packing trick
59#endif
60 ushort graphemeBreakClass : 5; /* 5 used */
61 ushort wordBreakClass : 5; /* 5 used */
62 ushort lineBreakClass : 6; /* 6 used */
63 ushort sentenceBreakClass : 4; /* 4 used */
64 ushort idnaStatus : 4; /* 3 used */
66};
67
68Q_CORE_EXPORT const Properties * QT_FASTCALL properties(char32_t ucs4) noexcept;
69Q_CORE_EXPORT const Properties * QT_FASTCALL properties(char16_t ucs2) noexcept;
70
71static_assert(sizeof(Properties) == 20);
72
73enum class EastAsianWidth : unsigned int {
80};
81
101
125
144
145// see http://www.unicode.org/reports/tr14/tr14-30.html
146// we don't use the XX and AI classes but map them to AL instead.
147// VI and VF classes are mapped to CM.
171
179
188
189Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(char32_t ucs4) noexcept;
190inline GraphemeBreakClass graphemeBreakClass(QChar ch) noexcept
191{ return graphemeBreakClass(ch.unicode()); }
192
193Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(char32_t ucs4) noexcept;
194inline WordBreakClass wordBreakClass(QChar ch) noexcept
195{ return wordBreakClass(ch.unicode()); }
196
197Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(char32_t ucs4) noexcept;
198inline SentenceBreakClass sentenceBreakClass(QChar ch) noexcept
199{ return sentenceBreakClass(ch.unicode()); }
200
201Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(char32_t ucs4) noexcept;
202inline LineBreakClass lineBreakClass(QChar ch) noexcept
203{ return lineBreakClass(ch.unicode()); }
204
205Q_CORE_EXPORT IdnaStatus QT_FASTCALL idnaStatus(char32_t ucs4) noexcept;
206inline IdnaStatus idnaStatus(QChar ch) noexcept
207{ return idnaStatus(ch.unicode()); }
208
209Q_CORE_EXPORT QStringView QT_FASTCALL idnaMapping(char32_t usc4) noexcept;
210inline QStringView idnaMapping(QChar ch) noexcept
211{ return idnaMapping(ch.unicode()); }
212
213Q_CORE_EXPORT EastAsianWidth QT_FASTCALL eastAsianWidth(char32_t ucs4) noexcept;
214inline EastAsianWidth eastAsianWidth(QChar ch) noexcept
215{ return eastAsianWidth(ch.unicode()); }
216
217} // namespace QUnicodeTables
218
219QT_END_NAMESPACE
220
221#endif // QUNICODETABLES_P_H
EastAsianWidth eastAsianWidth(QChar ch) noexcept
GraphemeBreakClass graphemeBreakClass(QChar ch) noexcept
IdnaStatus idnaStatus(QChar ch) noexcept
@ GraphemeBreak_Extended_Pictographic
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[]
constexpr QLatin1Char operator""_L1(char ch) noexcept
Definition qchar.h:696
Definition qcompare.h:76
bool operator<(const UCS2SurrogatePair &ligature, char32_t u1)
Definition qchar.cpp:1886
static constexpr quint32 Hangul_VCount
Definition qchar.cpp:1397
static constexpr char32_t Hangul_SBase
Definition qchar.cpp:1392
static constexpr char32_t Hangul_VBase
Definition qchar.cpp:1394
bool operator<(ushort u1, const UCS2Pair &ligature)
Definition qchar.cpp:1872
#define FLAG(x)
Definition qchar.cpp:13
static constexpr quint32 Hangul_LCount
Definition qchar.cpp:1396
static char32_t ligatureHelper(char32_t u1, char32_t u2)
Definition qchar.cpp:1889
bool operator<(const UCS2Pair &ligature, ushort u1)
Definition qchar.cpp:1874
static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, qsizetype from)
Definition qchar.cpp:1989
static constexpr char32_t Hangul_LBase
Definition qchar.cpp:1393
static constexpr char32_t Hangul_TBase
Definition qchar.cpp:1395
bool operator<(char32_t u1, const UCS2SurrogatePair &ligature)
Definition qchar.cpp:1884
static char32_t foldCase(char32_t ch, char32_t &last) noexcept
Definition qchar.cpp:1687
bool operator<(const UCS2SurrogatePair &ligature1, const UCS2SurrogatePair &ligature2)
Definition qchar.cpp:1882
bool operator<(const UCS2Pair &ligature1, const UCS2Pair &ligature2)
Definition qchar.cpp:1870
static auto fullConvertCase(char32_t uc, QUnicodeTables::Case which) noexcept
Definition qchar.cpp:1555
static constexpr quint32 Hangul_NCount
Definition qchar.cpp:1399
static void decomposeHelper(QString *str, bool canonical, QChar::UnicodeVersion version, qsizetype from)
Definition qchar.cpp:1829
static void composeHelper(QString *str, QChar::UnicodeVersion version, qsizetype from)
Definition qchar.cpp:1929
static constexpr quint32 Hangul_SCount
Definition qchar.cpp:1400
static bool normalizationQuickCheckHelper(QString *str, QString::NormalizationForm mode, qsizetype from, qsizetype *lastStable)
Definition qchar.cpp:2071
static QChar foldCase(QChar ch) noexcept
Definition qchar.cpp:1701
static constexpr quint32 Hangul_TCount
Definition qchar.cpp:1398
static char16_t foldCase(char16_t ch) noexcept
Definition qchar.cpp:1696
static char32_t foldCase(const char16_t *ch, const char16_t *start)
Definition qchar.cpp:1679
#define QT_CHAR_FASTCALL
Definition qchar.h:46
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:17
friend constexpr Qt::strong_ordering compareThreeWay(const QLatin1Char &lhs, const QLatin1Char &rhs) noexcept
Definition qchar.h:27
constexpr char16_t unicode() const noexcept
Converts a Latin-1 character to an 16-bit-encoded Unicode representation of the character.
Definition qchar.h:21
friend constexpr bool comparesEqual(const QLatin1Char &lhs, const QLatin1Char &rhs) noexcept
Definition qchar.h:24
constexpr char toLatin1() const noexcept
Converts a Latin-1 character to an 8-bit ASCII representation of the character.
Definition qchar.h:20
constexpr QLatin1Char(char c) noexcept
Constructs a Latin-1 character for c.
Definition qchar.h:19
ushort u1
Definition qchar.cpp:1866
ushort u2
Definition qchar.cpp:1867