Xerces-C++ 3.3.0
XMLNumber.hpp
Go to the documentation of this file.
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$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XMLNUMBER_HPP)
23#define XERCESC_INCLUDE_GUARD_XMLNUMBER_HPP
24
25#include <xercesc/internal/XSerializable.hpp>
27
29
30class XMLUTIL_EXPORT XMLNumber : public XSerializable, public XMemory
31{
32public:
33
34 enum
35 {
36 LESS_THAN = -1,
37 EQUAL = 0,
38 GREATER_THAN = 1,
39 INDETERMINATE = 2
40 };
41
49
50 virtual ~XMLNumber();
51
59 virtual XMLCh* getRawData() const = 0;
60
68 virtual const XMLCh* getFormattedString() const = 0;
69
78 virtual int getSign() const = 0;
79
80 /***
81 * Support for Serialization/De-serialization
82 ***/
83 DECL_XSERIALIZABLE(XMLNumber)
84
85 static XMLNumber* loadNumber(XMLNumber::NumberType numType
86 , XSerializeEngine& serEng);
87
88protected:
89
92
93private:
94 // -----------------------------------------------------------------------
95 // Unimplemented operators
96 // -----------------------------------------------------------------------
97 XMLNumber& operator=(const XMLNumber&);
98};
99
101
102#endif
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XMLUTIL_EXPORT
Definition XercesDefs.hpp:162
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Definition XMLNumber.hpp:31
NumberType
Definition XMLNumber.hpp:42
@ DateTime
Definition XMLNumber.hpp:46
@ Float
Definition XMLNumber.hpp:43
@ Double
Definition XMLNumber.hpp:44
@ BigDecimal
Definition XMLNumber.hpp:45
virtual int getSign() const =0
Returns the sign of this number.
virtual const XMLCh * getFormattedString() const =0
Return the original and converted value of the original data.
virtual ~XMLNumber()
virtual XMLCh * getRawData() const =0
Return string representation of the decimal value.
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition XMemory.hpp:41