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 Namespace Reference

Classes

struct  IdnaMapEntry
 
struct  NormalizationCorrection
 
struct  Properties
 

Enumerations

enum  { NumNormalizationCorrections = 6 }
 
enum  { NormalizationCorrectionsVersionMax = 7 }
 
enum  Case {
  LowerCase , UpperCase , TitleCase , CaseFold ,
  NumCases
}
 
enum class  EastAsianWidth : unsigned int {
  A , F , H , N ,
  Na , W
}
 
enum  GraphemeBreakClass {
  GraphemeBreak_Any , GraphemeBreak_CR , GraphemeBreak_LF , GraphemeBreak_Control ,
  GraphemeBreak_Extend , GraphemeBreak_ZWJ , GraphemeBreak_RegionalIndicator , GraphemeBreak_Prepend ,
  GraphemeBreak_SpacingMark , GraphemeBreak_L , GraphemeBreak_V , GraphemeBreak_T ,
  GraphemeBreak_LV , GraphemeBreak_LVT , GraphemeBreak_Extended_Pictographic , NumGraphemeBreakClasses
}
 
enum  WordBreakClass {
  WordBreak_Any , WordBreak_CR , WordBreak_LF , WordBreak_Newline ,
  WordBreak_Extend , WordBreak_ZWJ , WordBreak_Format , WordBreak_RegionalIndicator ,
  WordBreak_Katakana , WordBreak_HebrewLetter , WordBreak_ALetter , WordBreak_SingleQuote ,
  WordBreak_DoubleQuote , WordBreak_MidNumLet , WordBreak_MidLetter , WordBreak_MidNum ,
  WordBreak_Numeric , WordBreak_ExtendNumLet , WordBreak_WSegSpace , NumWordBreakClasses
}
 
enum  SentenceBreakClass {
  SentenceBreak_Any , SentenceBreak_CR , SentenceBreak_LF , SentenceBreak_Sep ,
  SentenceBreak_Extend , SentenceBreak_Sp , SentenceBreak_Lower , SentenceBreak_Upper ,
  SentenceBreak_OLetter , SentenceBreak_Numeric , SentenceBreak_ATerm , SentenceBreak_SContinue ,
  SentenceBreak_STerm , SentenceBreak_Close , NumSentenceBreakClasses
}
 
enum  LineBreakClass {
  LineBreak_OP , LineBreak_CL , LineBreak_CP , LineBreak_QU ,
  LineBreak_QU_Pi , LineBreak_QU_Pf , LineBreak_GL , LineBreak_NS ,
  LineBreak_EX , LineBreak_SY , LineBreak_IS , LineBreak_PR ,
  LineBreak_PO , LineBreak_NU , LineBreak_AL , LineBreak_HL ,
  LineBreak_ID , LineBreak_IN , LineBreak_HY , LineBreak_BA ,
  LineBreak_BB , LineBreak_B2 , LineBreak_ZW , LineBreak_CM ,
  LineBreak_WJ , LineBreak_H2 , LineBreak_H3 , LineBreak_JL ,
  LineBreak_JV , LineBreak_JT , LineBreak_RI , LineBreak_CB ,
  LineBreak_EB , LineBreak_EM , LineBreak_ZWJ , LineBreak_SA ,
  LineBreak_SG , LineBreak_SP , LineBreak_CR , LineBreak_LF ,
  LineBreak_BK , NumLineBreakClasses
}
 
enum class  IdnaStatus : unsigned int {
  Disallowed , Valid , Ignored , Mapped ,
  Deviation
}
 

Functions

template<typename T >
static Q_NEVER_INLINE QString detachAndConvertCase (T &str, QStringIterator it, QUnicodeTables::Case which)
 
template<typename T >
static QString convertCase (T &str, QUnicodeTables::Case which)
 
static Q_DECL_CONST_FUNCTION const PropertiesqGetProp (char32_t ucs4) noexcept
 
static Q_DECL_CONST_FUNCTION const PropertiesqGetProp (char16_t ucs2) noexcept
 
Q_DECL_CONST_FUNCTION Q_CORE_EXPORT const Properties *QT_FASTCALL properties (char32_t ucs4) noexcept
 
Q_DECL_CONST_FUNCTION Q_CORE_EXPORT const Properties *QT_FASTCALL properties (char16_t ucs2) noexcept
 
Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL graphemeBreakClass (char32_t ucs4) noexcept
 
Q_CORE_EXPORT WordBreakClass QT_FASTCALL wordBreakClass (char32_t ucs4) noexcept
 
Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL sentenceBreakClass (char32_t ucs4) noexcept
 
Q_CORE_EXPORT LineBreakClass QT_FASTCALL lineBreakClass (char32_t ucs4) noexcept
 
Q_CORE_EXPORT IdnaStatus QT_FASTCALL idnaStatus (char32_t ucs4) noexcept
 
Q_CORE_EXPORT EastAsianWidth QT_FASTCALL eastAsianWidth (char32_t ucs4) noexcept
 
Q_CORE_EXPORT QStringView QT_FASTCALL idnaMapping (char32_t ucs4) noexcept
 
GraphemeBreakClass graphemeBreakClass (QChar ch) noexcept
 
WordBreakClass wordBreakClass (QChar ch) noexcept
 
SentenceBreakClass sentenceBreakClass (QChar ch) noexcept
 
LineBreakClass lineBreakClass (QChar ch) noexcept
 
IdnaStatus idnaStatus (QChar ch) noexcept
 
QStringView idnaMapping (QChar ch) noexcept
 
EastAsianWidth eastAsianWidth (QChar ch) noexcept
 

Variables

static constexpr unsigned short uc_property_trie []
 
static constexpr Properties uc_properties []
 
static constexpr unsigned short specialCaseMap []
 
constexpr unsigned int MaxSpecialCaseLength = 3
 
static constexpr unsigned short uc_decomposition_trie []
 
static constexpr unsigned short uc_decomposition_map []
 
static constexpr unsigned short uc_ligature_trie []
 
static constexpr unsigned short uc_ligature_map []
 
static constexpr NormalizationCorrection uc_normalization_corrections []
 
static constexpr char16_t idnaMappingData []
 
static constexpr IdnaMapEntry idnaMap []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NumNormalizationCorrections 

Definition at line 15297 of file qunicodetables.cpp.

◆ anonymous enum

anonymous enum
Enumerator
NormalizationCorrectionsVersionMax 

Definition at line 15298 of file qunicodetables.cpp.

◆ Case

Enumerator
LowerCase 
UpperCase 
TitleCase 
CaseFold 
NumCases 

Definition at line 30 of file qunicodetables_p.h.

◆ EastAsianWidth

enum class QUnicodeTables::EastAsianWidth : unsigned int
strong
Enumerator
Na 

Definition at line 72 of file qunicodetables_p.h.

◆ GraphemeBreakClass

Enumerator
GraphemeBreak_Any 
GraphemeBreak_CR 
GraphemeBreak_LF 
GraphemeBreak_Control 
GraphemeBreak_Extend 
GraphemeBreak_ZWJ 
GraphemeBreak_RegionalIndicator 
GraphemeBreak_Prepend 
GraphemeBreak_SpacingMark 
GraphemeBreak_L 
GraphemeBreak_V 
GraphemeBreak_T 
GraphemeBreak_LV 
GraphemeBreak_LVT 
GraphemeBreak_Extended_Pictographic 
NumGraphemeBreakClasses 

Definition at line 81 of file qunicodetables_p.h.

◆ IdnaStatus

enum class QUnicodeTables::IdnaStatus : unsigned int
strong
Enumerator
Disallowed 
Valid 
Ignored 
Mapped 
Deviation 

Definition at line 162 of file qunicodetables_p.h.

◆ LineBreakClass

Enumerator
LineBreak_OP 
LineBreak_CL 
LineBreak_CP 
LineBreak_QU 
LineBreak_QU_Pi 
LineBreak_QU_Pf 
LineBreak_GL 
LineBreak_NS 
LineBreak_EX 
LineBreak_SY 
LineBreak_IS 
LineBreak_PR 
LineBreak_PO 
LineBreak_NU 
LineBreak_AL 
LineBreak_HL 
LineBreak_ID 
LineBreak_IN 
LineBreak_HY 
LineBreak_BA 
LineBreak_BB 
LineBreak_B2 
LineBreak_ZW 
LineBreak_CM 
LineBreak_WJ 
LineBreak_H2 
LineBreak_H3 
LineBreak_JL 
LineBreak_JV 
LineBreak_JT 
LineBreak_RI 
LineBreak_CB 
LineBreak_EB 
LineBreak_EM 
LineBreak_ZWJ 
LineBreak_SA 
LineBreak_SG 
LineBreak_SP 
LineBreak_CR 
LineBreak_LF 
LineBreak_BK 
NumLineBreakClasses 

Definition at line 147 of file qunicodetables_p.h.

◆ SentenceBreakClass

Enumerator
SentenceBreak_Any 
SentenceBreak_CR 
SentenceBreak_LF 
SentenceBreak_Sep 
SentenceBreak_Extend 
SentenceBreak_Sp 
SentenceBreak_Lower 
SentenceBreak_Upper 
SentenceBreak_OLetter 
SentenceBreak_Numeric 
SentenceBreak_ATerm 
SentenceBreak_SContinue 
SentenceBreak_STerm 
SentenceBreak_Close 
NumSentenceBreakClasses 

Definition at line 125 of file qunicodetables_p.h.

◆ WordBreakClass

Enumerator
WordBreak_Any 
WordBreak_CR 
WordBreak_LF 
WordBreak_Newline 
WordBreak_Extend 
WordBreak_ZWJ 
WordBreak_Format 
WordBreak_RegionalIndicator 
WordBreak_Katakana 
WordBreak_HebrewLetter 
WordBreak_ALetter 
WordBreak_SingleQuote 
WordBreak_DoubleQuote 
WordBreak_MidNumLet 
WordBreak_MidLetter 
WordBreak_MidNum 
WordBreak_Numeric 
WordBreak_ExtendNumLet 
WordBreak_WSegSpace 
NumWordBreakClasses 

Definition at line 101 of file qunicodetables_p.h.

Function Documentation

◆ convertCase()

template<typename T >
static QString QUnicodeTables::convertCase ( T & str,
QUnicodeTables::Case which )
static

Definition at line 7158 of file qstring.cpp.

References QString::constBegin(), detachAndConvertCase(), it, qGetProp(), QString::size(), and str.

+ Here is the call graph for this function:

◆ detachAndConvertCase()

template<typename T >
static Q_NEVER_INLINE QString QUnicodeTables::detachAndConvertCase ( T & str,
QStringIterator it,
QUnicodeTables::Case which )
static

Definition at line 7123 of file qstring.cpp.

References QSet< T >::constBegin(), fullConvertCase(), QString::isEmpty(), it, Q_ASSERT, Q_UNLIKELY, and str.

Referenced by convertCase().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eastAsianWidth() [1/2]

Q_CORE_EXPORT EastAsianWidth QT_FASTCALL QUnicodeTables::eastAsianWidth ( char32_t ucs4)
noexcept

Definition at line 10495 of file qunicodetables.cpp.

References qGetProp().

Referenced by eastAsianWidth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eastAsianWidth() [2/2]

EastAsianWidth QUnicodeTables::eastAsianWidth ( QChar ch)
inlinenoexcept

Definition at line 195 of file qunicodetables_p.h.

References ch, and eastAsianWidth().

+ Here is the call graph for this function:

◆ graphemeBreakClass() [1/2]

Q_CORE_EXPORT GraphemeBreakClass QT_FASTCALL QUnicodeTables::graphemeBreakClass ( char32_t ucs4)
noexcept

Definition at line 10470 of file qunicodetables.cpp.

References qGetProp().

Referenced by graphemeBreakClass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ graphemeBreakClass() [2/2]

GraphemeBreakClass QUnicodeTables::graphemeBreakClass ( QChar ch)
inlinenoexcept

Definition at line 171 of file qunicodetables_p.h.

References ch, and graphemeBreakClass().

+ Here is the call graph for this function:

◆ idnaMapping() [1/2]

Q_CORE_EXPORT QStringView QT_FASTCALL QUnicodeTables::idnaMapping ( char32_t ucs4)
noexcept

Definition at line 21307 of file qunicodetables.cpp.

References i, idnaMap, and idnaMappingData.

Referenced by idnaMapping(), and mapDomainName().

+ Here is the caller graph for this function:

◆ idnaMapping() [2/2]

QStringView QUnicodeTables::idnaMapping ( QChar ch)
inlinenoexcept

Definition at line 191 of file qunicodetables_p.h.

References ch, and idnaMapping().

+ Here is the call graph for this function:

◆ idnaStatus() [1/2]

Q_CORE_EXPORT IdnaStatus QT_FASTCALL QUnicodeTables::idnaStatus ( char32_t ucs4)
noexcept

Definition at line 10490 of file qunicodetables.cpp.

References qGetProp().

Referenced by idnaStatus(), and mapDomainName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ idnaStatus() [2/2]

IdnaStatus QUnicodeTables::idnaStatus ( QChar ch)
inlinenoexcept

Definition at line 187 of file qunicodetables_p.h.

References ch, and idnaStatus().

+ Here is the call graph for this function:

◆ lineBreakClass() [1/2]

Q_CORE_EXPORT LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass ( char32_t ucs4)
noexcept

Definition at line 10485 of file qunicodetables.cpp.

References qGetProp().

Referenced by lineBreakClass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lineBreakClass() [2/2]

LineBreakClass QUnicodeTables::lineBreakClass ( QChar ch)
inlinenoexcept

Definition at line 183 of file qunicodetables_p.h.

References ch, and lineBreakClass().

+ Here is the call graph for this function:

◆ properties() [1/2]

Q_CORE_EXPORT const Properties *QT_FASTCALL QUnicodeTables::properties ( char16_t ucs2)
noexcept

Definition at line 10465 of file qunicodetables.cpp.

References qGetProp().

+ Here is the call graph for this function:

◆ properties() [2/2]

Q_CORE_EXPORT const Properties *QT_FASTCALL QUnicodeTables::properties ( char32_t ucs4)
noexcept

Definition at line 10460 of file qunicodetables.cpp.

References qGetProp().

Referenced by QUnicodeTools::getGraphemeBreaks(), QUnicodeTools::getLineBreaks(), QUnicodeTools::getSentenceBreaks(), QUnicodeTools::getWordBreaks(), and QUnicodeTools::initScripts().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qGetProp() [1/2]

static Q_DECL_CONST_FUNCTION const Properties * QUnicodeTables::qGetProp ( char16_t ucs2)
inlinestaticnoexcept

Definition at line 10455 of file qunicodetables.cpp.

References uc_properties, and uc_property_trie.

◆ qGetProp() [2/2]

static Q_DECL_CONST_FUNCTION const Properties * QUnicodeTables::qGetProp ( char32_t ucs4)
inlinestaticnoexcept

Definition at line 10445 of file qunicodetables.cpp.

References Q_ASSERT, uc_properties, and uc_property_trie.

Referenced by canonicalOrderHelper(), checkCase(), composeHelper(), convertCase(), convertCase_helper(), eastAsianWidth(), fullConvertCase(), graphemeBreakClass(), idnaStatus(), lineBreakClass(), normalizationQuickCheckHelper(), properties(), properties(), sentenceBreakClass(), and wordBreakClass().

+ Here is the caller graph for this function:

◆ sentenceBreakClass() [1/2]

Q_CORE_EXPORT SentenceBreakClass QT_FASTCALL QUnicodeTables::sentenceBreakClass ( char32_t ucs4)
noexcept

Definition at line 10480 of file qunicodetables.cpp.

References qGetProp().

Referenced by sentenceBreakClass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sentenceBreakClass() [2/2]

SentenceBreakClass QUnicodeTables::sentenceBreakClass ( QChar ch)
inlinenoexcept

Definition at line 179 of file qunicodetables_p.h.

References ch, and sentenceBreakClass().

+ Here is the call graph for this function:

◆ wordBreakClass() [1/2]

Q_CORE_EXPORT WordBreakClass QT_FASTCALL QUnicodeTables::wordBreakClass ( char32_t ucs4)
noexcept

Definition at line 10475 of file qunicodetables.cpp.

References qGetProp().

Referenced by wordBreakClass().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wordBreakClass() [2/2]

WordBreakClass QUnicodeTables::wordBreakClass ( QChar ch)
inlinenoexcept

Definition at line 175 of file qunicodetables_p.h.

References ch, and wordBreakClass().

+ Here is the call graph for this function:

Variable Documentation

◆ idnaMap

constexpr IdnaMapEntry QUnicodeTables::idnaMap[]
staticconstexpr

Definition at line 15387 of file qunicodetables.cpp.

Referenced by idnaMapping().

◆ idnaMappingData

constexpr char16_t QUnicodeTables::idnaMappingData[]
staticconstexpr

Definition at line 15300 of file qunicodetables.cpp.

Referenced by idnaMapping().

◆ MaxSpecialCaseLength

constexpr unsigned int QUnicodeTables::MaxSpecialCaseLength = 3
constexpr

Definition at line 10807 of file qunicodetables.cpp.

Referenced by fullConvertCase().

◆ specialCaseMap

constexpr unsigned short QUnicodeTables::specialCaseMap[]
staticconstexpr

Definition at line 10500 of file qunicodetables.cpp.

Referenced by convertCase_helper(), and fullConvertCase().

◆ uc_decomposition_map

constexpr unsigned short QUnicodeTables::uc_decomposition_map[]
staticconstexpr

Definition at line 12762 of file qunicodetables.cpp.

Referenced by decompositionHelper().

◆ uc_decomposition_trie

constexpr unsigned short QUnicodeTables::uc_decomposition_trie[]
staticconstexpr

Definition at line 10809 of file qunicodetables.cpp.

◆ uc_ligature_map

constexpr unsigned short QUnicodeTables::uc_ligature_map[]
staticconstexpr

Definition at line 15032 of file qunicodetables.cpp.

Referenced by ligatureHelper().

◆ uc_ligature_trie

constexpr unsigned short QUnicodeTables::uc_ligature_trie[]
staticconstexpr

Definition at line 14602 of file qunicodetables.cpp.

◆ uc_normalization_corrections

constexpr NormalizationCorrection QUnicodeTables::uc_normalization_corrections[]
staticconstexpr
Initial value:
= {
{ 0xf951, 0x96fb, 6 },
{ 0x2f868, 0x2136a, 7 },
{ 0x2f874, 0x5f33, 7 },
{ 0x2f91f, 0x43ab, 7 },
{ 0x2f95f, 0x7aae, 7 },
{ 0x2f9bf, 0x4d57, 7 }
}

Definition at line 15288 of file qunicodetables.cpp.

Referenced by qt_string_normalize().

◆ uc_properties

constexpr Properties QUnicodeTables::uc_properties[]
staticconstexpr

Definition at line 7209 of file qunicodetables.cpp.

Referenced by qGetProp(), and qGetProp().

◆ uc_property_trie

constexpr unsigned short QUnicodeTables::uc_property_trie[]
staticconstexpr

Definition at line 12 of file qunicodetables.cpp.

Referenced by qGetProp(), and qGetProp().