source: icXML/icXML-devel/src/xercesc/validators/datatype/IDDatatypeValidator.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.3 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: IDDatatypeValidator.hpp 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_ID_DATATYPEVALIDATOR_HPP)
23#define XERCESC_INCLUDE_GUARD_ID_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 IDDatatypeValidator : public StringDatatypeValidator
31{
32public:
33
34    // -----------------------------------------------------------------------
35    //  Public ctor/dtor
36    // -----------------------------------------------------------------------
37        /** @name Constructors and Destructor */
38    //@{
39
40    IDDatatypeValidator
41    (
42        MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
43    );
44    IDDatatypeValidator
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    virtual ~IDDatatypeValidator();
53
54        //@}
55
56    // -----------------------------------------------------------------------
57    // Validation methods
58    // -----------------------------------------------------------------------
59    /** @name Validation Function */
60    //@{
61
62    /**
63     * validate that a string matches the boolean datatype
64     * @param content A string containing the content to be validated
65     *
66     * @exception throws InvalidDatatypeException if the content is
67     * is not valid.
68     */
69
70        virtual void validate
71                 (
72                  const XMLCh*             const content
73                ,       ValidationContext* const context = 0
74                ,       MemoryManager*     const manager = XMLPlatformUtils::fgMemoryManager               
75                  );
76
77    /**
78      * Returns an instance of the base datatype validator class
79          * Used by the DatatypeValidatorFactory.
80      */
81    virtual DatatypeValidator* newInstance
82    (
83        RefHashTableOf<KVStringPair>* const facets
84        , RefArrayVectorOf<XMLCh>* const enums
85        , const int finalSet
86        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
87    );
88
89    //@}
90
91    /***
92     * Support for Serialization/De-serialization
93     ***/
94    DECL_XSERIALIZABLE(IDDatatypeValidator)
95
96protected:
97
98    //
99    // ctor provided to be used by derived classes
100    //
101    IDDatatypeValidator
102    (
103        DatatypeValidator*            const baseValidator
104        , RefHashTableOf<KVStringPair>* const facets
105        , const int                           finalSet
106        , const ValidatorType                 type
107        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
108    );
109
110    virtual void checkValueSpace(const XMLCh* const content
111                                , MemoryManager* const manager);
112
113private:
114    // -----------------------------------------------------------------------
115    //  Unimplemented constructors and operators
116    // -----------------------------------------------------------------------
117    IDDatatypeValidator(const IDDatatypeValidator&);
118    IDDatatypeValidator& operator=(const IDDatatypeValidator&);
119    // -----------------------------------------------------------------------
120    //  Private data members
121    //
122    //
123    // -----------------------------------------------------------------------
124};
125
126XERCES_CPP_NAMESPACE_END
127
128#endif
129/**
130  * End of file IDDatatypeValidator.hpp
131  */
132
Note: See TracBrowser for help on using the repository browser.