Go to the documentation of this file.00001
00002
00003 #include "tao/AnyTypeCode/ExceptionA.h"
00004 #include "tao/AnyTypeCode/Any_Dual_Impl_T.h"
00005 #include "tao/SystemException.h"
00006 #include "tao/ORB_Constants.h"
00007 #include "tao/CORBA_String.h"
00008 #include "tao/CDR.h"
00009 #include "tao/debug.h"
00010
00011 #include "ace/Malloc.h"
00012 #include "ace/SString.h"
00013 #include "ace/OS_NS_string.h"
00014
00015 #include "ace/OS_NS_stdio.h"
00016
00017 ACE_RCSID (AnyTypeCode,
00018 Exception,
00019 "$Id: ExceptionA.cpp 90886 2010-06-28 09:18:39Z johnnyw $")
00020
00021
00022 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00023
00024
00025 namespace TAO
00026 {
00027 template<>
00028 void
00029 Any_Dual_Impl_T<CORBA::Exception>::value (const CORBA::Exception & val)
00030 {
00031 this->value_ = val._tao_duplicate ();
00032 }
00033
00034 template<>
00035 CORBA::Boolean
00036 Any_Dual_Impl_T<CORBA::Exception>::marshal_value (TAO_OutputCDR &cdr)
00037 {
00038 try
00039 {
00040 this->value_->_tao_encode (cdr);
00041
00042 return true;
00043 }
00044 catch (const ::CORBA::Exception&)
00045 {
00046 }
00047
00048 return false;
00049 }
00050
00051 template<>
00052 CORBA::Boolean
00053 Any_Dual_Impl_T<CORBA::Exception>::demarshal_value (TAO_InputCDR &cdr)
00054 {
00055 try
00056 {
00057 this->value_->_tao_decode (cdr);
00058
00059 return true;
00060 }
00061 catch (const ::CORBA::Exception&)
00062 {
00063 }
00064
00065 return false;
00066 }
00067
00068
00069
00070
00071
00072 template<>
00073 CORBA::Boolean
00074 Any_Dual_Impl_T<CORBA::Exception>::extract (
00075 const CORBA::Any &,
00076 _tao_destructor,
00077 CORBA::TypeCode_ptr,
00078 const CORBA::Exception *&)
00079 {
00080 return false;
00081 }
00082 }
00083
00084
00085
00086
00087
00088 void
00089 operator<<= (CORBA::Any &any, const CORBA::Exception &exception)
00090 {
00091 TAO::Any_Dual_Impl_T<CORBA::Exception>::insert_copy (
00092 any,
00093 CORBA::Exception::_tao_any_destructor,
00094 exception._tao_type (),
00095 exception);
00096 }
00097
00098
00099 void
00100 operator<<= (CORBA::Any &any, CORBA::Exception *exception)
00101 {
00102 TAO::Any_Dual_Impl_T<CORBA::Exception>::insert (
00103 any,
00104 CORBA::Exception::_tao_any_destructor,
00105 exception->_tao_type (),
00106 exception);
00107 }
00108
00109
00110 TAO_END_VERSIONED_NAMESPACE_DECL