From 8b2d6ec96e4d9cf038f111364e496035a3612d43 Mon Sep 17 00:00:00 2001 From: PeiYong Zhang <peiyongz@apache.org> Date: Sat, 3 Jan 2004 00:03:18 +0000 Subject: [PATCH] parseContent git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175643 13f79535-47bb-0310-9956-ffa450edef68 --- src/xercesc/util/XMLAbstractDoubleFloat.cpp | 8 ++++++++ src/xercesc/util/XMLAbstractDoubleFloat.hpp | 5 +++++ src/xercesc/util/XMLBigDecimal.cpp | 18 +++++++++++++----- src/xercesc/util/XMLBigDecimal.hpp | 2 ++ src/xercesc/util/XMLDateTime.cpp | 7 +++++++ src/xercesc/util/XMLDateTime.hpp | 5 +++++ src/xercesc/util/XMLNumber.hpp | 5 +++++ 7 files changed, 45 insertions(+), 5 deletions(-) diff --git a/src/xercesc/util/XMLAbstractDoubleFloat.cpp b/src/xercesc/util/XMLAbstractDoubleFloat.cpp index 550e37333..f02d69e49 100644 --- a/src/xercesc/util/XMLAbstractDoubleFloat.cpp +++ b/src/xercesc/util/XMLAbstractDoubleFloat.cpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.23 2004/01/03 00:03:18 peiyongz + * parseContent + * * Revision 1.22 2003/12/23 21:48:14 peiyongz * Absorb exception thrown in getCanonicalRepresentation and return 0 * @@ -176,6 +179,11 @@ XMLAbstractDoubleFloat::~XMLAbstractDoubleFloat() fMemoryManager->deallocate(fFormattedString);//delete [] fFormattedString; } +void XMLAbstractDoubleFloat::parseContent(const XMLCh* const strValue) +{ + init(strValue); +} + void XMLAbstractDoubleFloat::init(const XMLCh* const strValue) { if ((!strValue) || (!*strValue)) diff --git a/src/xercesc/util/XMLAbstractDoubleFloat.hpp b/src/xercesc/util/XMLAbstractDoubleFloat.hpp index 32695a6c6..0c3ec9334 100644 --- a/src/xercesc/util/XMLAbstractDoubleFloat.hpp +++ b/src/xercesc/util/XMLAbstractDoubleFloat.hpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.18 2004/01/03 00:03:18 peiyongz + * parseContent + * * Revision 1.17 2003/12/17 00:18:35 cargilld * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data. * @@ -196,6 +199,8 @@ public: virtual int getSign() const; + virtual void parseContent(const XMLCh* const); + MemoryManager* getMemoryManager() const; /*** diff --git a/src/xercesc/util/XMLBigDecimal.cpp b/src/xercesc/util/XMLBigDecimal.cpp index 21cd3c2e7..99baa8639 100644 --- a/src/xercesc/util/XMLBigDecimal.cpp +++ b/src/xercesc/util/XMLBigDecimal.cpp @@ -56,6 +56,9 @@ /* * $Log$ + * Revision 1.19 2004/01/03 00:03:18 peiyongz + * parseContent + * * Revision 1.18 2003/12/23 21:48:14 peiyongz * Absorb exception thrown in getCanonicalRepresentation and return 0 * @@ -174,6 +177,16 @@ XMLBigDecimal::XMLBigDecimal(const XMLCh* const strValue, , fRawData(0) , fIntVal(0) , fMemoryManager(manager) +{ + parseContent(strValue); +} + +XMLBigDecimal::~XMLBigDecimal() +{ + cleanUp(); +} + +void XMLBigDecimal::parseContent(const XMLCh* const strValue) { if ((!strValue) || (!*strValue)) ThrowXMLwithMemMgr(NumberFormatException, XMLExcepts::XMLNUM_emptyString, fMemoryManager); @@ -200,11 +213,6 @@ XMLBigDecimal::XMLBigDecimal(const XMLCh* const strValue, } } -XMLBigDecimal::~XMLBigDecimal() -{ - cleanUp(); -} - void XMLBigDecimal::cleanUp() { // if (fIntVal) diff --git a/src/xercesc/util/XMLBigDecimal.hpp b/src/xercesc/util/XMLBigDecimal.hpp index 33a8e8612..f7d3a304e 100644 --- a/src/xercesc/util/XMLBigDecimal.hpp +++ b/src/xercesc/util/XMLBigDecimal.hpp @@ -124,6 +124,8 @@ public: virtual int getSign() const; + virtual void parseContent(const XMLCh* const); + const XMLCh* getValue() const; unsigned int getScale() const; diff --git a/src/xercesc/util/XMLDateTime.cpp b/src/xercesc/util/XMLDateTime.cpp index e2929747d..910812d92 100644 --- a/src/xercesc/util/XMLDateTime.cpp +++ b/src/xercesc/util/XMLDateTime.cpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.21 2004/01/03 00:03:18 peiyongz + * parseContent + * * Revision 1.20 2003/12/31 02:34:11 neilg * enable production of canonical representations for dates with negative years, or years >9999 * @@ -586,6 +589,10 @@ int XMLDateTime::getSign() const return 0; } +void XMLDateTime::parseContent(const XMLCh* const) +{ +} + // --------------------------------------------------------------------------- // Parsers // --------------------------------------------------------------------------- diff --git a/src/xercesc/util/XMLDateTime.hpp b/src/xercesc/util/XMLDateTime.hpp index fef6c9e0d..fad177337 100644 --- a/src/xercesc/util/XMLDateTime.hpp +++ b/src/xercesc/util/XMLDateTime.hpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.15 2004/01/03 00:03:18 peiyongz + * parseContent + * * Revision 1.14 2003/12/31 02:34:11 neilg * enable production of canonical representations for dates with negative years, or years >9999 * @@ -186,6 +189,8 @@ public: virtual int getSign() const; + virtual void parseContent(const XMLCh* const); + // ----------------------------------------------------------------------- // Canonical Representation // ----------------------------------------------------------------------- diff --git a/src/xercesc/util/XMLNumber.hpp b/src/xercesc/util/XMLNumber.hpp index 3cb494ea7..fa3ab9087 100644 --- a/src/xercesc/util/XMLNumber.hpp +++ b/src/xercesc/util/XMLNumber.hpp @@ -57,6 +57,9 @@ /* * $Id$ * $Log$ + * Revision 1.11 2004/01/03 00:03:18 peiyongz + * parseContent + * * Revision 1.10 2003/10/17 21:10:55 peiyongz * loadNumber() added * @@ -163,6 +166,8 @@ public: */ virtual int getSign() const = 0; + virtual void parseContent(const XMLCh* const) = 0; + /*** * Support for Serialization/De-serialization ***/ -- GitLab