Go to the documentation of this file.00001
00002
00003 #include "tao/DynamicInterface/Unknown_User_Exception.h"
00004
00005 #include "tao/AnyTypeCode/Any.h"
00006 #include "tao/SystemException.h"
00007 #include "tao/AnyTypeCode/TypeCode_Constants.h"
00008 #include "tao/AnyTypeCode/Null_RefCount_Policy.h"
00009 #include "tao/AnyTypeCode/TypeCode_Struct_Field.h"
00010 #include "tao/AnyTypeCode/Struct_TypeCode_Static.h"
00011
00012 #include "ace/OS_NS_string.h"
00013 #include "ace/OS_Memory.h"
00014
00015 ACE_RCSID (DynamicInterface,
00016 Unknown_User_Exception,
00017 "$Id: Unknown_User_Exception.cpp 80384 2008-01-07 15:44:01Z mcorino $")
00018
00019 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00020
00021 CORBA::UnknownUserException::UnknownUserException (void)
00022 : CORBA::UserException ("IDL:omg.org/CORBA/UnknownUserException:1.0",
00023 "UnknownUserException"),
00024 exception_ (0)
00025 {
00026 }
00027
00028 CORBA::UnknownUserException::UnknownUserException (CORBA::Any &ex)
00029 : CORBA::UserException ("IDL:omg.org/CORBA/UnknownUserException:1.0",
00030 "UnknownUserException")
00031 {
00032 ACE_NEW (this->exception_,
00033 CORBA::Any (ex));
00034 }
00035
00036 CORBA::UnknownUserException::UnknownUserException (
00037 const CORBA::UnknownUserException& e
00038 )
00039 : CORBA::UserException (e._rep_id (),
00040 e._name ())
00041 {
00042 ACE_NEW (this->exception_,
00043 CORBA::Any (*e.exception_));
00044 }
00045
00046 CORBA::UnknownUserException::~UnknownUserException (void)
00047 {
00048 delete this->exception_;
00049 }
00050
00051 CORBA::Any &
00052 CORBA::UnknownUserException::exception (void)
00053 {
00054 return *this->exception_;
00055 }
00056
00057 CORBA::UnknownUserException *
00058 CORBA::UnknownUserException::_downcast (CORBA::Exception *ex)
00059 {
00060 return dynamic_cast<CORBA::UnknownUserException *> (ex);
00061 }
00062
00063 CORBA::UnknownUserException const *
00064 CORBA::UnknownUserException::_downcast (CORBA::Exception const * ex)
00065 {
00066 return dynamic_cast<CORBA::UnknownUserException const *> (ex);
00067 }
00068
00069 void
00070 CORBA::UnknownUserException::_raise (void) const
00071 {
00072 throw *this;
00073 }
00074
00075 CORBA::Exception *
00076 CORBA::UnknownUserException::_tao_duplicate (void) const
00077 {
00078 CORBA::Exception *result;
00079 ACE_NEW_RETURN (
00080 result,
00081 CORBA::UnknownUserException (*this),
00082 0
00083 );
00084 return result;
00085 }
00086
00087 void
00088 CORBA::UnknownUserException::_tao_encode (TAO_OutputCDR &) const
00089 {
00090 throw ::CORBA::MARSHAL ();
00091 }
00092
00093 void
00094 CORBA::UnknownUserException::_tao_decode (TAO_InputCDR &)
00095 {
00096 throw ::CORBA::MARSHAL ();
00097 }
00098
00099 const char *
00100 CORBA::UnknownUserException::_rep_id (void) const
00101 {
00102 return this->exception_->_tao_get_typecode ()->id ();
00103 }
00104
00105 CORBA::TypeCode_ptr
00106 CORBA::UnknownUserException::_tao_type (void) const
00107 {
00108
00109 return this->exception_->_tao_get_typecode ();
00110 }
00111
00112 namespace TAO
00113 {
00114 namespace TypeCode
00115 {
00116 Struct_Field<char const *, CORBA::TypeCode_ptr const *> const
00117 fields_CORBA_UnknownUserException[] =
00118 {
00119 { "exception", &CORBA::_tc_any }
00120 };
00121
00122 Struct<char const *,
00123 CORBA::TypeCode_ptr const *,
00124 Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *,
00125 TAO::Null_RefCount_Policy> tc_UnknownUserException (
00126 CORBA::tk_except,
00127 "IDL:omg.org/CORBA/UnknownUserException:1.0",
00128 "UnknownUserException",
00129 TAO::TypeCode::fields_CORBA_UnknownUserException,
00130 1 );
00131 }
00132 }
00133
00134 namespace CORBA
00135 {
00136 CORBA::TypeCode_ptr const _tc_UnknownUserException =
00137 &TAO::TypeCode::tc_UnknownUserException;
00138 }
00139
00140 TAO_END_VERSIONED_NAMESPACE_DECL