HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
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.
26
enum
UT_UnicodeCategory
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
38
struct
UT_UnicodeCharacter
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
49
UT_API
extern
UT_UnicodeCharacter
*
theUnicodeTable
[256];
50
51
#endif // __UT_UnicodeTable__
UT_UNICODE_SPACE_NONBREAK
Definition:
UT_UnicodeTable.h:34
UT_UNICODE_SPACE
Definition:
UT_UnicodeTable.h:33
UT_UNICODE_NUMBER
Definition:
UT_UnicodeTable.h:32
UT_UnicodeCharacter::myComplement
unsigned int myComplement
Definition:
UT_UnicodeTable.h:43
UT_API.h
UT_UNICODE_PUNCTUATION
Definition:
UT_UnicodeTable.h:35
UT_UNICODE_LT_UPPER
Definition:
UT_UnicodeTable.h:29
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_UnicodeCharacter::myCategory
unsigned int myCategory
Definition:
UT_UnicodeTable.h:46
UT_UNICODE_LT_LOWER
Definition:
UT_UnicodeTable.h:30
UT_UNICODE_NONE
Definition:
UT_UnicodeTable.h:28
UT_UnicodeCharacter
Definition:
UT_UnicodeTable.h:38
UT_UnicodeCategory
UT_UnicodeCategory
Definition:
UT_UnicodeTable.h:26
theUnicodeTable
UT_API UT_UnicodeCharacter * theUnicodeTable[256]
UT_UNICODE_LT_TITLE
Definition:
UT_UnicodeTable.h:31
UT
UT_UnicodeTable.h
Generated on Fri Nov 8 2024 03:42:07 for HDK by
1.8.6