00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #include "tao/WrongTransactionC.h"
00033 #include "tao/CDR.h"
00034 #include "tao/SystemException.h"
00035 #include "ace/OS_NS_string.h"
00036 #include "tao/AnyTypeCode_Adapter.h"
00037 #include "ace/Dynamic_Service.h"
00038 #include "ace/Log_Msg.h"
00039
00040 #if defined (__BORLANDC__)
00041 #pragma option -w-rvl -w-rch -w-ccc -w-aus -w-sig
00042 #endif
00043
00044
00045
00046
00047 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00048
00049
00050 namespace TAO
00051 {
00052 }
00053
00054
00055
00056
00057
00058 CORBA::WrongTransaction::WrongTransaction (void)
00059 : CORBA::UserException (
00060 "IDL:omg.org/CORBA/WrongTransaction:1.0",
00061 "WrongTransaction"
00062 )
00063 {
00064 }
00065
00066 CORBA::WrongTransaction::~WrongTransaction (void)
00067 {
00068 }
00069
00070 CORBA::WrongTransaction::WrongTransaction (const ::CORBA::WrongTransaction &_tao_excp)
00071 : CORBA::UserException (
00072 _tao_excp._rep_id (),
00073 _tao_excp._name ()
00074 )
00075 {
00076 }
00077
00078 CORBA::WrongTransaction&
00079 CORBA::WrongTransaction::operator= (const ::CORBA::WrongTransaction &_tao_excp)
00080 {
00081 this->::CORBA::UserException::operator= (_tao_excp);
00082 return *this;
00083 }
00084
00085 void CORBA::WrongTransaction::_tao_any_destructor (void *_tao_void_pointer)
00086 {
00087 WrongTransaction *_tao_tmp_pointer =
00088 static_cast<WrongTransaction *> (_tao_void_pointer);
00089 delete _tao_tmp_pointer;
00090 }
00091
00092 CORBA::WrongTransaction *
00093 CORBA::WrongTransaction::_downcast (CORBA::Exception *_tao_excp)
00094 {
00095 return dynamic_cast<WrongTransaction *> (_tao_excp);
00096 }
00097
00098 const CORBA::WrongTransaction *
00099 CORBA::WrongTransaction::_downcast (CORBA::Exception const *_tao_excp)
00100 {
00101 return dynamic_cast<const WrongTransaction *> (_tao_excp);
00102 }
00103
00104 CORBA::Exception *CORBA::WrongTransaction::_alloc (void)
00105 {
00106 CORBA::Exception *retval = 0;
00107 ACE_NEW_RETURN (retval, ::CORBA::WrongTransaction, 0);
00108 return retval;
00109 }
00110
00111 CORBA::Exception *
00112 CORBA::WrongTransaction::_tao_duplicate (void) const
00113 {
00114 CORBA::Exception *result = 0;
00115 ACE_NEW_RETURN (
00116 result,
00117 ::CORBA::WrongTransaction (*this),
00118 0
00119 );
00120 return result;
00121 }
00122
00123 void CORBA::WrongTransaction::_raise (void) const
00124 {
00125 TAO_RAISE (*this);
00126 }
00127
00128 void CORBA::WrongTransaction::_tao_encode (
00129 TAO_OutputCDR &cdr
00130 ACE_ENV_ARG_DECL
00131 ) const
00132 {
00133 if (cdr << *this)
00134 {
00135 return;
00136 }
00137
00138 ACE_THROW (CORBA::MARSHAL ());
00139 }
00140
00141 void CORBA::WrongTransaction::_tao_decode (
00142 TAO_InputCDR &cdr
00143 ACE_ENV_ARG_DECL
00144 )
00145 {
00146 if (cdr >> *this)
00147 {
00148 return;
00149 }
00150
00151 ACE_THROW (CORBA::MARSHAL ());
00152 }
00153
00154
00155 CORBA::TypeCode_ptr CORBA::WrongTransaction::_tao_type (void) const
00156 {
00157 TAO_AnyTypeCode_Adapter *adapter =
00158 ACE_Dynamic_Service<TAO_AnyTypeCode_Adapter>::instance (
00159 "AnyTypeCode_Adapter"
00160 );
00161 if (adapter != 0)
00162 return adapter->_tao_type_WrongTransaction ();
00163 else
00164 {
00165 ACE_ERROR ((LM_ERROR,
00166 ACE_TEXT ("(%P|%t) %p\n"),
00167 ACE_TEXT ("Unable to find the ")
00168 ACE_TEXT ("AnyTypeCode Adapter instance")));
00169 return 0;
00170 }
00171 }
00172
00173
00174
00175
00176 CORBA::Boolean operator<< (
00177 TAO_OutputCDR &strm,
00178 const CORBA::WrongTransaction &_tao_aggregate
00179 )
00180 {
00181
00182 return (strm << _tao_aggregate._rep_id ());
00183 }
00184
00185 CORBA::Boolean operator>> (
00186 TAO_InputCDR &,
00187 CORBA::WrongTransaction&
00188 )
00189 {
00190 return true;
00191 }
00192
00193 TAO_END_VERSIONED_NAMESPACE_DECL