43#include <rtl/character.hxx>
44#include <unicode/utypes.h>
45#include <unicode/uscript.h>
60 std::fill_n(ma00, 0xff, -1);
61 std::fill_n(ma20, 0x7f, -1);
62 std::fill_n(ma30, 0x7f, -1);
109 int32_t getPairIndex(UChar32 ch)
const
113 if (ch >= 0x2000 && ch < 0x207f)
114 return ma20[
ch - 0x2000];
115 if (ch >= 0x3000 && ch < 0x307f)
116 return ma30[
ch - 0x3000];
125UScriptCode getScript(UChar32 ch, UErrorCode* status)
127 UScriptCode
script = uscript_getScript(ch, status);
128 if (U_FAILURE(*status))
130 if (script == USCRIPT_KATAKANA || script == USCRIPT_KATAKANA_OR_HIRAGANA)
131 return USCRIPT_HIRAGANA;
146 return scriptOne <= USCRIPT_INHERITED || scriptTwo <= USCRIPT_INHERITED || scriptOne == scriptTwo;
152 UErrorCode error = U_ZERO_ERROR;
173 if (rtl::isLowSurrogate(low)) {
174 ch = rtl::combineSurrogates(high, low);
179 UScriptCode
sc = getScript(
ch, &error);
188 if (pairIndex >= 0) {
189 if ((pairIndex & 1) == 0) {
197 int32_t pi = pairIndex & ~1;
214 if (scriptCode <= USCRIPT_INHERITED && sc > USCRIPT_INHERITED) {
226 if (pairIndex >= 0 && (pairIndex & 1) != 0 &&
parenSP >= 0) {
static const char fgClassID
The address of this static class variable serves as this class's ID for ICU "poor man's RTTI".
std::vector< ParenStackEntry > parenStack
static bool sameScript(int32_t scriptOne, int32_t scriptTwo)
const PairIndices gPairIndices