Unknown_User_Exception.cpp

Go to the documentation of this file.
00001 // $Id: Unknown_User_Exception.cpp 76995 2007-02-11 12:51:42Z johnnyw $
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 76995 2007-02-11 12:51:42Z johnnyw $")
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 CORBA::TypeCode_ptr
00100 CORBA::UnknownUserException::_tao_type (void) const
00101 {
00102   return CORBA::_tc_UnknownUserException;
00103 }
00104 
00105 namespace TAO
00106 {
00107   namespace TypeCode
00108   {
00109     Struct_Field<char const *, CORBA::TypeCode_ptr const *> const
00110     fields_CORBA_UnknownUserException[] =
00111       {
00112         { "exception", &CORBA::_tc_any }
00113       };
00114 
00115     Struct<char const *,
00116            CORBA::TypeCode_ptr const *,
00117            Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *,
00118            TAO::Null_RefCount_Policy> tc_UnknownUserException (
00119              CORBA::tk_except,
00120              "IDL:omg.org/CORBA/UnknownUserException:1.0",
00121              "UnknownUserException",
00122              TAO::TypeCode::fields_CORBA_UnknownUserException,
00123              1 /* # of fields */);
00124   }
00125 }
00126 
00127 namespace CORBA
00128 {
00129   CORBA::TypeCode_ptr const _tc_UnknownUserException =
00130     &TAO::TypeCode::tc_UnknownUserException;
00131 }
00132 
00133 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 13:37:31 2008 for TAO_DynamicInterface by doxygen 1.3.6