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 2005/02/25 18:10:50 UTC
cvs commit: ws-axis/c/src/soap OtherFaultException.cpp SoapFaultException.cpp
whitlock 2005/02/25 09:10:50
Modified: c/include/axis OtherFaultException.hpp
SoapFaultException.hpp
c/src/soap OtherFaultException.cpp SoapFaultException.cpp
Log:
AXISCPP-485 Add copy constructors and operator= methods to SoapFaultException and OtherFaultException
Revision Changes Path
1.3 +2 -0 ws-axis/c/include/axis/OtherFaultException.hpp
Index: OtherFaultException.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/include/axis/OtherFaultException.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- OtherFaultException.hpp 23 Feb 2005 16:05:42 -0000 1.2
+++ OtherFaultException.hpp 25 Feb 2005 17:10:50 -0000 1.3
@@ -39,6 +39,8 @@
OtherFaultException(const AxisChar *code, const AxisChar *string,
const AxisChar *actor, const AxisChar *detail, int exceptionCode);
OtherFaultException(AxisException& ae);
+ OtherFaultException(const OtherFaultException& copy);
+ virtual OtherFaultException& operator=(OtherFaultException other);
virtual ~OtherFaultException() throw();
virtual const AxisChar *getFaultDetail() const;
1.4 +2 -0 ws-axis/c/include/axis/SoapFaultException.hpp
Index: SoapFaultException.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/include/axis/SoapFaultException.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SoapFaultException.hpp 23 Feb 2005 15:12:06 -0000 1.3
+++ SoapFaultException.hpp 25 Feb 2005 17:10:50 -0000 1.4
@@ -44,6 +44,8 @@
SoapFaultException();
SoapFaultException(const AxisChar *code, const AxisChar *string, const AxisChar *actor, int exceptionCode);
SoapFaultException(AxisException& ae);
+ SoapFaultException(const SoapFaultException& copy);
+ virtual SoapFaultException& operator=(SoapFaultException other);
virtual ~SoapFaultException() throw();
virtual const AxisChar *getFaultCode() const;
1.2 +19 -0 ws-axis/c/src/soap/OtherFaultException.cpp
Index: OtherFaultException.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/OtherFaultException.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- OtherFaultException.cpp 23 Feb 2005 15:12:06 -0000 1.1
+++ OtherFaultException.cpp 25 Feb 2005 17:10:50 -0000 1.2
@@ -32,6 +32,13 @@
} else tgt = NULL; \
}
+#define STRINGREPLACE(tgt,src) \
+{ \
+ if (NULL != tgt) \
+ delete [] tgt; \
+ STRINGCOPY(tgt,src); \
+}
+
OtherFaultException::OtherFaultException()
{
m_detail = NULL;
@@ -49,6 +56,18 @@
m_detail = NULL;
}
+OtherFaultException::OtherFaultException(const OtherFaultException& copy) : SoapFaultException(copy)
+{
+ STRINGCOPY(m_detail, copy.m_detail);
+}
+
+OtherFaultException& OtherFaultException::operator=(OtherFaultException copy)
+{
+ SoapFaultException::operator=(copy);
+ STRINGREPLACE(m_detail, copy.m_detail);
+ return *this;
+}
+
OtherFaultException::~OtherFaultException() throw()
{
if (NULL != m_detail) delete [] m_detail;
1.4 +28 -3 ws-axis/c/src/soap/SoapFaultException.cpp
Index: SoapFaultException.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/soap/SoapFaultException.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SoapFaultException.cpp 23 Feb 2005 15:12:06 -0000 1.3
+++ SoapFaultException.cpp 25 Feb 2005 17:10:50 -0000 1.4
@@ -32,7 +32,14 @@
} else tgt = NULL; \
}
-SoapFaultException::SoapFaultException()
+#define STRINGREPLACE(tgt,src) \
+{ \
+ if (NULL != tgt) \
+ delete [] tgt; \
+ STRINGCOPY(tgt,src); \
+}
+
+SoapFaultException::SoapFaultException()
{
m_code = NULL;
m_string = NULL;
@@ -41,7 +48,7 @@
}
SoapFaultException::SoapFaultException(
- const AxisChar *code, const AxisChar *string, const AxisChar *actor, int exceptionCode)
+ const AxisChar *code, const AxisChar *string, const AxisChar *actor, int exceptionCode)
{
STRINGCOPY(m_code,code);
STRINGCOPY(m_string,string);
@@ -49,7 +56,7 @@
m_exceptionCode = exceptionCode;
}
-SoapFaultException::SoapFaultException(AxisException& ae)
+SoapFaultException::SoapFaultException(AxisException& ae)
{
STRINGCOPY(m_string,ae.what());
m_exceptionCode = ae.getExceptionCode();
@@ -57,6 +64,24 @@
m_actor = NULL;
}
+SoapFaultException::SoapFaultException(const SoapFaultException& copy)
+{
+ STRINGCOPY(m_code ,copy.m_code);
+ STRINGCOPY(m_string ,copy.m_string);
+ STRINGCOPY(m_actor ,copy.m_actor);
+ m_exceptionCode = copy.m_exceptionCode;
+}
+
+SoapFaultException& SoapFaultException::operator=(SoapFaultException copy)
+{
+ exception::operator=(copy);
+ STRINGREPLACE(m_code ,copy.m_code);
+ STRINGREPLACE(m_string ,copy.m_string);
+ STRINGREPLACE(m_actor ,copy.m_actor);
+ m_exceptionCode = copy.m_exceptionCode;
+ return *this;
+}
+
SoapFaultException::~SoapFaultException() throw()
{
if (NULL != m_code) delete [] m_code;