source: obsolete/tags/VUT/0.4/GtpVisibilityPreprocessor/support/xerces/include/xercesc/validators/datatype/IDREFDatatypeValidator.hpp @ 358

Revision 358, 6.3 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 1999-2001,2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * $Id: IDREFDatatypeValidator.hpp,v 1.9 2004/09/08 13:56:53 peiyongz Exp $
19 * $Log: IDREFDatatypeValidator.hpp,v $
20 * Revision 1.9  2004/09/08 13:56:53  peiyongz
21 * Apache License Version 2.0
22 *
23 * Revision 1.8  2004/01/29 11:51:22  cargilld
24 * Code cleanup changes to get rid of various compiler diagnostic messages.
25 *
26 * Revision 1.7  2003/12/17 00:18:39  cargilld
27 * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.
28 *
29 * Revision 1.6  2003/11/12 20:32:03  peiyongz
30 * Statless Grammar: ValidationContext
31 *
32 * Revision 1.5  2003/09/30 18:17:53  peiyongz
33 * Implementation of Serialization/Deserialization
34 *
35 * Revision 1.4  2003/05/15 18:53:26  knoaman
36 * Partial implementation of the configurable memory manager.
37 *
38 * Revision 1.3  2002/12/18 14:17:55  gareth
39 * Fix to bug #13438. When you eant a vector that calls delete[] on its members you should use RefArrayVectorOf.
40 *
41 * Revision 1.2  2002/11/04 14:53:28  tng
42 * C++ Namespace Support.
43 *
44 * Revision 1.1.1.1  2002/02/01 22:22:41  peiyongz
45 * sane_include
46 *
47 * Revision 1.8  2001/11/22 20:23:20  peiyongz
48 * _declspec(dllimport) and inline warning C4273
49 *
50 * Revision 1.7  2001/10/09 20:49:38  peiyongz
51 * init(): take 1 arg
52 *
53 * Revision 1.6  2001/09/27 13:51:25  peiyongz
54 * DTV Reorganization: ctor/init created to be used by derived class
55 *
56 * Revision 1.5  2001/09/25 14:23:42  peiyongz
57 * DTV Reorganization: checkValueSpace()
58 *
59 * Revision 1.4  2001/08/24 17:12:01  knoaman
60 * Add support for anySimpleType.
61 * Remove parameter 'baseValidator' from the virtual method 'newInstance'.
62 *
63 * Revision 1.3  2001/07/25 17:58:08  tng
64 * Fix compilation errors.
65 *
66 * Revision 1.2  2001/07/24 21:23:40  tng
67 * Schema: Use DatatypeValidator for ID/IDREF/ENTITY/ENTITIES/NOTATION.
68 *
69 * Revision 1.1  2001/07/04 20:16:59  peiyongz
70 * IDREFDatatypeValidator
71 *
72 */
73
74#if !defined(IDREF_DATATYPEVALIDATOR_HPP)
75#define IDREF_DATATYPEVALIDATOR_HPP
76
77#include <xercesc/validators/datatype/StringDatatypeValidator.hpp>
78#include <xercesc/framework/XMLRefInfo.hpp>
79
80XERCES_CPP_NAMESPACE_BEGIN
81
82class VALIDATORS_EXPORT IDREFDatatypeValidator : public StringDatatypeValidator
83{
84public:
85
86    // -----------------------------------------------------------------------
87    //  Public ctor/dtor
88    // -----------------------------------------------------------------------
89        /** @name Constructors and Destructor */
90    //@{
91
92    IDREFDatatypeValidator
93    (
94        MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
95    );
96    IDREFDatatypeValidator
97    (
98        DatatypeValidator* const baseValidator
99        , RefHashTableOf<KVStringPair>* const facets
100        , RefArrayVectorOf<XMLCh>* const enums
101        , const int finalSet
102        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
103    );
104
105    virtual ~IDREFDatatypeValidator();
106
107        //@}
108
109    // -----------------------------------------------------------------------
110    // Validation methods
111    // -----------------------------------------------------------------------
112    /** @name Validation Function */
113    //@{
114
115    /**
116     * validate that a string matches the boolean datatype
117     * @param content A string containing the content to be validated
118     *
119     * @exception throws InvalidDatatypeException if the content is
120     * is not valid.
121     */
122
123        virtual void validate
124                 (
125                  const XMLCh*             const content
126                ,       ValidationContext* const context = 0
127                ,       MemoryManager*     const manager = XMLPlatformUtils::fgMemoryManager
128                  );
129
130    //@}
131
132    /**
133      * Returns an instance of the base datatype validator class
134          * Used by the DatatypeValidatorFactory.
135      */
136    virtual DatatypeValidator* newInstance
137    (
138        RefHashTableOf<KVStringPair>* const facets
139        , RefArrayVectorOf<XMLCh>* const enums
140        , const int finalSet
141        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
142    );
143
144    //deprecated
145    inline void setIDRefList(RefHashTableOf<XMLRefInfo>* fIDRefList);
146
147    /***
148     * Support for Serialization/De-serialization
149     ***/
150    DECL_XSERIALIZABLE(IDREFDatatypeValidator)
151
152protected:
153
154    //
155    // ctor provided to be used by derived classes
156    //
157    IDREFDatatypeValidator
158    (
159        DatatypeValidator* const baseValidator
160        , RefHashTableOf<KVStringPair>* const facets
161        , const int finalSet
162        , const ValidatorType type
163        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
164    );
165
166    virtual void checkValueSpace(const XMLCh* const content
167                                , MemoryManager* const manager);
168
169private:
170    // -----------------------------------------------------------------------
171    //  Unimplemented constructors and operators
172    // -----------------------------------------------------------------------
173    IDREFDatatypeValidator(const IDREFDatatypeValidator&);
174    IDREFDatatypeValidator& operator=(const IDREFDatatypeValidator&);
175
176    // -----------------------------------------------------------------------
177    //  Private data members
178    //
179    //
180    // -----------------------------------------------------------------------
181
182};
183
184// -----------------------------------------------------------------------
185// Validation methods
186// -----------------------------------------------------------------------
187inline void IDREFDatatypeValidator::setIDRefList(RefHashTableOf<XMLRefInfo>* )
188{
189}
190
191XERCES_CPP_NAMESPACE_END
192
193#endif
194
195/**
196  * End of file IDREFDatatypeValidator.hpp
197  */
Note: See TracBrowser for help on using the repository browser.