Xalan-C++ API Reference 1.12.0
XalanXMLChar.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XALANXMLCHAR_HEADER_GUARD_1357924680)
19#define XALANXMLCHAR_HEADER_GUARD_1357924680
20
21
22
23// Base include file. Must be first.
25
26
27
28namespace XALAN_CPP_NAMESPACE {
29
30
31
33{
34
35public:
36
37 enum eType
38 {
39 XML_XX = 0,
40 XML_BC = 1,
41 XML_ID = 2,
42 XML_EX = 3,
43 XML_DI = 4,
44 XML_CC = 5,
45 XML_WS = 6
46 };
47
48 static const char theUnicodeTable[];
49
50 static bool
51 isBaseChar(XalanDOMChar c)
52 {
53 return theUnicodeTable[c] == char(XML_BC);
54 }
55
56 static bool
57 isIdeographic(XalanDOMChar c)
58 {
59 return theUnicodeTable[c] == char(XML_ID);
60 }
61
62 static bool
63 isExtender(XalanDOMChar c)
64 {
65 return theUnicodeTable[c] == char(XML_EX);
66 }
67
68 static bool
69 isDigit(XalanDOMChar c)
70 {
71 return theUnicodeTable[c] == char(XML_DI);
72 }
73
74 static bool
75 isCombiningChar(XalanDOMChar c)
76 {
77 return theUnicodeTable[c] == char(XML_CC);
78 }
79
80 static bool
81 isWhitespace(XalanDOMChar c)
82 {
83 return theUnicodeTable[c] == char(XML_WS);
84 }
85
86 static bool
87 isLetter(XalanDOMChar c)
88 {
89 return theUnicodeTable[c] == char(XML_BC) || theUnicodeTable[c] == char(XML_ID);
90 }
91};
92
93
94
95}
96
97
98
99#endif // XALANXMLCHAR_HEADER_GUARD_1357924680
100
#define XALAN_CPP_NAMESPACE
#define XALAN_PLATFORMSUPPORT_EXPORT
static bool isIdeographic(XalanDOMChar c)
static bool isCombiningChar(XalanDOMChar c)
static bool isLetter(XalanDOMChar c)
static bool isExtender(XalanDOMChar c)
static bool isBaseChar(XalanDOMChar c)
static bool isWhitespace(XalanDOMChar c)
static bool isDigit(XalanDOMChar c)