You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2001/07/31 15:48:29 UTC
cvs commit: xml-xerces/c/src/util XMLFloat.hpp XMLFloat.cpp XMLDouble.hpp XMLDouble.cpp
peiyongz 01/07/31 06:48:29
Modified: c/src/util XMLFloat.hpp XMLFloat.cpp XMLDouble.hpp
XMLDouble.cpp
Log:
fValue removed
Revision Changes Path
1.2 +11 -13 xml-xerces/c/src/util/XMLFloat.hpp
Index: XMLFloat.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLFloat.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XMLFloat.hpp 2001/07/26 20:41:37 1.1
+++ XMLFloat.hpp 2001/07/31 13:48:29 1.2
@@ -55,8 +55,11 @@
*/
/*
- * $Id: XMLFloat.hpp,v 1.1 2001/07/26 20:41:37 peiyongz Exp $
+ * $Id: XMLFloat.hpp,v 1.2 2001/07/31 13:48:29 peiyongz Exp $
* $Log: XMLFloat.hpp,v $
+ * Revision 1.2 2001/07/31 13:48:29 peiyongz
+ * fValue removed
+ *
* Revision 1.1 2001/07/26 20:41:37 peiyongz
* XMLFloat
*
@@ -115,9 +118,9 @@
XMLFloat(const XMLFloat& toCopy);
- float floatValue() const;
+ int getSign() const;
- /**
+ /**
* Return string representation of the decimal value.
* A decimal point will be included as necessary,
* the caller of this method is responsible for the
@@ -167,15 +170,11 @@
// fType
// the type of the object.
//
- // fValue
- // the built-in float value of the object.
- //
// -----------------------------------------------------------------------
XMLBigDecimal* fMantissa;
XMLBigInteger* fExponent;
LiteralType fType;
- float fValue;
};
inline XMLFloat::~XMLFloat()
@@ -183,11 +182,6 @@
cleanUp();
}
-inline float XMLFloat::floatValue() const
-{
- return fValue;
-}
-
inline bool XMLFloat::operator==(const XMLFloat& toCompare) const
{
return ( XMLFloat::compareValues(this, &toCompare) == 0 ? true : false);
@@ -207,4 +201,8 @@
delete fExponent;
}
+inline int XMLFloat::getSign() const
+{
+ return fMantissa->getSign();
+}
#endif
1.3 +5 -7 xml-xerces/c/src/util/XMLFloat.cpp
Index: XMLFloat.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLFloat.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLFloat.cpp 2001/07/27 20:43:53 1.2
+++ XMLFloat.cpp 2001/07/31 13:48:29 1.3
@@ -55,8 +55,11 @@
*/
/*
- * $Id: XMLFloat.cpp,v 1.2 2001/07/27 20:43:53 peiyongz Exp $
+ * $Id: XMLFloat.cpp,v 1.3 2001/07/31 13:48:29 peiyongz Exp $
* $Log: XMLFloat.cpp,v $
+ * Revision 1.3 2001/07/31 13:48:29 peiyongz
+ * fValue removed
+ *
* Revision 1.2 2001/07/27 20:43:53 peiyongz
* copy ctor: to check for special types.
*
@@ -176,7 +179,6 @@
:fMantissa(0)
,fExponent(0)
,fType(Normal)
-,fValue(0)
{
try
{
@@ -264,8 +266,6 @@
fExponent = new XMLBigInteger(XMLUni::fgZeroString);
}
- fValue = (float) fMantissa->doubleValue() * (float) (pow(10.0, fExponent->intValue()));
-
checkBoundary(tmpStrValue);
}
@@ -313,7 +313,6 @@
:fMantissa(0)
,fExponent(0)
,fType(Normal)
-,fValue(0)
{
if (!toCopy.isSpecialValue())
{
@@ -322,7 +321,6 @@
}
fType = toCopy.fType;
- fValue = toCopy.fValue;
}
//
@@ -449,7 +447,7 @@
case NegZero:
case PosZero:
- return (normalValue->floatValue() > 0 ? -1 : 1);
+ return (normalValue->getSign() > 0 ? -1 : 1);
case PosINF:
return 1;
1.4 +7 -8 xml-xerces/c/src/util/XMLDouble.hpp
Index: XMLDouble.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLDouble.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLDouble.hpp 2001/07/26 18:21:15 1.3
+++ XMLDouble.hpp 2001/07/31 13:48:29 1.4
@@ -55,8 +55,11 @@
*/
/*
- * $Id: XMLDouble.hpp,v 1.3 2001/07/26 18:21:15 peiyongz Exp $
+ * $Id: XMLDouble.hpp,v 1.4 2001/07/31 13:48:29 peiyongz Exp $
* $Log: XMLDouble.hpp,v $
+ * Revision 1.4 2001/07/31 13:48:29 peiyongz
+ * fValue removed
+ *
* Revision 1.3 2001/07/26 18:21:15 peiyongz
* Boundary Checking
*
@@ -120,7 +123,7 @@
XMLDouble(const XMLDouble& toCopy);
- double doubleValue() const;
+ int getSign() const;
/**
* Return string representation of the decimal value.
@@ -172,15 +175,11 @@
// fType
// the type of the object.
//
- // fValue
- // the built-in double value of the object.
- //
// -----------------------------------------------------------------------
XMLBigDecimal* fMantissa;
XMLBigInteger* fExponent;
LiteralType fType;
- double fValue;
};
inline XMLDouble::~XMLDouble()
@@ -188,9 +187,9 @@
cleanUp();
}
-inline double XMLDouble::doubleValue() const
+inline int XMLDouble::getSign() const
{
- return fValue;
+ return fMantissa->getSign();
}
inline bool XMLDouble::operator==(const XMLDouble& toCompare) const
1.6 +5 -7 xml-xerces/c/src/util/XMLDouble.cpp
Index: XMLDouble.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/util/XMLDouble.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XMLDouble.cpp 2001/07/27 20:43:53 1.5
+++ XMLDouble.cpp 2001/07/31 13:48:29 1.6
@@ -55,8 +55,11 @@
*/
/*
- * $Id: XMLDouble.cpp,v 1.5 2001/07/27 20:43:53 peiyongz Exp $
+ * $Id: XMLDouble.cpp,v 1.6 2001/07/31 13:48:29 peiyongz Exp $
* $Log: XMLDouble.cpp,v $
+ * Revision 1.6 2001/07/31 13:48:29 peiyongz
+ * fValue removed
+ *
* Revision 1.5 2001/07/27 20:43:53 peiyongz
* copy ctor: to check for special types.
*
@@ -188,7 +191,6 @@
:fMantissa(0)
,fExponent(0)
,fType(Normal)
-,fValue(0)
{
try
{
@@ -276,8 +278,6 @@
fExponent = new XMLBigInteger(XMLUni::fgZeroString);
}
- fValue = fMantissa->doubleValue() * pow(10.0, fExponent->intValue());
-
checkBoundary(tmpStrValue);
}
@@ -325,7 +325,6 @@
:fMantissa(0)
,fExponent(0)
,fType(Normal)
-,fValue(0)
{
if (!toCopy.isSpecialValue())
{
@@ -334,7 +333,6 @@
}
fType = toCopy.fType;
- fValue = toCopy.fValue;
}
//
@@ -461,7 +459,7 @@
case NegZero:
case PosZero:
- return (normalValue->doubleValue() > 0 ? -1 : 1);
+ return (normalValue->getSign() > 0 ? -1 : 1);
case PosINF:
return 1;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org