Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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-DFS-2016
3
4/* This file is autogenerated from the Unicode 15.1 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
25
26#define UNICODE_DATA_VERSION QChar::Unicode_15_1
27
28namespace QUnicodeTables {
29
38
39struct Properties {
40 ushort category : 8; /* 5 used */
41 ushort direction : 8; /* 5 used */
44 signed short digitValue : 5;
45 signed short mirrorDiff : 16;
46 ushort unicodeVersion : 5; /* 5 used */
47 ushort eastAsianWidth : 3; /* 3 used */
49#ifdef Q_OS_WASM
50 unsigned char : 0; //wasm 64 packing trick
51#endif
52 struct {
54 signed short diff : 15;
56#ifdef Q_OS_WASM
57 unsigned char : 0; //wasm 64 packing trick
58#endif
59 ushort graphemeBreakClass : 5; /* 5 used */
60 ushort wordBreakClass : 5; /* 5 used */
61 ushort lineBreakClass : 6; /* 6 used */
62 ushort sentenceBreakClass : 4; /* 4 used */
63 ushort idnaStatus : 4; /* 3 used */
65};
66
67Q_CORE_EXPORT const Properties * QT_FASTCALL properties(char32_t ucs4) noexcept;
68Q_CORE_EXPORT const Properties * QT_FASTCALL properties(char16_t ucs2) noexcept;
69
70static_assert(sizeof(Properties) == 20);
71
72enum class EastAsianWidth : unsigned int {
73 A,
74 F,
75 H,
76 N,
77 Na,
78 W,
79};
80
100
124
143
144// see http://www.unicode.org/reports/tr14/tr14-30.html
145// we don't use the XX, AK, AP, AS and AI classes and map them to AL instead.
146// VI and VF classes are mapped to CM.
161
162enum class IdnaStatus : unsigned int {
164 Valid,
165 Ignored,
166 Mapped,
168};
169
170Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(char32_t ucs4) noexcept;
172{ return graphemeBreakClass(ch.unicode()); }
173
174Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(char32_t ucs4) noexcept;
176{ return wordBreakClass(ch.unicode()); }
177
178Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(char32_t ucs4) noexcept;
180{ return sentenceBreakClass(ch.unicode()); }
181
182Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(char32_t ucs4) noexcept;
184{ return lineBreakClass(ch.unicode()); }
185
186Q_CORE_EXPORT IdnaStatus QT_FASTCALL idnaStatus(char32_t ucs4) noexcept;
188{ return idnaStatus(ch.unicode()); }
189
190Q_CORE_EXPORT QStringView QT_FASTCALL idnaMapping(char32_t usc4) noexcept;
192{ return idnaMapping(ch.unicode()); }
193
194Q_CORE_EXPORT EastAsianWidth QT_FASTCALL eastAsianWidth(char32_t ucs4) noexcept;
196{ return eastAsianWidth(ch.unicode()); }
197
198} // namespace QUnicodeTables
199
201
202#endif // QUNICODETABLES_P_H
\inmodule QtCore
\inmodule QtCore
Definition qstringview.h:78
Combined button and popup list for selecting options.
Q_CORE_EXPORT IdnaStatus QT_FASTCALL idnaStatus(char32_t ucs4) noexcept
@ GraphemeBreak_Extended_Pictographic
Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass(char32_t ucs4) noexcept
Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass(char32_t ucs4) noexcept
Q_CORE_EXPORT QStringView QT_FASTCALL idnaMapping(char32_t ucs4) noexcept
Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass(char32_t ucs4) noexcept
Q_CORE_EXPORT EastAsianWidth QT_FASTCALL eastAsianWidth(char32_t ucs4) noexcept
Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass(char32_t ucs4) noexcept
#define QT_FASTCALL
static const QCssKnownValue properties[NumProperties - 1]
unsigned short ushort
Definition qtypes.h:33
struct QUnicodeTables::Properties::@154 cases[NumCases]