source: trunk/VUT/GtpVisibilityPreprocessor/support/xerces/include/xercesc/validators/datatype/NCNameDatatypeValidator.hpp @ 358

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

xerces added

Line 
1/*
2 * Copyright 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: NCNameDatatypeValidator.hpp,v 1.9 2004/09/08 13:56:53 peiyongz Exp $
19 * $Log: NCNameDatatypeValidator.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:42  peiyongz
45 * sane_include
46 *
47 * Revision 1.3  2001/10/09 20:49:09  peiyongz
48 * init(): take 1 arg
49 *
50 * Revision 1.2  2001/09/27 13:51:25  peiyongz
51 * DTV Reorganization: ctor/init created to be used by derived class
52 *
53 * Revision 1.1  2001/09/25 15:58:45  peiyongz
54 * DTV Reorganization: new class
55 *
56 */
57
58#if !defined(NCNAME_DATATYPEVALIDATOR_HPP)
59#define NCNAME_DATATYPEVALIDATOR_HPP
60
61#include <xercesc/validators/datatype/StringDatatypeValidator.hpp>
62
63XERCES_CPP_NAMESPACE_BEGIN
64
65class VALIDATORS_EXPORT NCNameDatatypeValidator : public StringDatatypeValidator
66{
67public:
68
69    // -----------------------------------------------------------------------
70    //  Public ctor/dtor
71    // -----------------------------------------------------------------------
72        /** @name Constructors and Destructor */
73    //@{
74
75    NCNameDatatypeValidator
76    (
77        MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
78    );
79    NCNameDatatypeValidator
80    (
81        DatatypeValidator* const baseValidator
82        , RefHashTableOf<KVStringPair>* const facets
83        , RefArrayVectorOf<XMLCh>* const enums
84        , const int finalSet
85        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
86    );
87
88    virtual ~NCNameDatatypeValidator();
89
90        //@}
91
92    // -----------------------------------------------------------------------
93    // Validation methods
94    // -----------------------------------------------------------------------
95    /** @name Validation Function */
96    //@{
97
98    /**
99     * validate that a string matches the boolean datatype
100     * @param content A string containing the content to be validated
101     *
102     * @exception throws InvalidDatatypeException if the content is
103     * is not valid.
104     */
105
106        virtual void validate
107                 (
108                  const XMLCh*             const content
109                ,       ValidationContext* const context = 0
110                ,       MemoryManager*     const manager = XMLPlatformUtils::fgMemoryManager
111                  );
112
113    //@}
114
115    // -----------------------------------------------------------------------
116    // Compare methods
117    // -----------------------------------------------------------------------
118    /** @name Compare Function */
119    //@{
120
121    /**
122     * Compare two boolean data types
123     *
124     * @param content1
125     * @param content2
126     * @return
127     */
128    virtual int compare(const XMLCh* const, const XMLCh* const
129        ,       MemoryManager*     const manager = XMLPlatformUtils::fgMemoryManager);
130
131    //@}
132
133    /**
134      * Returns an instance of the base datatype validator class
135          * Used by the DatatypeValidatorFactory.
136      */
137    virtual DatatypeValidator* newInstance
138    (
139        RefHashTableOf<KVStringPair>* const facets
140        , RefArrayVectorOf<XMLCh>* const enums
141        , const int finalSet
142        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
143    );
144
145    /***
146     * Support for Serialization/De-serialization
147     ***/
148    DECL_XSERIALIZABLE(NCNameDatatypeValidator)
149
150protected:
151
152    //
153    // ctor provided to be used by derived classes
154    //
155    NCNameDatatypeValidator
156    (
157        DatatypeValidator* const baseValidator
158        , RefHashTableOf<KVStringPair>* const facets
159        , const int finalSet
160        , const ValidatorType type
161        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
162    );
163
164    virtual void checkValueSpace(const XMLCh* const content
165        , MemoryManager* const manager);
166
167private:
168    // -----------------------------------------------------------------------
169    //  Unimplemented constructors and operators
170    // -----------------------------------------------------------------------
171    NCNameDatatypeValidator(const NCNameDatatypeValidator&);
172    NCNameDatatypeValidator& operator=(const NCNameDatatypeValidator&);
173    // -----------------------------------------------------------------------
174    //  Private data members
175    //
176        //             
177    // -----------------------------------------------------------------------
178
179};
180
181XERCES_CPP_NAMESPACE_END
182
183#endif
184
185/**
186  * End of file NCNameDatatypeValidator.hpp
187  */
188
Note: See TracBrowser for help on using the repository browser.