2
*******************************************************************************
4
* Copyright (C) 1999-2001, International Business Machines
5
* Corporation and others. All Rights Reserved.
7
*******************************************************************************
8
* file name: scrptrun.h
10
* created on: 10/17/2001
11
* created by: Eric R. Mader
17
#include "unicode/utypes.h"
18
#include "unicode/uscript.h"
24
UScriptCode scriptCode;
27
struct ParenStackEntry
30
UScriptCode scriptCode;
38
ScriptRun(const UChar chars[], int32_t length);
40
ScriptRun(const UChar chars[], int32_t start, int32_t length);
44
void reset(int32_t start, int32_t count);
46
void reset(const UChar chars[], int32_t start, int32_t length);
48
int32_t getScriptStart();
50
int32_t getScriptEnd();
52
UScriptCode getScriptCode();
58
static UBool sameScript(int32_t scriptOne, int32_t scriptTwo);
62
const UChar *charArray;
66
UScriptCode scriptCode;
68
ParenStackEntry parenStack[128];
71
static int8_t highBit(int32_t value);
72
static int32_t getPairIndex(UChar32 ch);
74
static UChar32 pairedChars[];
75
static const int32_t pairedCharCount;
76
static const int32_t pairedCharPower;
77
static const int32_t pairedCharExtra;
80
inline ScriptRun::ScriptRun()
85
inline ScriptRun::ScriptRun(const UChar chars[], int32_t length)
87
reset(chars, 0, length);
90
inline ScriptRun::ScriptRun(const UChar chars[], int32_t start, int32_t length)
92
reset(chars, start, length);
95
inline int32_t ScriptRun::getScriptStart()
100
inline int32_t ScriptRun::getScriptEnd()
105
inline UScriptCode ScriptRun::getScriptCode()
110
inline void ScriptRun::reset()
112
scriptStart = charStart;
113
scriptEnd = charStart;
114
scriptCode = USCRIPT_INVALID_CODE;
118
inline void ScriptRun::reset(int32_t start, int32_t length)
121
charLimit = start + length;
126
inline void ScriptRun::reset(const UChar chars[], int32_t start, int32_t length)
130
reset(start, length);