You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by wh...@apache.org on 2004/11/11 17:19:49 UTC
cvs commit: ws-axis/c/src/common AxisUserAPI.cpp
whitlock 2004/11/11 08:19:49
Modified: c/include/axis/server AxisUserAPI.hpp
c/src/soap SoapDeSerializer.cpp
Added: c/src/common AxisUserAPI.cpp
Log:
Implement constructors etc for xsd__hexBinary, xsd__base64Binary and AnyType
Revision Changes Path
1.8 +9 -3 ws-axis/c/include/axis/server/AxisUserAPI.hpp
Index: AxisUserAPI.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/include/axis/server/AxisUserAPI.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AxisUserAPI.hpp 11 Nov 2004 10:51:35 -0000 1.7
+++ AxisUserAPI.hpp 11 Nov 2004 16:19:49 -0000 1.8
@@ -140,7 +140,9 @@
*/
class STORAGE_CLASS_INFO xsd__base64Binary {
public:
- //AXISCALL xsd__base64Binary();
+ xsd__base64Binary();
+ xsd__base64Binary(xsd__base64Binary&);
+ ~xsd__base64Binary();
xsd__unsignedByte * __ptr;
xsd__int __size;
};
@@ -151,7 +153,9 @@
*/
class STORAGE_CLASS_INFO xsd__hexBinary {
public:
- //AXISCALL xsd__hexBinary();
+ xsd__hexBinary();
+ xsd__hexBinary(xsd__hexBinary&);
+ ~xsd__hexBinary();
xsd__unsignedByte * __ptr;
xsd__int __size;
};
@@ -228,7 +232,9 @@
class STORAGE_CLASS_INFO AnyType
{
public:
- //AXISCALL AnyType();
+ AnyType();
+ AnyType(AnyType&);
+ ~AnyType();
/**
* @var _array Contains an array of xml encoded strings.
1.100 +11 -11 ws-axis/c/src/soap/SoapDeSerializer.cpp
Index: SoapDeSerializer.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- SoapDeSerializer.cpp 10 Nov 2004 17:05:51 -0000 1.99
+++ SoapDeSerializer.cpp 11 Nov 2004 16:19:49 -0000 1.100
@@ -698,9 +698,9 @@
char *AxisSoapDeSerializerStringCopy(const char *s1) { char *s2=new char[strlen(s1)+1]; strcpy(s2,s1); return s2; }
-#define INIT_VALUE_DATETIME {0,0,0,0,0,0,0,0,0}
-#define INIT_VALUE_NUMBER 0
-#define INIT_VALUE_XSDBINARY {0,0}
+#define INIT_VALUE_DATETIME = {0,0,0,0,0,0,0,0,0}
+#define INIT_VALUE_NUMBER = 0
+#define INIT_VALUE_XSDBINARY
#define DESERIALIZE_ENCODED_ARRAY_BLOCK(cpp_type, conv_func) \
Array.m_Array = new cpp_type[Array.m_Size];\
@@ -1440,7 +1440,7 @@
}
#define DESERIALIZE_GET_ATTRIBUTE_AS(cpp_type, conv_func, init_value) \
- cpp_type ret = init_value;\
+ cpp_type ret init_value;\
if(!m_pCurrNode) \
{\
/**\
@@ -2785,7 +2785,7 @@
const AxisChar*
pNamespace)
{
- xsd__hexBinary ret = {0,0};
+ xsd__hexBinary ret;
if (AXIS_SUCCESS != m_nStatus) return ret;
if (RPC_ENCODED == m_nStyle)
{
@@ -2875,7 +2875,7 @@
const AxisChar*
pNamespace)
{
- xsd__base64Binary ret = {0,0};
+ xsd__base64Binary ret;
if (AXIS_SUCCESS != m_nStatus) return ret;
if (RPC_ENCODED == m_nStyle)
{
@@ -2936,7 +2936,7 @@
struct tm SoapDeSerializer::getElementAsDateTime(const AxisChar* pName,
const AxisChar* pNamespace)
{
- struct tm ret = INIT_VALUE_DATETIME;
+ struct tm ret INIT_VALUE_DATETIME;
if (AXIS_SUCCESS != m_nStatus) return ret;
if (RPC_ENCODED == m_nStyle)
{
@@ -3009,7 +3009,7 @@
struct tm SoapDeSerializer::getElementAsDate(const AxisChar* pName,
const AxisChar* pNamespace)
{
- struct tm ret = INIT_VALUE_DATETIME;
+ struct tm ret INIT_VALUE_DATETIME;
if (AXIS_SUCCESS != m_nStatus) return ret;
if (RPC_ENCODED == m_nStyle)
{
@@ -3083,7 +3083,7 @@
struct tm SoapDeSerializer::getElementAsTime(const AxisChar* pName,
const AxisChar* pNamespace)
{
- struct tm ret = INIT_VALUE_DATETIME;
+ struct tm ret INIT_VALUE_DATETIME;
if (AXIS_SUCCESS != m_nStatus) return ret;
if (RPC_ENCODED == m_nStyle)
{
@@ -3366,14 +3366,14 @@
xsd__hexBinary SoapDeSerializer::getBodyAsHexBinary()
{
/* TODO */
- xsd__hexBinary hb = {0,0};
+ xsd__hexBinary hb;
return hb;
}
xsd__base64Binary SoapDeSerializer::getBodyAsBase64Binary()
{
/* TODO */
- xsd__base64Binary bb = {0,0};
+ xsd__base64Binary bb;
return bb;
}
1.1 ws-axis/c/src/common/AxisUserAPI.cpp
Index: AxisUserAPI.cpp
===================================================================
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @author Mark Whitlock
*/
#include <axis/server/AxisUserAPI.hpp>
AXIS_CPP_NAMESPACE_START
/*
* xsd_base64Binary, xsd_hexBinary and AnyType probably should own the
* storage that they address, in which case their destructors should free it
* and their copy constructors should new storage. Also the = method would
* need to be overloaded as well. Also their constructors would need to new
* storage. The users of these classes would have to be checked to make sure
* they don't new/delete the storage owned by these classes. Also methods
* in SoapDeSerializer (for example) copy these classes around which would
* invoke these constructors excessively. So instead those methods should
* pass these classes around by reference instead. xsd_hexBinary and
* xsd__base64Binary are very similar and could share an implementation
* which they both inherit from. Maybe these classes could have private data
* and overload the [] operator and size() methods.
*/
xsd__base64Binary::xsd__base64Binary() {
__ptr = 0;
__size = 0;
}
xsd__base64Binary::xsd__base64Binary(xsd__base64Binary& rCopy) {
__size = rCopy.__size;
__ptr = rCopy.__ptr;
}
xsd__base64Binary::~xsd__base64Binary() {
}
xsd__hexBinary::xsd__hexBinary() {
__ptr = 0;
__size = 0;
}
xsd__hexBinary::xsd__hexBinary(xsd__hexBinary& rCopy) {
__size = rCopy.__size;
__ptr = rCopy.__ptr;
}
xsd__hexBinary::~xsd__hexBinary() {
}
AnyType::AnyType() {
_array = 0;
_size = 0;
}
AnyType::AnyType(AnyType& rCopy) {
_size = rCopy._size;
_array = rCopy._array;
}
AnyType::~AnyType() {
}
AXIS_CPP_NAMESPACE_END