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 throw *this;
00126 }
00127
00128 void CORBA::WrongTransaction::_tao_encode (
00129 TAO_OutputCDR &cdr
00130 ) const
00131 {
00132 if (cdr << *this)
00133 {
00134 return;
00135 }
00136
00137 throw ::CORBA::MARSHAL ();
00138 }
00139
00140 void CORBA::WrongTransaction::_tao_decode (
00141 TAO_InputCDR &cdr
00142 )
00143 {
00144 if (cdr >> *this)
00145 {
00146 return;
00147 }
00148
00149 throw ::CORBA::MARSHAL ();
00150 }
00151
00152
00153 CORBA::TypeCode_ptr CORBA::WrongTransaction::_tao_type (void) const
00154 {
00155 TAO_AnyTypeCode_Adapter *adapter =
00156 ACE_Dynamic_Service<TAO_AnyTypeCode_Adapter>::instance (
00157 "AnyTypeCode_Adapter"
00158 );
00159 if (adapter != 0)
00160 return adapter->_tao_type_WrongTransaction ();
00161 else
00162 {
00163 ACE_ERROR ((LM_ERROR,
00164 ACE_TEXT ("(%P|%t) %p\n"),
00165 ACE_TEXT ("Unable to find the ")
00166 ACE_TEXT ("AnyTypeCode Adapter instance")));
00167 return 0;
00168 }
00169 }
00170
00171
00172
00173
00174 CORBA::Boolean operator<< (
00175 TAO_OutputCDR &strm,
00176 const CORBA::WrongTransaction &_tao_aggregate
00177 )
00178 {
00179
00180 return (strm << _tao_aggregate._rep_id ());
00181 }
00182
00183 CORBA::Boolean operator>> (
00184 TAO_InputCDR &,
00185 CORBA::WrongTransaction&
00186 )
00187 {
00188 return true;
00189 }
00190
00191 TAO_END_VERSIONED_NAMESPACE_DECL