Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / DynamicInterface / Dynamic_Adapter_Impl.cpp
blobc710f5c7d8f3621eb8e669d8b589a5cc9a1fd4d2
1 #include "tao/DynamicInterface/Dynamic_Adapter_Impl.h"
2 #include "tao/DynamicInterface/Request.h"
3 #include "tao/DynamicInterface/Server_Request.h"
4 #include "tao/ORB_Core.h"
5 #include "tao/SystemException.h"
7 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
9 TAO_Dynamic_Adapter_Impl::TAO_Dynamic_Adapter_Impl ()
13 TAO_Dynamic_Adapter_Impl::~TAO_Dynamic_Adapter_Impl ()
17 void
18 TAO_Dynamic_Adapter_Impl::create_request (
19 CORBA::Object_ptr obj,
20 CORBA::ORB_ptr orb,
21 const char *operation,
22 CORBA::NVList_ptr arg_list,
23 CORBA::NamedValue_ptr result,
24 CORBA::ExceptionList_ptr exceptions,
25 CORBA::Request_ptr &request,
26 CORBA::Flags req_flags)
28 ACE_NEW_THROW_EX (request,
29 CORBA::Request (obj,
30 orb,
31 operation,
32 arg_list,
33 result,
34 req_flags,
35 exceptions
37 CORBA::NO_MEMORY (
38 CORBA::SystemException::_tao_minor_code (
39 TAO::VMCID,
40 ENOMEM
42 CORBA::COMPLETED_MAYBE
43 ));
46 CORBA::Request_ptr
47 TAO_Dynamic_Adapter_Impl::request (CORBA::Object_ptr obj,
48 CORBA::ORB_ptr orb,
49 const char *operation)
51 CORBA::Request_ptr req = CORBA::Request::_nil ();
52 ACE_NEW_THROW_EX (req,
53 CORBA::Request (obj,
54 orb,
55 operation
57 CORBA::NO_MEMORY (
58 CORBA::SystemException::_tao_minor_code (
59 TAO::VMCID,
60 ENOMEM
62 CORBA::COMPLETED_MAYBE
63 ));
65 return req;
68 CORBA::Boolean
69 TAO_Dynamic_Adapter_Impl::context_is_nil (CORBA::Context_ptr ctx)
71 return ctx == 0;
74 void
75 TAO_Dynamic_Adapter_Impl::context_release (CORBA::Context_ptr ctx)
77 if (ctx != 0)
79 ctx->_decr_refcount ();
83 CORBA::Boolean
84 TAO_Dynamic_Adapter_Impl::request_is_nil (CORBA::Request_ptr req)
86 return req == 0;
89 void
90 TAO_Dynamic_Adapter_Impl::request_release (CORBA::Request_ptr req)
92 if (req)
94 req->_decr_refcount ();
98 CORBA::Boolean
99 TAO_Dynamic_Adapter_Impl::server_request_is_nil (CORBA::ServerRequest_ptr req)
101 return req == 0;
104 void
105 TAO_Dynamic_Adapter_Impl::server_request_release (CORBA::ServerRequest_ptr req)
107 if (req)
109 req->_decr_refcount ();
113 void
114 TAO_Dynamic_Adapter_Impl::create_exception_list (
115 CORBA::ExceptionList_ptr &list)
117 ACE_NEW_THROW_EX (list,
118 CORBA::ExceptionList,
119 CORBA::NO_MEMORY (
120 CORBA::SystemException::_tao_minor_code (
121 TAO::VMCID,
122 ENOMEM
124 CORBA::COMPLETED_NO
129 TAO_Dynamic_Adapter_Impl::Initializer ()
131 TAO_ORB_Core::dynamic_adapter_name ("Concrete_Dynamic_Adapter");
132 return ACE_Service_Config::process_directive (ace_svc_desc_TAO_Dynamic_Adapter_Impl);
135 TAO_END_VERSIONED_NAMESPACE_DECL
137 ACE_STATIC_SVC_DEFINE (
138 TAO_Dynamic_Adapter_Impl,
139 ACE_TEXT ("Concrete_Dynamic_Adapter"),
140 ACE_SVC_OBJ_T,
141 &ACE_SVC_NAME (TAO_Dynamic_Adapter_Impl),
142 ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
146 ACE_FACTORY_DEFINE (TAO_DynamicInterface, TAO_Dynamic_Adapter_Impl)