1 | /* |
---|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
---|
3 | * contributor license agreements. See the NOTICE file distributed with |
---|
4 | * this work for additional information regarding copyright ownership. |
---|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
6 | * (the "License"); you may not use this file except in compliance with |
---|
7 | * the License. You may obtain a copy of the License at |
---|
8 | * |
---|
9 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
10 | * |
---|
11 | * Unless required by applicable law or agreed to in writing, software |
---|
12 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
14 | * See the License for the specific language governing permissions and |
---|
15 | * limitations under the License. |
---|
16 | */ |
---|
17 | |
---|
18 | /* |
---|
19 | * $Id: XMLUniCharacter.hpp 568078 2007-08-21 11:43:25Z amassari $ |
---|
20 | */ |
---|
21 | |
---|
22 | #if !defined(XMLUNICHARACTER_HPP) |
---|
23 | #define XMLUNICHARACTER_HPP |
---|
24 | |
---|
25 | #include <xercesc/util/XercesDefs.hpp> |
---|
26 | |
---|
27 | XERCES_CPP_NAMESPACE_BEGIN |
---|
28 | |
---|
29 | /** |
---|
30 | * Class for representing unicode characters |
---|
31 | */ |
---|
32 | class XMLUTIL_EXPORT XMLUniCharacter |
---|
33 | { |
---|
34 | public: |
---|
35 | // ----------------------------------------------------------------------- |
---|
36 | // Public Constants |
---|
37 | // ----------------------------------------------------------------------- |
---|
38 | // Unicode chara types |
---|
39 | enum { |
---|
40 | UNASSIGNED = 0, |
---|
41 | UPPERCASE_LETTER = 1, |
---|
42 | LOWERCASE_LETTER = 2, |
---|
43 | TITLECASE_LETTER = 3, |
---|
44 | MODIFIER_LETTER = 4, |
---|
45 | OTHER_LETTER = 5, |
---|
46 | NON_SPACING_MARK = 6, |
---|
47 | ENCLOSING_MARK = 7, |
---|
48 | COMBINING_SPACING_MARK = 8, |
---|
49 | DECIMAL_DIGIT_NUMBER = 9, |
---|
50 | LETTER_NUMBER = 10, |
---|
51 | OTHER_NUMBER = 11, |
---|
52 | SPACE_SEPARATOR = 12, |
---|
53 | LINE_SEPARATOR = 13, |
---|
54 | PARAGRAPH_SEPARATOR = 14, |
---|
55 | CONTROL = 15, |
---|
56 | FORMAT = 16, |
---|
57 | PRIVATE_USE = 17, |
---|
58 | SURROGATE = 18, |
---|
59 | DASH_PUNCTUATION = 19, |
---|
60 | START_PUNCTUATION = 20, |
---|
61 | END_PUNCTUATION = 21, |
---|
62 | CONNECTOR_PUNCTUATION = 22, |
---|
63 | OTHER_PUNCTUATION = 23, |
---|
64 | MATH_SYMBOL = 24, |
---|
65 | CURRENCY_SYMBOL = 25, |
---|
66 | MODIFIER_SYMBOL = 26, |
---|
67 | OTHER_SYMBOL = 27, |
---|
68 | INITIAL_PUNCTUATION = 28, |
---|
69 | FINAL_PUNCTUATION = 29 |
---|
70 | }; |
---|
71 | |
---|
72 | /** destructor */ |
---|
73 | ~XMLUniCharacter() {} |
---|
74 | |
---|
75 | /* Static methods for getting unicode character type */ |
---|
76 | /** @name Getter functions */ |
---|
77 | //@{ |
---|
78 | |
---|
79 | /** Gets the unicode type of a given character |
---|
80 | * |
---|
81 | * @param ch The character we want to get its unicode type |
---|
82 | */ |
---|
83 | static unsigned short getType(const XMLCh ch); |
---|
84 | //@} |
---|
85 | |
---|
86 | private : |
---|
87 | |
---|
88 | /** @name Constructors and Destructor */ |
---|
89 | //@{ |
---|
90 | /** Unimplemented default constructor */ |
---|
91 | XMLUniCharacter(); |
---|
92 | //@} |
---|
93 | }; |
---|
94 | |
---|
95 | XERCES_CPP_NAMESPACE_END |
---|
96 | |
---|
97 | #endif |
---|
98 | |
---|
99 | /** |
---|
100 | * End of file XMLUniCharacter.hpp |
---|
101 | */ |
---|