Xerces-C++ 3.1.2

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

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: XMLNumber.hpp 527149 2007-04-10 14:56:39Z amassari $
20 */
21
22 #if !defined(XERCESC_INCLUDE_GUARD_XMLNUMBER_HPP)
23 #define XERCESC_INCLUDE_GUARD_XMLNUMBER_HPP
24
25 #include <xercesc/internal/XSerializable.hpp>
26 #include <xercesc/util/XMemory.hpp>
27
28 XERCES_CPP_NAMESPACE_BEGIN
29
30 class XMLUTIL_EXPORT XMLNumber : public XSerializable, public XMemory
31 {
32 public:
33
34 enum
35 {
36 LESS_THAN = -1,
37 EQUAL = 0,
38 GREATER_THAN = 1,
39 INDETERMINATE = 2
40 };
41
42 enum NumberType {
43 Float,
44 Double,
45 BigDecimal,
46 DateTime,
47 UnKnown
48 };
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
88 protected:
89
90 XMLNumber();
91 XMLNumber(const XMLNumber&);
92
93 private:
94 // -----------------------------------------------------------------------
95 // Unimplemented operators
96 // -----------------------------------------------------------------------
97 XMLNumber& operator=(const XMLNumber&);
98 };
99
100 XERCES_CPP_NAMESPACE_END
101
102 #endif
XMLNumber::Float
Definition: XMLNumber.hpp:43
XMemory
This class makes it possible to override the C++ memory management by adding new/delete operators to ...
Definition: XMemory.hpp:40
XMLNumber::DateTime
Definition: XMLNumber.hpp:46
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XMLCh
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
XMLNumber::NumberType
NumberType
Definition: XMLNumber.hpp:42
XMLNumber
Definition: XMLNumber.hpp:30
XMLUTIL_EXPORT
#define XMLUTIL_EXPORT
Definition: XercesDefs.hpp:162
XMLNumber::BigDecimal
Definition: XMLNumber.hpp:45
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XMLNumber::Double
Definition: XMLNumber.hpp:44
XMemory.hpp