Unknown_User_Exception.cpp

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

Generated on Thu Nov 9 13:04:21 2006 for TAO_DynamicInterface by doxygen 1.3.6