source: icXML/icXML-devel/src/xercesc/validators/datatype/FloatDatatypeValidator.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.9 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: FloatDatatypeValidator.hpp 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_FLOAT_DATATYPEVALIDATOR_HPP)
23#define XERCESC_INCLUDE_GUARD_FLOAT_DATATYPEVALIDATOR_HPP
24
25#include <xercesc/validators/datatype/AbstractNumericValidator.hpp>
26#include <xercesc/util/RefVectorOf.hpp>
27#include <xercesc/util/XMLFloat.hpp>
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31class VALIDATORS_EXPORT FloatDatatypeValidator : public AbstractNumericValidator
32{
33public:
34
35    // -----------------------------------------------------------------------
36    //  Public ctor/dtor
37    // -----------------------------------------------------------------------
38        /** @name Constructors and Destructor */
39    //@{
40    FloatDatatypeValidator
41    (
42        MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
43    );
44    FloatDatatypeValidator
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 ~FloatDatatypeValidator();
53
54        //@}
55
56    // -----------------------------------------------------------------------
57    // Compare methods
58    // -----------------------------------------------------------------------
59    /** @name Compare Function */
60    //@{
61
62    /**
63     * Compare two boolean data types
64     *
65     * @param content1
66     * @param content2
67     * @return
68     */
69    virtual int compare(const XMLCh* const, const XMLCh* const
70        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
71        );
72
73    //@}
74
75    /**
76      * Returns an instance of the base datatype validator class
77          * Used by the DatatypeValidatorFactory.
78      */
79    virtual DatatypeValidator* newInstance
80    (
81        RefHashTableOf<KVStringPair>* const facets
82        , RefArrayVectorOf<XMLCh>* const enums
83        , const int finalSet
84        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
85    );
86
87    /***
88     * Support for Serialization/De-serialization
89     ***/
90    DECL_XSERIALIZABLE(FloatDatatypeValidator)
91
92protected:
93
94    // -----------------------------------------------------------------------
95    // ctor provided to be used by derived classes
96    // -----------------------------------------------------------------------
97    FloatDatatypeValidator
98    (
99        DatatypeValidator* const baseValidator
100        , RefHashTableOf<KVStringPair>* const facets
101        , const int finalSet
102        , const ValidatorType type
103        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
104    );
105
106    // -----------------------------------------------------------------------
107    // Abstract interface from AbstractNumericFacetValidator
108    // -----------------------------------------------------------------------
109
110    virtual int  compareValues(const XMLNumber* const lValue
111                             , const XMLNumber* const rValue);
112
113    virtual void  setMaxInclusive(const XMLCh* const);
114
115    virtual void  setMaxExclusive(const XMLCh* const);
116
117    virtual void  setMinInclusive(const XMLCh* const);
118
119    virtual void  setMinExclusive(const XMLCh* const);
120
121    virtual void  setEnumeration(MemoryManager* const manager);
122
123// -----------------------------------------------------------------------
124// Abstract interface from AbstractNumericValidator
125// -----------------------------------------------------------------------
126
127    virtual void checkContent(const XMLCh*             const content
128                            ,       ValidationContext* const context
129                            , bool                           asBase
130                            ,       MemoryManager*     const manager);
131private:
132    // -----------------------------------------------------------------------
133    // Unimplemented constructors and operators
134    // -----------------------------------------------------------------------
135    FloatDatatypeValidator(const FloatDatatypeValidator&);
136    FloatDatatypeValidator& operator = (const  FloatDatatypeValidator&);
137};
138
139XERCES_CPP_NAMESPACE_END
140
141#endif
142
143/**
144  * End of file FloatDatatypeValidator.hpp
145  */
Note: See TracBrowser for help on using the repository browser.