source: NonGTP/Xerces/xercesc/internal/XObjectComparator.hpp @ 188

Revision 188, 13.7 KB checked in by mattausch, 19 years ago (diff)

added xercesc to support

Line 
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: XObjectComparator.hpp,v $
59 * Revision 1.2  2003/10/31 22:15:42  peiyongz
60 * dumpContent
61 *
62 * Revision 1.1  2003/10/29 16:14:15  peiyongz
63 * XObjectComparator/XTemplateComparator
64 *
65 * $Id: XObjectComparator.hpp,v 1.2 2003/10/31 22:15:42 peiyongz Exp $
66 *
67 */
68
69#if !defined(XOBJECT_COMPARATOR_HPP)
70#define XOBJECT_COMPARATOR_HPP
71
72#include <xercesc/framework/XMLNotationDecl.hpp>
73#include <xercesc/framework/XMLRefInfo.hpp>
74#include <xercesc/framework/XMLDTDDescription.hpp>
75#include <xercesc/framework/XMLSchemaDescription.hpp>
76
77#include <xercesc/internal/XMLGrammarPoolImpl.hpp>
78
79#include <xercesc/util/XMLNumber.hpp>
80#include <xercesc/util/KVStringPair.hpp>
81
82#include <xercesc/validators/common/ContentSpecNode.hpp>
83
84#include <xercesc/validators/DTD/DTDAttDef.hpp>
85#include <xercesc/validators/DTD/DTDAttDefList.hpp>
86#include <xercesc/validators/DTD/DTDElementDecl.hpp>
87#include <xercesc/validators/DTD/DTDEntityDecl.hpp>
88#include <xercesc/validators/DTD/DTDGrammar.hpp>
89
90#include <xercesc/validators/schema/SchemaAttDef.hpp>
91#include <xercesc/validators/schema/SchemaAttDefList.hpp>
92#include <xercesc/validators/schema/SchemaElementDecl.hpp>
93#include <xercesc/validators/schema/XercesGroupInfo.hpp>
94#include <xercesc/validators/schema/XercesAttGroupInfo.hpp>
95#include <xercesc/validators/schema/SchemaGrammar.hpp>
96
97#include <xercesc/validators/schema/identity/IC_Field.hpp>
98#include <xercesc/validators/schema/identity/IC_Selector.hpp>
99#include <xercesc/validators/schema/identity/IC_Key.hpp>
100#include <xercesc/validators/schema/identity/IC_KeyRef.hpp>
101#include <xercesc/validators/schema/identity/IC_Unique.hpp>
102#include <xercesc/validators/schema/identity/IdentityConstraint.hpp>
103#include <xercesc/validators/schema/identity/XercesXPath.hpp>
104
105XERCES_CPP_NAMESPACE_BEGIN
106
107class XMLUTIL_EXPORT XObjectComparator
108{
109public:
110
111/**********************************************************
112 *
113 * XMLGrammarPoolImpl
114 *
115 * Grammar
116 *
117 *   SchemaGrammar
118 *   DTDGrammar
119 *
120 ***********************************************************/   
121    static void dumpContent
122                (
123                    XMLGrammarPoolImpl* const
124                );
125
126    static bool isEquivalent
127                (
128                    XMLGrammarPoolImpl* const
129                  , XMLGrammarPoolImpl* const
130                );
131
132    static bool isEquivalent
133                (
134                    Grammar* const
135                  , Grammar* const
136                );
137
138    static bool isBaseEquivalent
139                (
140                    Grammar* const
141                  , Grammar* const
142                );
143
144    static bool isEquivalent
145                (
146                   SchemaGrammar* const
147                 , SchemaGrammar* const
148                );
149
150/**********************************************************
151 *
152 * XMLGrammarDescription
153 *
154 *   XMLSchemaDescription
155 *   XMLDTDDescription
156 *
157 ***********************************************************/   
158    static bool isEquivalent
159                (
160                    XMLSchemaDescription* const
161                  , XMLSchemaDescription* const
162                );
163
164    static bool isEquivalent
165                (
166                   XMLDTDDescription* const
167                 , XMLDTDDescription* const
168                );
169
170/**********************************************************
171 *
172 * XMLElementDecl
173 *   SchemaElementDecl
174 *   DTDElementDecl
175 *
176 ***********************************************************/   
177    static bool isBaseEquivalent
178                (
179                    XMLElementDecl* const
180                  , XMLElementDecl* const
181                );
182
183    static bool isEquivalent
184                (
185                   SchemaElementDecl* const
186                 , SchemaElementDecl* const
187                );
188
189    static bool isEquivalent
190                (
191                   DTDElementDecl* const
192                 , DTDElementDecl* const
193                );
194
195/**********************************************************
196 * XMLAttDef
197 *   SchemaAttDef
198 *   DTDAttDef
199 *
200***********************************************************/   
201    static bool isBaseEquivalent
202                (
203                   XMLAttDef* const
204                 , XMLAttDef* const
205                );
206
207    static bool isEquivalent
208                (
209                    SchemaAttDef* const
210                  , SchemaAttDef* const
211                );
212
213    static bool isEquivalent
214                (
215                    DTDAttDef* const
216                  , DTDAttDef* const
217                );
218
219/**********************************************************
220 * XMLAttDefList
221 *   SchemaAttDefList
222 *   DTDAttDefList
223 *
224***********************************************************/   
225    static bool isBaseEquivalent
226                (
227                   XMLAttDefList* const
228                 , XMLAttDefList* const
229                );
230   
231    static bool isEquivalent
232                (
233                    SchemaAttDefList* const
234                  , SchemaAttDefList* const
235                );
236
237    static bool isEquivalent
238                (
239                    DTDAttDefList* const
240                  , DTDAttDefList* const
241                );
242
243/**********************************************************
244 * XMLEntityDecl
245 *    DTDEntityDecl
246 *
247 ***********************************************************/   
248    static bool isBaseEquivalent
249                (
250                    XMLEntityDecl* const
251                  , XMLEntityDecl* const
252                );
253
254    static bool isEquivalent
255                (
256                    DTDEntityDecl* const
257                  , DTDEntityDecl* const
258                );
259
260/**********************************************************
261 * XMLNotationDecl
262 *
263 * DTDEntityDecl
264 *
265 * ComplexTypeInfo
266 * XercesGroupInfo
267 * XercesAttGroupInfo
268 ***********************************************************/   
269    static bool isEquivalent
270                (
271                    XMLNotationDecl* const
272                  , XMLNotationDecl* const
273                );
274   
275    static bool isEquivalent
276                (
277                    ComplexTypeInfo* const
278                  , ComplexTypeInfo* const
279                );
280
281    static bool isEquivalent
282                (
283                    XercesGroupInfo* const
284                  , XercesGroupInfo* const
285                );
286
287    static bool isEquivalent
288                (
289                    XercesAttGroupInfo* const
290                  , XercesAttGroupInfo* const
291                );
292
293/**********************************************************
294 *
295 * DatatypeValidator
296 *
297 *
298 * DatatypeValidatorFactory
299 *
300 ***********************************************************/   
301
302    static bool isEquivalent
303                (
304                   DatatypeValidator* const
305                 , DatatypeValidator* const
306                );
307
308    static bool isBaseEquivalent
309                (
310                   DatatypeValidator* const
311                 , DatatypeValidator* const
312                );
313
314    static bool isEquivalent
315                (
316                   DatatypeValidatorFactory* const
317                 , DatatypeValidatorFactory* const
318                );
319
320/**********************************************************
321 *
322 * ContentSpecNode
323 * QName
324 * KVStringPair
325 * XMLRefInfo
326 * XMLStringPool
327 *
328 ***********************************************************/   
329    static bool isEquivalent
330                (
331                   ContentSpecNode* const
332                 , ContentSpecNode* const
333                );
334
335    static bool isEquivalent
336                (
337                   QName* const
338                 , QName* const
339                );
340
341    static bool isEquivalent
342                (
343                   KVStringPair* const
344                 , KVStringPair* const
345                );
346
347    static bool isEquivalent
348                (
349                   XMLRefInfo* const
350                 , XMLRefInfo* const
351                );
352
353    static bool isEquivalent
354                (
355                   XMLStringPool* const
356                 , XMLStringPool* const
357                );
358
359/**********************************************************
360 *
361 * XercesNodeTest
362 * XercesStep
363 * XercesLocationPath
364 * XercesXPath
365 *
366***********************************************************/   
367    static bool isEquivalent
368                (
369                   XercesNodeTest* const
370                 , XercesNodeTest* const
371                );
372
373    static bool isEquivalent
374                (
375                   XercesStep* const
376                 , XercesStep* const
377                );
378
379    static bool isEquivalent
380                (
381                   XercesLocationPath* const
382                 , XercesLocationPath* const
383                );
384
385    static bool isEquivalent
386                (
387                   XercesXPath* const
388                 , XercesXPath* const
389                );
390
391/**********************************************************
392 *
393 * IC_Field
394 * IC_Selector
395 *
396 * IdentityConstraint
397 *   IC_Key
398 *   IC_KeyRef
399 *   IC_Unique
400 *
401 ***********************************************************/   
402    static bool isEquivalent
403                (
404                   IC_Field* const
405                 , IC_Field* const
406                );
407
408    static bool isEquivalent
409                (
410                   IC_Selector* const
411                 , IC_Selector* const
412                );
413
414    static bool isEquivalent
415                (
416                   IdentityConstraint* const
417                 , IdentityConstraint* const
418                );
419
420    static bool isBaseEquivalent
421                (
422                   IdentityConstraint* const
423                 , IdentityConstraint* const
424                );
425
426    static bool isEquivalent
427                (
428                   IC_Key* const
429                 , IC_Key* const
430                );
431
432    static bool isEquivalent
433                (
434                   IC_KeyRef* const
435                 , IC_KeyRef* const
436                );
437
438    static bool isEquivalent
439                (
440                   IC_Unique* const
441                 , IC_Unique* const
442                );
443
444/**********************************************************
445 * XMLNumber
446 *   XMLDouble
447 *   XMLFloat
448 *   XMLBigDecimal
449 *   XMLDateTime
450 *
451 ***********************************************************/   
452    static bool isEquivalent
453                (
454                   XMLNumber* const
455                 , XMLNumber* const
456                );
457
458private:
459    // -----------------------------------------------------------------------
460    //  Unimplemented constructors and operators
461    // -----------------------------------------------------------------------
462        ~XObjectComparator();
463    XObjectComparator();
464    XObjectComparator(const XObjectComparator&);
465        XObjectComparator& operator=(const XObjectComparator&);
466
467};
468
469XERCES_CPP_NAMESPACE_END
470
471#endif
Note: See TracBrowser for help on using the repository browser.