Dynamic_Adapter_Impl.cpp

Go to the documentation of this file.
00001 // $Id: Dynamic_Adapter_Impl.cpp 76995 2007-02-11 12:51:42Z johnnyw $
00002 
00003 #include "tao/DynamicInterface/Dynamic_Adapter_Impl.h"
00004 
00005 ACE_RCSID(DynamicInterface, TAO_Dynamic_Adapter_Impl, "$Id: Dynamic_Adapter_Impl.cpp 76995 2007-02-11 12:51:42Z johnnyw $")
00006 
00007 #include "tao/DynamicInterface/Request.h"
00008 #include "tao/DynamicInterface/Server_Request.h"
00009 #include "tao/ORB_Core.h"
00010 #include "tao/SystemException.h"
00011 
00012 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00013 
00014 TAO_Dynamic_Adapter_Impl::TAO_Dynamic_Adapter_Impl (void)
00015 {
00016 }
00017 
00018 TAO_Dynamic_Adapter_Impl::~TAO_Dynamic_Adapter_Impl (void)
00019 {
00020 }
00021 
00022 void
00023 TAO_Dynamic_Adapter_Impl::create_request (
00024     CORBA::Object_ptr obj,
00025     CORBA::ORB_ptr orb,
00026     const char *operation,
00027     CORBA::NVList_ptr arg_list,
00028     CORBA::NamedValue_ptr result,
00029     CORBA::ExceptionList_ptr exceptions,
00030     CORBA::Request_ptr &request,
00031     CORBA::Flags req_flags)
00032 {
00033   ACE_NEW_THROW_EX (request,
00034                     CORBA::Request (obj,
00035                                     orb,
00036                                     operation,
00037                                     arg_list,
00038                                     result,
00039                                     req_flags,
00040                                     exceptions
00041                                    ),
00042                     CORBA::NO_MEMORY (
00043                         CORBA::SystemException::_tao_minor_code (
00044                             TAO::VMCID,
00045                             ENOMEM
00046                           ),
00047                         CORBA::COMPLETED_MAYBE
00048                       ));
00049 }
00050 
00051 CORBA::Request_ptr
00052 TAO_Dynamic_Adapter_Impl::request (CORBA::Object_ptr obj,
00053                                    CORBA::ORB_ptr orb,
00054                                    const char *operation)
00055 {
00056   CORBA::Request_ptr req = CORBA::Request::_nil ();
00057   ACE_NEW_THROW_EX (req,
00058                     CORBA::Request (obj,
00059                                     orb,
00060                                     operation
00061                                    ),
00062                     CORBA::NO_MEMORY (
00063                         CORBA::SystemException::_tao_minor_code (
00064                             TAO::VMCID,
00065                             ENOMEM
00066                           ),
00067                         CORBA::COMPLETED_MAYBE
00068                       ));
00069 
00070   return req;
00071 }
00072 
00073 CORBA::Boolean
00074 TAO_Dynamic_Adapter_Impl::context_is_nil (CORBA::Context_ptr ctx)
00075 {
00076   return ctx == 0;
00077 }
00078 
00079 void
00080 TAO_Dynamic_Adapter_Impl::context_release (CORBA::Context_ptr ctx)
00081 {
00082   if (ctx != 0)
00083     {
00084       ctx->_decr_refcnt ();
00085     }
00086 }
00087 
00088 CORBA::Boolean
00089 TAO_Dynamic_Adapter_Impl::request_is_nil (CORBA::Request_ptr req)
00090 {
00091   return req == 0;
00092 }
00093 
00094 void
00095 TAO_Dynamic_Adapter_Impl::request_release (CORBA::Request_ptr req)
00096 {
00097   if (req != 0)
00098     {
00099       req->_decr_refcnt ();
00100     }
00101 }
00102 
00103 CORBA::Boolean
00104 TAO_Dynamic_Adapter_Impl::server_request_is_nil (CORBA::ServerRequest_ptr req)
00105 {
00106   return req == 0;
00107 }
00108 
00109 void
00110 TAO_Dynamic_Adapter_Impl::server_request_release (CORBA::ServerRequest_ptr req)
00111 {
00112   if (req != 0)
00113     {
00114       req->_decr_refcnt ();
00115     }
00116 }
00117 
00118 void
00119 TAO_Dynamic_Adapter_Impl::create_exception_list (
00120     CORBA::ExceptionList_ptr &list)
00121 {
00122   ACE_NEW_THROW_EX (list,
00123                     CORBA::ExceptionList,
00124                     CORBA::NO_MEMORY (
00125                         CORBA::SystemException::_tao_minor_code (
00126                             TAO::VMCID,
00127                             ENOMEM
00128                           ),
00129                         CORBA::COMPLETED_NO
00130                       ));
00131 }
00132 
00133 int
00134 TAO_Dynamic_Adapter_Impl::Initializer (void)
00135 {
00136   TAO_ORB_Core::dynamic_adapter_name ("Concrete_Dynamic_Adapter");
00137   return ACE_Service_Config::process_directive (ace_svc_desc_TAO_Dynamic_Adapter_Impl);
00138 }
00139 
00140 TAO_END_VERSIONED_NAMESPACE_DECL
00141 
00142 ACE_STATIC_SVC_DEFINE (
00143     TAO_Dynamic_Adapter_Impl,
00144     ACE_TEXT ("Concrete_Dynamic_Adapter"),
00145     ACE_SVC_OBJ_T,
00146     &ACE_SVC_NAME (TAO_Dynamic_Adapter_Impl),
00147     ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
00148     0
00149   )
00150 
00151 ACE_FACTORY_DEFINE (TAO_DynamicInterface, TAO_Dynamic_Adapter_Impl)

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