source: icXML/icXML-devel/src/xercesc/validators/datatype/IDREFDatatypeValidator.hpp @ 2722

Last change on this file since 2722 was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 4.2 KB
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 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_IDREF_DATATYPEVALIDATOR_HPP)
23#define XERCESC_INCLUDE_GUARD_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    /***
93     * Support for Serialization/De-serialization
94     ***/
95    DECL_XSERIALIZABLE(IDREFDatatypeValidator)
96
97protected:
98
99    //
100    // ctor provided to be used by derived classes
101    //
102    IDREFDatatypeValidator
103    (
104        DatatypeValidator* const baseValidator
105        , RefHashTableOf<KVStringPair>* const facets
106        , const int finalSet
107        , const ValidatorType type
108        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
109    );
110
111    virtual void checkValueSpace(const XMLCh* const content
112                                , MemoryManager* const manager);
113
114private:
115    // -----------------------------------------------------------------------
116    //  Unimplemented constructors and operators
117    // -----------------------------------------------------------------------
118    IDREFDatatypeValidator(const IDREFDatatypeValidator&);
119    IDREFDatatypeValidator& operator=(const IDREFDatatypeValidator&);
120
121    // -----------------------------------------------------------------------
122    //  Private data members
123    //
124    //
125    // -----------------------------------------------------------------------
126
127};
128
129XERCES_CPP_NAMESPACE_END
130
131#endif
132
133/**
134  * End of file IDREFDatatypeValidator.hpp
135  */
Note: See TracBrowser for help on using the repository browser.