=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tao / DynamicInterface / Unknown_User_Exception.cpp
blob564db8117d0b75b1bdbb3fd85babce91b43b7ae3
1 #include "tao/DynamicInterface/Unknown_User_Exception.h"
3 #include "tao/AnyTypeCode/Any.h"
4 #include "tao/SystemException.h"
5 #include "tao/AnyTypeCode/TypeCode_Constants.h"
6 #include "tao/AnyTypeCode/Null_RefCount_Policy.h"
7 #include "tao/AnyTypeCode/TypeCode_Struct_Field.h"
8 #include "tao/AnyTypeCode/Struct_TypeCode_Static.h"
10 #include "ace/OS_NS_string.h"
11 #include "ace/OS_Memory.h"
13 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
15 CORBA::UnknownUserException::UnknownUserException ()
16 : CORBA::UserException ("IDL:omg.org/CORBA/UnknownUserException:1.0",
17 "UnknownUserException"),
18 exception_ (0)
22 CORBA::UnknownUserException::UnknownUserException (CORBA::Any &ex)
23 : CORBA::UserException ("IDL:omg.org/CORBA/UnknownUserException:1.0",
24 "UnknownUserException")
26 ACE_NEW (this->exception_,
27 CORBA::Any (ex));
30 CORBA::UnknownUserException::UnknownUserException (
31 const CORBA::UnknownUserException& e
33 : CORBA::UserException (e._rep_id (),
34 e._name ())
36 ACE_NEW (this->exception_,
37 CORBA::Any (*e.exception_));
40 CORBA::UnknownUserException::~UnknownUserException ()
42 delete this->exception_;
45 CORBA::Any &
46 CORBA::UnknownUserException::exception ()
48 return *this->exception_;
51 CORBA::UnknownUserException *
52 CORBA::UnknownUserException::_downcast (CORBA::Exception *ex)
54 return dynamic_cast<CORBA::UnknownUserException *> (ex);
57 CORBA::UnknownUserException const *
58 CORBA::UnknownUserException::_downcast (CORBA::Exception const * ex)
60 return dynamic_cast<CORBA::UnknownUserException const *> (ex);
63 void
64 CORBA::UnknownUserException::_raise () const
66 throw *this;
69 CORBA::Exception *
70 CORBA::UnknownUserException::_tao_duplicate () const
72 CORBA::Exception *result = nullptr;
73 ACE_NEW_RETURN (
74 result,
75 CORBA::UnknownUserException (*this),
76 nullptr);
77 return result;
80 void
81 CORBA::UnknownUserException::_tao_encode (TAO_OutputCDR &) const
83 throw ::CORBA::MARSHAL ();
86 void
87 CORBA::UnknownUserException::_tao_decode (TAO_InputCDR &)
89 throw ::CORBA::MARSHAL ();
92 const char *
93 CORBA::UnknownUserException::_rep_id () const
95 return this->exception_->_tao_get_typecode ()->id ();
98 CORBA::TypeCode_ptr
99 CORBA::UnknownUserException::_tao_type () const
101 //return CORBA::_tc_UnknownUserException;
102 return this->exception_->_tao_get_typecode ();
105 namespace TAO
107 namespace TypeCode
109 Struct_Field<char const *, CORBA::TypeCode_ptr const *> const
110 fields_CORBA_UnknownUserException[] =
112 { "exception", &CORBA::_tc_any }
115 Struct<char const *,
116 CORBA::TypeCode_ptr const *,
117 Struct_Field<char const *, CORBA::TypeCode_ptr const *> const *,
118 TAO::Null_RefCount_Policy> tc_UnknownUserException (
119 CORBA::tk_except,
120 "IDL:omg.org/CORBA/UnknownUserException:1.0",
121 "UnknownUserException",
122 TAO::TypeCode::fields_CORBA_UnknownUserException,
123 1 /* # of fields */);
127 namespace CORBA
129 CORBA::TypeCode_ptr const _tc_UnknownUserException =
130 &TAO::TypeCode::tc_UnknownUserException;
133 TAO_END_VERSIONED_NAMESPACE_DECL