1 | /*
|
---|
2 | * The Apache Software License, Version 1.1
|
---|
3 | *
|
---|
4 | * Copyright (c) 2003 The Apache Software Foundation. All rights
|
---|
5 | * reserved.
|
---|
6 | *
|
---|
7 | * Redistribution and use in source and binary forms, with or without
|
---|
8 | * modification, are permitted provided that the following conditions
|
---|
9 | * are met:
|
---|
10 | *
|
---|
11 | * 1. Redistributions of source code must retain the above copyright
|
---|
12 | * notice, this list of conditions and the following disclaimer.
|
---|
13 | *
|
---|
14 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
15 | * notice, this list of conditions and the following disclaimer in
|
---|
16 | * the documentation and/or other materials provided with the
|
---|
17 | * distribution.
|
---|
18 | *
|
---|
19 | * 3. The end-user documentation included with the redistribution,
|
---|
20 | * if any, must include the following acknowledgment:
|
---|
21 | * "This product includes software developed by the
|
---|
22 | * Apache Software Foundation (http://www.apache.org/)."
|
---|
23 | * Alternately, this acknowledgment may appear in the software itself,
|
---|
24 | * if and wherever such third-party acknowledgments normally appear.
|
---|
25 | *
|
---|
26 | * 4. The names "Xerces" and "Apache Software Foundation" must
|
---|
27 | * not be used to endorse or promote products derived from this
|
---|
28 | * software without prior written permission. For written
|
---|
29 | * permission, please contact apache\@apache.org.
|
---|
30 | *
|
---|
31 | * 5. Products derived from this software may not be called "Apache",
|
---|
32 | * nor may "Apache" appear in their name, without prior written
|
---|
33 | * permission of the Apache Software Foundation.
|
---|
34 | *
|
---|
35 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
---|
36 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
37 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
---|
38 | * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
---|
39 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
---|
40 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
---|
41 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
---|
42 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
---|
43 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
---|
44 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
---|
45 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
46 | * SUCH DAMAGE.
|
---|
47 | * ====================================================================
|
---|
48 | *
|
---|
49 | * This software consists of voluntary contributions made by many
|
---|
50 | * individuals on behalf of the Apache Software Foundation, and was
|
---|
51 | * originally based on software copyright (c) 1999, International
|
---|
52 | * Business Machines, Inc., http://www.ibm.com . For more information
|
---|
53 | * on the Apache Software Foundation, please see
|
---|
54 | * <http://www.apache.org/>.
|
---|
55 | */
|
---|
56 |
|
---|
57 | /*
|
---|
58 | * $Log: XTemplateComparator.hpp,v $
|
---|
59 | * Revision 1.1 2003/10/29 16:14:15 peiyongz
|
---|
60 | * XObjectComparator/XTemplateComparator
|
---|
61 | *
|
---|
62 | * $Id: XTemplateComparator.hpp,v 1.1 2003/10/29 16:14:15 peiyongz Exp $
|
---|
63 | *
|
---|
64 | */
|
---|
65 |
|
---|
66 | #if !defined(XTEMPLATE_COMPARATOR_HPP)
|
---|
67 | #define XTEMPLATE_COMPARATOR_HPP
|
---|
68 |
|
---|
69 | #include <xercesc/util/ValueVectorOf.hpp>
|
---|
70 | #include <xercesc/util/RefArrayVectorOf.hpp>
|
---|
71 | #include <xercesc/util/RefVectorOf.hpp>
|
---|
72 | #include <xercesc/util/RefHashTableOf.hpp>
|
---|
73 | #include <xercesc/util/RefHash2KeysTableOf.hpp>
|
---|
74 | #include <xercesc/util/RefHash3KeysIdPool.hpp>
|
---|
75 | #include <xercesc/util/NameIdPool.hpp>
|
---|
76 |
|
---|
77 | #include <xercesc/framework/XMLNotationDecl.hpp>
|
---|
78 | #include <xercesc/framework/XMLRefInfo.hpp>
|
---|
79 | #include <xercesc/util/XMLNumber.hpp>
|
---|
80 | #include <xercesc/validators/common/ContentSpecNode.hpp>
|
---|
81 | #include <xercesc/validators/DTD/DTDAttDef.hpp>
|
---|
82 | #include <xercesc/validators/DTD/DTDElementDecl.hpp>
|
---|
83 | #include <xercesc/validators/DTD/DTDEntityDecl.hpp>
|
---|
84 | #include <xercesc/validators/schema/SchemaAttDef.hpp>
|
---|
85 | #include <xercesc/validators/schema/SchemaElementDecl.hpp>
|
---|
86 | #include <xercesc/validators/schema/XercesGroupInfo.hpp>
|
---|
87 | #include <xercesc/validators/schema/XercesAttGroupInfo.hpp>
|
---|
88 | #include <xercesc/validators/schema/SchemaGrammar.hpp>
|
---|
89 | #include <xercesc/validators/schema/identity/IC_Field.hpp>
|
---|
90 | #include <xercesc/validators/schema/identity/IdentityConstraint.hpp>
|
---|
91 | #include <xercesc/validators/schema/identity/XercesXPath.hpp>
|
---|
92 |
|
---|
93 | XERCES_CPP_NAMESPACE_BEGIN
|
---|
94 |
|
---|
95 | class XMLUTIL_EXPORT XTemplateComparator
|
---|
96 | {
|
---|
97 | public:
|
---|
98 |
|
---|
99 | /**********************************************************
|
---|
100 | *
|
---|
101 | * ValueVectorOf
|
---|
102 | *
|
---|
103 | * SchemaElementDecl*
|
---|
104 | * unsigned int
|
---|
105 | *
|
---|
106 | ***********************************************************/
|
---|
107 | static bool isEquivalent(
|
---|
108 | ValueVectorOf<SchemaElementDecl*>* const lValue
|
---|
109 | , ValueVectorOf<SchemaElementDecl*>* const rValue
|
---|
110 | );
|
---|
111 |
|
---|
112 | static bool isEquivalent(
|
---|
113 | ValueVectorOf<unsigned int>* const lValue
|
---|
114 | , ValueVectorOf<unsigned int>* const rValue
|
---|
115 | );
|
---|
116 |
|
---|
117 | /**********************************************************
|
---|
118 | *
|
---|
119 | * RefArrayVectorOf
|
---|
120 | *
|
---|
121 | * XMLCh
|
---|
122 | *
|
---|
123 | ***********************************************************/
|
---|
124 | static bool isEquivalent(
|
---|
125 | RefArrayVectorOf<XMLCh>* const lValue
|
---|
126 | , RefArrayVectorOf<XMLCh>* const rValue
|
---|
127 | );
|
---|
128 |
|
---|
129 | /**********************************************************
|
---|
130 | *
|
---|
131 | * RefVectorOf
|
---|
132 | *
|
---|
133 | * SchemaAttDef
|
---|
134 | * SchemaElementDecl
|
---|
135 | * ContentSpecNode
|
---|
136 | * IC_Field
|
---|
137 | * DatatypeValidator
|
---|
138 | * IdentityConstraint
|
---|
139 | * XMLNumber
|
---|
140 | * XercesLocationPath
|
---|
141 | * XercesStep
|
---|
142 | *
|
---|
143 | ***********************************************************/
|
---|
144 | static bool isEquivalent(
|
---|
145 | RefVectorOf<SchemaAttDef>* const lValue
|
---|
146 | , RefVectorOf<SchemaAttDef>* const rValue
|
---|
147 | );
|
---|
148 |
|
---|
149 | static bool isEquivalent(
|
---|
150 | RefVectorOf<SchemaElementDecl>* const lValue
|
---|
151 | , RefVectorOf<SchemaElementDecl>* const rValue
|
---|
152 | );
|
---|
153 |
|
---|
154 | static bool isEquivalent(
|
---|
155 | RefVectorOf<ContentSpecNode>* const lValue
|
---|
156 | , RefVectorOf<ContentSpecNode>* const rValue
|
---|
157 | );
|
---|
158 |
|
---|
159 | static bool isEquivalent(
|
---|
160 | RefVectorOf<IC_Field>* const lValue
|
---|
161 | , RefVectorOf<IC_Field>* const rValue
|
---|
162 | );
|
---|
163 |
|
---|
164 | static bool isEquivalent(
|
---|
165 | RefVectorOf<DatatypeValidator>* const lValue
|
---|
166 | , RefVectorOf<DatatypeValidator>* const rValue
|
---|
167 | );
|
---|
168 |
|
---|
169 | static bool isEquivalent(
|
---|
170 | RefVectorOf<IdentityConstraint>* const lValue
|
---|
171 | , RefVectorOf<IdentityConstraint>* const rValue
|
---|
172 | );
|
---|
173 |
|
---|
174 | static bool isEquivalent(
|
---|
175 | RefVectorOf<XMLNumber>* const lValue
|
---|
176 | , RefVectorOf<XMLNumber>* const rValue
|
---|
177 | );
|
---|
178 |
|
---|
179 | static bool isEquivalent(
|
---|
180 | RefVectorOf<XercesLocationPath>* const lValue
|
---|
181 | , RefVectorOf<XercesLocationPath>* const rValue
|
---|
182 | );
|
---|
183 |
|
---|
184 | static bool isEquivalent(
|
---|
185 | RefVectorOf<XercesStep>* const lValue
|
---|
186 | , RefVectorOf<XercesStep>* const rValue
|
---|
187 | );
|
---|
188 |
|
---|
189 | /**********************************************************
|
---|
190 | *
|
---|
191 | * RefHashTableOf
|
---|
192 | *
|
---|
193 | * KVStringPair
|
---|
194 | * XMLAttDef
|
---|
195 | * DTDAttDef
|
---|
196 | * ComplexTypeInfo
|
---|
197 | * XercesGroupInfo
|
---|
198 | * XercesAttGroupInfo
|
---|
199 | * XMLRefInfo
|
---|
200 | * DatatypeValidator
|
---|
201 | * Grammar
|
---|
202 | *
|
---|
203 | ***********************************************************/
|
---|
204 | static bool isEquivalent(
|
---|
205 | RefHashTableOf<KVStringPair>* const lValue
|
---|
206 | , RefHashTableOf<KVStringPair>* const rValue
|
---|
207 | );
|
---|
208 |
|
---|
209 | static bool isEquivalent(
|
---|
210 | RefHashTableOf<XMLAttDef>* const lValue
|
---|
211 | , RefHashTableOf<XMLAttDef>* const rValue
|
---|
212 | );
|
---|
213 |
|
---|
214 | static bool isEquivalent(
|
---|
215 | RefHashTableOf<DTDAttDef>* const lValue
|
---|
216 | , RefHashTableOf<DTDAttDef>* const rValue
|
---|
217 | );
|
---|
218 |
|
---|
219 | static bool isEquivalent(
|
---|
220 | RefHashTableOf<ComplexTypeInfo>* const lValue
|
---|
221 | , RefHashTableOf<ComplexTypeInfo>* const rValue
|
---|
222 | );
|
---|
223 |
|
---|
224 | static bool isEquivalent(
|
---|
225 | RefHashTableOf<XercesGroupInfo>* const lValue
|
---|
226 | , RefHashTableOf<XercesGroupInfo>* const rValue
|
---|
227 | );
|
---|
228 |
|
---|
229 | static bool isEquivalent(
|
---|
230 | RefHashTableOf<XercesAttGroupInfo>* const lValue
|
---|
231 | , RefHashTableOf<XercesAttGroupInfo>* const rValue
|
---|
232 | );
|
---|
233 |
|
---|
234 | static bool isEquivalent(
|
---|
235 | RefHashTableOf<XMLRefInfo>* const lValue
|
---|
236 | , RefHashTableOf<XMLRefInfo>* const rValue
|
---|
237 | );
|
---|
238 |
|
---|
239 | static bool isEquivalent(
|
---|
240 | RefHashTableOf<DatatypeValidator>* const lValue
|
---|
241 | , RefHashTableOf<DatatypeValidator>* const rValue
|
---|
242 | );
|
---|
243 |
|
---|
244 | static bool isEquivalent(
|
---|
245 | RefHashTableOf<Grammar>* const lValue
|
---|
246 | , RefHashTableOf<Grammar>* const rValue
|
---|
247 | );
|
---|
248 |
|
---|
249 | /**********************************************************
|
---|
250 | *
|
---|
251 | * RefHash2KeysTableOf
|
---|
252 | *
|
---|
253 | * SchemaAttDef
|
---|
254 | * ElemVector
|
---|
255 | *
|
---|
256 | ***********************************************************/
|
---|
257 | static bool isEquivalent(
|
---|
258 | RefHash2KeysTableOf<SchemaAttDef>* const lValue
|
---|
259 | , RefHash2KeysTableOf<SchemaAttDef>* const rValue
|
---|
260 | );
|
---|
261 |
|
---|
262 | static bool isEquivalent(
|
---|
263 | RefHash2KeysTableOf<ElemVector>* const lValue
|
---|
264 | , RefHash2KeysTableOf<ElemVector>* const rValue
|
---|
265 | );
|
---|
266 |
|
---|
267 | /**********************************************************
|
---|
268 | *
|
---|
269 | * RefHash3KeysIdPool
|
---|
270 | *
|
---|
271 | * SchemaElementDecl
|
---|
272 | *
|
---|
273 | ***********************************************************/
|
---|
274 | static bool isEquivalent(
|
---|
275 | RefHash3KeysIdPool<SchemaElementDecl>* const lop
|
---|
276 | , RefHash3KeysIdPool<SchemaElementDecl>* const rop
|
---|
277 | );
|
---|
278 |
|
---|
279 |
|
---|
280 | /**********************************************************
|
---|
281 | *
|
---|
282 | * NameIdPool
|
---|
283 | *
|
---|
284 | * DTDElementDecl
|
---|
285 | * DTDEntityDecl
|
---|
286 | * XMLNotationDecl
|
---|
287 | *
|
---|
288 | ***********************************************************/
|
---|
289 | static bool isEquivalent(
|
---|
290 | NameIdPool<DTDElementDecl>* const lValue
|
---|
291 | , NameIdPool<DTDElementDecl>* const rValue
|
---|
292 | );
|
---|
293 |
|
---|
294 | static bool isEquivalent(
|
---|
295 | NameIdPool<DTDEntityDecl>* const lValue
|
---|
296 | , NameIdPool<DTDEntityDecl>* const rValue
|
---|
297 | );
|
---|
298 |
|
---|
299 | static bool isEquivalent(
|
---|
300 | NameIdPool<XMLNotationDecl>* const lValue
|
---|
301 | , NameIdPool<XMLNotationDecl>* const rValue
|
---|
302 | );
|
---|
303 |
|
---|
304 | private:
|
---|
305 | // -----------------------------------------------------------------------
|
---|
306 | // Unimplemented constructors and operators
|
---|
307 | // -----------------------------------------------------------------------
|
---|
308 | ~XTemplateComparator();
|
---|
309 | XTemplateComparator();
|
---|
310 | XTemplateComparator(const XTemplateComparator&);
|
---|
311 | XTemplateComparator& operator=(const XTemplateComparator&);
|
---|
312 |
|
---|
313 | };
|
---|
314 |
|
---|
315 | XERCES_CPP_NAMESPACE_END
|
---|
316 |
|
---|
317 | #endif
|
---|