Go to the documentation of this file.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
00041
00042
00043 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00044
00045
00046 namespace TAO
00047 {
00048 }
00049
00050
00051
00052
00053
00054 CORBA::WrongTransaction::WrongTransaction (void)
00055 : CORBA::UserException (
00056 "IDL:omg.org/CORBA/WrongTransaction:1.0",
00057 "WrongTransaction"
00058 )
00059 {
00060 }
00061
00062 CORBA::WrongTransaction::~WrongTransaction (void)
00063 {
00064 }
00065
00066 CORBA::WrongTransaction::WrongTransaction (const ::CORBA::WrongTransaction &_tao_excp)
00067 : CORBA::UserException (
00068 _tao_excp._rep_id (),
00069 _tao_excp._name ()
00070 )
00071 {
00072 }
00073
00074 CORBA::WrongTransaction&
00075 CORBA::WrongTransaction::operator= (const ::CORBA::WrongTransaction &_tao_excp)
00076 {
00077 this->::CORBA::UserException::operator= (_tao_excp);
00078 return *this;
00079 }
00080
00081 void CORBA::WrongTransaction::_tao_any_destructor (void *_tao_void_pointer)
00082 {
00083 WrongTransaction *_tao_tmp_pointer =
00084 static_cast<WrongTransaction *> (_tao_void_pointer);
00085 delete _tao_tmp_pointer;
00086 }
00087
00088 CORBA::WrongTransaction *
00089 CORBA::WrongTransaction::_downcast (CORBA::Exception *_tao_excp)
00090 {
00091 return dynamic_cast<WrongTransaction *> (_tao_excp);
00092 }
00093
00094 const CORBA::WrongTransaction *
00095 CORBA::WrongTransaction::_downcast (CORBA::Exception const *_tao_excp)
00096 {
00097 return dynamic_cast<const WrongTransaction *> (_tao_excp);
00098 }
00099
00100 CORBA::Exception *CORBA::WrongTransaction::_alloc (void)
00101 {
00102 CORBA::Exception *retval = 0;
00103 ACE_NEW_RETURN (retval, ::CORBA::WrongTransaction, 0);
00104 return retval;
00105 }
00106
00107 CORBA::Exception *
00108 CORBA::WrongTransaction::_tao_duplicate (void) const
00109 {
00110 CORBA::Exception *result = 0;
00111 ACE_NEW_RETURN (
00112 result,
00113 ::CORBA::WrongTransaction (*this),
00114 0
00115 );
00116 return result;
00117 }
00118
00119 void CORBA::WrongTransaction::_raise (void) const
00120 {
00121 throw *this;
00122 }
00123
00124 void CORBA::WrongTransaction::_tao_encode (
00125 TAO_OutputCDR &cdr
00126 ) const
00127 {
00128 if (cdr << *this)
00129 {
00130 return;
00131 }
00132
00133 throw ::CORBA::MARSHAL ();
00134 }
00135
00136 void CORBA::WrongTransaction::_tao_decode (
00137 TAO_InputCDR &cdr
00138 )
00139 {
00140 if (cdr >> *this)
00141 {
00142 return;
00143 }
00144
00145 throw ::CORBA::MARSHAL ();
00146 }
00147
00148
00149 CORBA::TypeCode_ptr CORBA::WrongTransaction::_tao_type (void) const
00150 {
00151 TAO_AnyTypeCode_Adapter *adapter =
00152 ACE_Dynamic_Service<TAO_AnyTypeCode_Adapter>::instance (
00153 "AnyTypeCode_Adapter"
00154 );
00155 if (adapter != 0)
00156 return adapter->_tao_type_WrongTransaction ();
00157 else
00158 {
00159 ACE_ERROR ((LM_ERROR,
00160 ACE_TEXT ("(%P|%t) %p\n"),
00161 ACE_TEXT ("Unable to find the ")
00162 ACE_TEXT ("AnyTypeCode Adapter instance")));
00163 return 0;
00164 }
00165 }
00166
00167
00168
00169
00170 CORBA::Boolean operator<< (
00171 TAO_OutputCDR &strm,
00172 const CORBA::WrongTransaction &_tao_aggregate
00173 )
00174 {
00175
00176 return (strm << _tao_aggregate._rep_id ());
00177 }
00178
00179 CORBA::Boolean operator>> (
00180 TAO_InputCDR &,
00181 CORBA::WrongTransaction&
00182 )
00183 {
00184 return true;
00185 }
00186
00187 TAO_END_VERSIONED_NAMESPACE_DECL