Xerces-C++
3.2.2
xercesc
util
XMLBigDecimal.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: XMLBigDecimal.hpp 932889 2010-04-11 13:10:10Z borisk $
20
*/
21
22
#if !defined(XERCESC_INCLUDE_GUARD_XML_BIGDECIMAL_HPP)
23
#define XERCESC_INCLUDE_GUARD_XML_BIGDECIMAL_HPP
24
25
#include <
xercesc/util/XMLNumber.hpp
>
26
#include <
xercesc/util/XMLString.hpp
>
27
#include <
xercesc/util/PlatformUtils.hpp
>
28
29
XERCES_CPP_NAMESPACE_BEGIN
30
31
class
XMLUTIL_EXPORT
XMLBigDecimal
:
public
XMLNumber
32
{
33
public
:
34
47
XMLBigDecimal
48
(
49
const
XMLCh
*
const
strValue
50
,
MemoryManager
*
const
manager =
XMLPlatformUtils::fgMemoryManager
51
);
52
53
~
XMLBigDecimal
();
54
55
static
int
compareValues(
const
XMLBigDecimal
*
const
lValue
56
,
const
XMLBigDecimal
*
const
rValue
57
,
MemoryManager
*
const
manager =
XMLPlatformUtils::fgMemoryManager
);
58
59
static
XMLCh
* getCanonicalRepresentation
60
(
61
const
XMLCh
*
const
rawData
62
,
MemoryManager
*
const
memMgr =
XMLPlatformUtils::fgMemoryManager
63
);
64
65
static
void
parseDecimal
66
(
67
const
XMLCh
*
const
toParse
68
,
XMLCh
*
const
retBuffer
69
,
int
& sign
70
,
int
& totalDigits
71
,
int
& fractDigits
72
,
MemoryManager
*
const
manager
73
);
74
75
static
void
parseDecimal
76
(
77
const
XMLCh
*
const
toParse
78
,
MemoryManager
*
const
manager
79
);
80
81
virtual
XMLCh
*
getRawData
()
const
;
82
83
virtual
const
XMLCh
*
getFormattedString
()
const
;
84
85
virtual
int
getSign
()
const
;
86
87
const
XMLCh
* getValue()
const
;
88
89
unsigned
int
getScale()
const
;
90
91
unsigned
int
getTotalDigit()
const
;
92
93
inline