HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_UnicodeTable.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_UnicodeTable.h ( UI Library, C++)
7  *
8  * COMMENTS: A table of all Unicode characters to implement Unicode-aware
9  * ctype emulations (isspace, isalnum, etc.)
10  */
11 
12 #ifndef __UT_UnicodeTable__
13 #define __UT_UnicodeTable__
14 
15 #include "UT_API.h"
16 
17 // Unicode is huge. For our purposes, we only make use of the Basic
18 // Multilingual Plane (0x0000 -> 0xFFFF). A lot of that is empty for
19 // Categorisation purposes, and so we divide into two tables: one which is
20 // 256 entries and points to the lower byte portion of the BMP. If the lower
21 // byte portion is defined, it will also contain 256 entries.
22 
23 // The categorisation of the given character.
24 // See ftp://ftp.unicode.org/Public/3.0-Update1/UnicodeData-3.0.1.html#General Category
25 // for details.
27 {
28  UT_UNICODE_NONE, // No classification
29  UT_UNICODE_LT_UPPER, // Letter - Upper case [Lu]
30  UT_UNICODE_LT_LOWER, // Letter - Lower case [Ll]
31  UT_UNICODE_LT_TITLE, // Letter - Title case [Lt]
32  UT_UNICODE_NUMBER, // Number (Decimal, letter, other) [Nd, Nl, No]
33  UT_UNICODE_SPACE, // Break Space (horizontal only) [Zs]
34  UT_UNICODE_SPACE_NONBREAK, // Non-break Space (horizontal only) [Zs]
35  UT_UNICODE_PUNCTUATION // Punctuation [P*]
36 };
37 
39 {
40  // Upper case complementary Unicode character, if this one is lower,
41  // and vice versa. In case of title-case characters, we give the lower
42  // case.
43  unsigned int myComplement:16;
44 
45  // See UT_UnicodeCategory
46  unsigned int myCategory:4;
47 };
48 
50 
51 #endif // __UT_UnicodeTable__
unsigned int myComplement
#define UT_API
Definition: UT_API.h:12
unsigned int myCategory
UT_UnicodeCategory
UT_API UT_UnicodeCharacter * theUnicodeTable[256]