source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/validators/datatype/IDREFDatatypeValidator.hpp @ 2674

Revision 2674, 4.5 KB checked in by mattausch, 16 years ago (diff)
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: IDREFDatatypeValidator.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22#if !defined(IDREF_DATATYPEVALIDATOR_HPP)
23#define IDREF_DATATYPEVALIDATOR_HPP
24
25#include <xercesc/validators/datatype/StringDatatypeValidator.hpp>
26#include <xercesc/framework/XMLRefInfo.hpp>
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30class VALIDATORS_EXPORT IDREFDatatypeValidator : public StringDatatypeValidator
31{
32public:
33
34    // -----------------------------------------------------------------------
35    //  Public ctor/dtor
36    // -----------------------------------------------------------------------
37        /** @name Constructors and Destructor */
38    //@{
39
40    IDREFDatatypeValidator
41    (
42        MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
43    );
44    IDREFDatatypeValidator
45    (
46        DatatypeValidator* const baseValidator
47        , RefHashTableOf<KVStringPair>* const facets
48        , RefArrayVectorOf<XMLCh>* const enums
49        , const int finalSet
50        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
51    );
52
53    virtual ~IDREFDatatypeValidator();
54
55        //@}
56
57    // -----------------------------------------------------------------------
58    // Validation methods
59    // -----------------------------------------------------------------------
60    /** @name Validation Function */
61    //@{
62
63    /**
64     * validate that a string matches the boolean datatype
65     * @param content A string containing the content to be validated
66     *
67     * @exception throws InvalidDatatypeException if the content is
68     * is not valid.
69     */
70
71        virtual void validate
72                 (
73                  const XMLCh*             const content
74                ,       ValidationContext* const context = 0
75                ,       MemoryManager*     const manager = XMLPlatformUtils::fgMemoryManager
76                  );
77
78    //@}
79
80    /**
81      * Returns an instance of the base datatype validator class
82          * Used by the DatatypeValidatorFactory.
83      */
84    virtual DatatypeValidator* newInstance
85    (
86        RefHashTableOf<KVStringPair>* const facets
87        , RefArrayVectorOf<XMLCh>* const enums
88        , const int finalSet
89        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
90    );
91
92    //deprecated
93    inline void setIDRefList(RefHashTableOf<XMLRefInfo>* fIDRefList);
94
95    /***
96     * Support for Serialization/De-serialization
97     ***/
98    DECL_XSERIALIZABLE(IDREFDatatypeValidator)
99
100protected:
101
102    //
103    // ctor provided to be used by derived classes
104    //
105    IDREFDatatypeValidator
106    (
107        DatatypeValidator* const baseValidator
108        , RefHashTableOf<KVStringPair>* const facets
109        , const int finalSet
110        , const ValidatorType type
111        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
112    );
113
114    virtual void checkValueSpace(const XMLCh* const content
115                                , MemoryManager* const manager);
116
117private:
118    // -----------------------------------------------------------------------
119    //  Unimplemented constructors and operators
120    // -----------------------------------------------------------------------
121    IDREFDatatypeValidator(const IDREFDatatypeValidator&);
122    IDREFDatatypeValidator& operator=(const IDREFDatatypeValidator&);
123
124    // -----------------------------------------------------------------------
125    //  Private data members
126    //
127    //
128    // -----------------------------------------------------------------------
129
130};
131
132// -----------------------------------------------------------------------
133// Validation methods
134// -----------------------------------------------------------------------
135inline void IDREFDatatypeValidator::setIDRefList(RefHashTableOf<XMLRefInfo>* )
136{
137}
138
139XERCES_CPP_NAMESPACE_END
140
141#endif
142
143/**
144  * End of file IDREFDatatypeValidator.hpp
145  */
Note: See TracBrowser for help on using the repository browser.