axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r431545 - in /webservices/axis/trunk/c/src: cbindings/AxisObjectConverter.cpp soap/SoapDeSerializer.cpp soap/SoapDeSerializer.h
Date Tue, 15 Aug 2006 07:07:29 GMT
Author: nadiramra
Date: Tue Aug 15 00:07:28 2006
New Revision: 431545

URL: http://svn.apache.org/viewvc?rev=431545&view=rev
Log:
Tidying up - removed unused methods from deserializer code and ensured
all variables are initialized in class.

Modified:
    webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.h

Modified: webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp?rev=431545&r1=431544&r2=431545&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp (original)
+++ webservices/axis/trunk/c/src/cbindings/AxisObjectConverter.cpp Tue Aug 15 00:07:28 2006
@@ -17,6 +17,9 @@
  *
  */
 
+// Must be included as first thing in file - DO NOT REMOVE
+#include "../platforms/PlatformAutoSense.hpp"
+
 #include <axis/Axis.h>
 #include "AxisObjectConverter.hpp"
 

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp?rev=431545&r1=431544&r2=431545&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp Tue Aug 15 00:07:28 2006
@@ -73,14 +73,15 @@
 AxisChar * pBodyContent;
 
 AXIS_CPP_NAMESPACE_START
-#define INITIAL_ARRAY_SIZE 1
 
 SoapDeSerializer::SoapDeSerializer ()
 {
     m_pParser = XMLParserFactory::getParserObject ();
     m_pEnv = NULL;
     m_pHeader = NULL;
-    m_pInputStream = 0;
+    m_pCurrNode = NULL;
+    m_pNode = NULL;
+    m_pInputStream = NULL;
     m_nStatus = AXIS_SUCCESS;
 }
 
@@ -463,7 +464,8 @@
 int
 SoapDeSerializer::init ()
 {
-    m_pNode = 0;
+    m_pNode = NULL;
+    m_pCurrNode = NULL;
 
     if (m_pEnv)
     {
@@ -1041,35 +1043,6 @@
     return NULL;
 }
 
-int
-SoapDeSerializer::getElementForAttributes (const AxisChar * pName,
-                                           const AxisChar * pNamespace)
-{
-    if (m_pCurrNode)
-    {
-        if (0 == strcmp (pName, m_pCurrNode->m_pchNameOrValue))
-            return m_nStatus;
-    }
-    
-    if (!m_pNode)
-    {
-        m_pNode = m_pParser->next ();
-        m_pCurrNode = m_pParser->next ();
-    }
-    else            /* previous node not processed. So consider it */
-        m_pCurrNode = m_pNode;
-
-    if (0 == strcmp (pName, m_pNode->m_pchNameOrValue))
-        m_pNode = NULL;
-    else            /* error : current element is not the expected one */
-    {
-        m_nStatus = AXIS_FAIL;
-        m_pCurrNode = NULL;
-    }
-
-    return m_nStatus;
-}
-
 void SoapDeSerializer::getAttribute(const AxisChar* pName, const AxisChar * pNamespace, IAnySimpleType
* pSimpleType)
 {
     if (m_pCurrNode)
@@ -1091,10 +1064,6 @@
     return;
 }
 
-/*
- * Before calling any of getAttributeAs... API functions the user should move 
- * current Element to the right Element by calling GetElementForAttributes(..)
- */
 xsd__int *
 SoapDeSerializer::getAttributeAsInt (const AxisChar * pName,
                                      const AxisChar * pNamespace)
@@ -2566,36 +2535,6 @@
         *pValue = pSimpleType->getValue();
         delete pSimpleType;
     }
-}
-
-LONGLONG
-SoapDeSerializer::strtoll (const char *pValue)
-{
-    LONGLONG llRetVal = 0;
-    LONGLONG llPowerOf10 = 1;
-    int iLength = strlen (pValue);
-    int iCountDownTo = 0;
-    bool bMinus = false;
-
-    if (*pValue == '-')
-    {
-        bMinus = true;
-        iCountDownTo = 1;
-    }
-
-    if (iLength > 0)
-        iLength--;
-
-    for (int iCount = iLength; iCount >= iCountDownTo; iCount--)
-    {
-        llRetVal += (LONGLONG) (pValue[iCount] - '0') * llPowerOf10;
-        llPowerOf10 *= (LONGLONG) 10;
-    }
-
-    if (bMinus)
-        llRetVal = -llRetVal;
-
-    return llRetVal;
 }
 
 /* This function is never called. */

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.h
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.h?rev=431545&r1=431544&r2=431545&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.h (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.h Tue Aug 15 00:07:28 2006
@@ -354,16 +354,12 @@
 
 
 private:
-    int getElementForAttributes(const AxisChar* pName, 
-        const AxisChar* pNamespace);
     xsd__base64Binary decodeFromBase64Binary(const AxisChar* pValue);
     xsd__hexBinary decodeFromHexBinary(const AxisChar* pValue);
     void deserializeLiteralArray (Axis_Array* pArray, IAnySimpleType* pSimpleType, const
AxisChar* pName, const AxisChar* pNamespace);
     void deserializeEncodedArray (Axis_Array* pArray, IAnySimpleType* pSimpleType, const
AxisChar* pName, const AxisChar* pNamespace, int size);
 	void deserializeLiteralComplexArray(Axis_Array * pArray, void *pDZFunct, void *pCreFunct,
void *pDelFunct,  const AxisChar * pName, const AxisChar * pNamespace);
 	void deserializeEncodedComplexArray(Axis_Array * pArray, void *pDZFunct, void *pCreFunct,
void *pDelFunct, const AxisChar * pName, const AxisChar * pNamespace, int size);
-
-	LONGLONG strtoll(const char *);
 };
 
 AXIS_CPP_NAMESPACE_END



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message