From c4cd45a2fa3ea413e2a7a4f95e8b297bb1f72fbe Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Fri, 21 Jan 2005 06:58:20 +0000 Subject: *** empty log message *** --- .../be/be_visitor_operation/operation_sh.cpp | 5 ++-- .../be/be_visitor_operation/operation_ss.cpp | 30 ++++++++++------------ TAO/tao/Abstract_Servant_Base.h | 1 - TAO/tao/PortableServer/Object_Adapter.cpp | 11 ++++---- TAO/tao/PortableServer/Servant_Base.cpp | 1 - TAO/tao/PortableServer/ServerRequestInfo.cpp | 24 ++++++++++++----- TAO/tao/PortableServer/ServerRequestInfo.h | 11 -------- TAO/tao/PortableServer/ServerRequestInfo.inl | 2 -- TAO/tao/PortableServer/Upcall_Wrapper.cpp | 2 -- 9 files changed, 39 insertions(+), 48 deletions(-) diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp index 1c4f7ff9280..34412bd5c76 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_sh.cpp @@ -111,9 +111,8 @@ be_visitor_operation_sh::visit_operation (be_operation *node) *os << node->local_name () << "_skel (" << be_idt << be_idt_nl - << "TAO_ServerRequest &_tao_req," << be_nl - << "void *_tao_servant," << be_nl - << "void *_tao_servant_upcall" << be_nl + << "TAO_ServerRequest & server_request," << be_nl + << "void * servant_upcall" << be_nl << "ACE_ENV_ARG_DECL" << be_uidt_nl << ");" << be_uidt; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp index 0f68a3e6e0d..4f6a410c025 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -182,9 +182,8 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, *os << node->local_name () << "_skel (" << be_idt << be_idt_nl - << "TAO_ServerRequest &server_request," << be_nl - << "void *servant," << be_nl - << "void * TAO_INTERCEPTOR (servant_upcall)" << be_nl + << "TAO_ServerRequest & server_request," << be_nl + << "void * servant_upcall" << be_nl << "ACE_ENV_ARG_DECL" << be_uidt_nl << ")" << be_uidt_nl; @@ -193,6 +192,11 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, // last argument - is always CORBA::Environment. *os << "{" << be_idt_nl; + // Generate the local class encapsulating the actual servant upcall + // command/invocation. + be_visitor_operation_upcall_command_ss upcall_command_visitor (this->ctx_); + upcall_command_visitor.visit_operation (node); + // Generate all the tables and other pre-skel info. if (this->gen_pre_skel_info (node) == -1) { @@ -203,14 +207,6 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, -1); } - // Get the right object implementation. - *os << intf->full_skel_name () << " * const impl =" << be_idt_nl - << "static_cast<" << be_idt << be_idt_nl - << intf->full_skel_name () << " *> (" << be_nl - << "servant" << be_uidt_nl - << ");" << be_uidt << be_uidt_nl << be_nl; - - // Declare return type helper class. *os << "TAO::SArg_Traits< "; @@ -246,12 +242,14 @@ be_visitor_operation_ss::gen_skel_operation_body (be_operation * node, *os << "static size_t const nargs = " << (node->argument_count () + 1) << ";" << be_nl << be_nl; + // Get the right object implementation. + *os << intf->full_skel_name () << " * const impl =" << be_idt_nl + << "static_cast<" << be_idt << be_idt_nl + << intf->full_skel_name () << " *> (" << be_nl + << "servant_upcall->servant ()" << be_uidt_nl + << ");" << be_uidt << be_uidt_nl << be_nl; - // Generate the local class encapsulating the actual servant upcall - // command/invocation. - be_visitor_operation_upcall_command_ss upcall_command_visitor (this->ctx_); - upcall_command_visitor.visit_operation (node); - + // Upcall_Command instantiation. *os << be_nl << "Upcall_Command command (" << be_idt_nl << " impl"; diff --git a/TAO/tao/Abstract_Servant_Base.h b/TAO/tao/Abstract_Servant_Base.h index 2fb1e26a510..63775a046d2 100644 --- a/TAO/tao/Abstract_Servant_Base.h +++ b/TAO/tao/Abstract_Servant_Base.h @@ -56,7 +56,6 @@ namespace TAO typedef void (*TAO_Skeleton)( TAO_ServerRequest &, - void *, void * #if !defined (TAO_HAS_EXCEPTIONS) || defined (ACE_ENV_BKWD_COMPAT) , CORBA::Environment & diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp index b8502f4a588..185cf4a12c6 100644 --- a/TAO/tao/PortableServer/Object_Adapter.cpp +++ b/TAO/tao/PortableServer/Object_Adapter.cpp @@ -736,12 +736,11 @@ TAO_Object_Adapter::dispatch (TAO::ObjectKey &key, TAO::ServerRequestInterceptor_Adapter sri_adapter (request); TAO::ServerRequestInfo ri (request, - 0, - 0, - 0, - 0, - 0, - 0); + 0, // args + 0, // nargs + 0, // servant_upcall + 0, // exceptions + 0); // nexceptions ACE_TRY { diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index 4ec49883a3c..0c80f145555 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -230,7 +230,6 @@ void TAO_ServantBase::synchronous_upcall_dispatch (TAO_ServerRequest &req, // invoke the right operation on the skeleton class // (), and marshal any results. skel (req, - derived_this, servant_upcall ACE_ENV_ARG_PARAMETER); ACE_TRY_CHECK; diff --git a/TAO/tao/PortableServer/ServerRequestInfo.cpp b/TAO/tao/PortableServer/ServerRequestInfo.cpp index 26bde8f15ca..a8a1137efb1 100644 --- a/TAO/tao/PortableServer/ServerRequestInfo.cpp +++ b/TAO/tao/PortableServer/ServerRequestInfo.cpp @@ -466,14 +466,19 @@ TAO::ServerRequestInfo::target_most_derived_interface ( ACE_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { - if (this->servant_ == 0) + PortableServer::Servant const servant = + (this->servant_upcall_ == 0 + ? 0 + : this->servant_upcall_->servant ()); + + if (servant == 0) { ACE_THROW_RETURN (CORBA::NO_RESOURCES (CORBA::OMGVMCID | 1, CORBA::COMPLETED_NO), 0); } - return CORBA::string_dup (this->servant_->_interface_repository_id ()); + return CORBA::string_dup (servant->_interface_repository_id ()); } CORBA::Policy_ptr @@ -553,14 +558,21 @@ TAO::ServerRequestInfo::target_is_a (const char * id { // Implemented in the generated skeleton. - if (this->servant_ == 0) + PortableServer::Servant const servant = + (this->servant_upcall_ == 0 + ? 0 + : this->servant_upcall_->servant ()); + + + if (servant == 0) { ACE_THROW_RETURN (CORBA::NO_RESOURCES (CORBA::OMGVMCID | 1, - CORBA::COMPLETED_NO), 0); + CORBA::COMPLETED_NO), + 0); } - return this->servant_->_is_a (id - ACE_ENV_ARG_PARAMETER); + return servant->_is_a (id + ACE_ENV_ARG_PARAMETER); } void diff --git a/TAO/tao/PortableServer/ServerRequestInfo.h b/TAO/tao/PortableServer/ServerRequestInfo.h index 71df6a3643b..e5154137d4a 100644 --- a/TAO/tao/PortableServer/ServerRequestInfo.h +++ b/TAO/tao/PortableServer/ServerRequestInfo.h @@ -43,12 +43,6 @@ #endif /* _MSC_VER */ class TAO_Service_Context; -class TAO_ServantBase; - -namespace PortableServer -{ - typedef ::TAO_ServantBase ServantBase; -} namespace TAO { @@ -76,7 +70,6 @@ namespace TAO TAO::Argument * const * args, size_t nargs, void * servant_upcall, - PortableServer::ServantBase * servant, CORBA::TypeCode_ptr const exceptions[], size_t nexceptions); @@ -296,10 +289,6 @@ namespace TAO /// object ID, among other things. TAO_Object_Adapter::Servant_Upcall * const servant_upcall_; - /// Pointer to the actual servant to which the operation is - /// dispatched. - PortableServer::ServantBase * const servant_; - /// Array of @c TypeCodes for user exceptions the operation is /// capable of raising. CORBA::TypeCode_ptr const * const exceptions_; diff --git a/TAO/tao/PortableServer/ServerRequestInfo.inl b/TAO/tao/PortableServer/ServerRequestInfo.inl index c18c9e89871..3b5d68c4a8a 100644 --- a/TAO/tao/PortableServer/ServerRequestInfo.inl +++ b/TAO/tao/PortableServer/ServerRequestInfo.inl @@ -11,7 +11,6 @@ TAO::ServerRequestInfo::ServerRequestInfo ( TAO::Argument * const * args, size_t nargs, void * servant_upcall, - PortableServer::ServantBase * servant, CORBA::TypeCode_ptr const exceptions[], size_t nexceptions) : server_request_ (server_request) @@ -19,7 +18,6 @@ TAO::ServerRequestInfo::ServerRequestInfo ( , nargs_ (nargs) , servant_upcall_ ( static_cast (servant_upcall)) - , servant_ (servant) , exceptions_ (exceptions) , nexceptions_ (nexceptions) , caught_exception_ (0) diff --git a/TAO/tao/PortableServer/Upcall_Wrapper.cpp b/TAO/tao/PortableServer/Upcall_Wrapper.cpp index e478fecfb4b..f9e496bf89c 100644 --- a/TAO/tao/PortableServer/Upcall_Wrapper.cpp +++ b/TAO/tao/PortableServer/Upcall_Wrapper.cpp @@ -30,7 +30,6 @@ TAO::Upcall_Wrapper::upcall (TAO_ServerRequest & server_request, #if TAO_HAS_INTERCEPTORS == 1 , void * servant_upcall - , PortableServer::ServantBase * servant , CORBA::TypeCode_ptr const exceptions[] , size_t nexceptions #endif /* TAO_HAS_INTERCEPTORS == 1 */ @@ -50,7 +49,6 @@ TAO::Upcall_Wrapper::upcall (TAO_ServerRequest & server_request, args, nargs, servant_upcall, - servant, exceptions, nexceptions); -- cgit v1.2.1