Direct_Collocation_Upcall_Wrapper.cpp

Go to the documentation of this file.
00001 // $Id: Direct_Collocation_Upcall_Wrapper.cpp 76995 2007-02-11 12:51:42Z johnnyw $
00002 
00003 #include "tao/PortableServer/Direct_Collocation_Upcall_Wrapper.h"
00004 
00005 #if (TAO_HAS_MINIMUM_CORBA == 0)
00006 # include "tao/PortableServer/ForwardRequestC.h"
00007 #endif  /* TAO_HAS_MINIMUM_CORBA == 0 */
00008 
00009 #include "tao/Abstract_Servant_Base.h"
00010 #include "tao/ORB_Constants.h"
00011 #include "tao/Object.h"
00012 #include "tao/SystemException.h"
00013 
00014 ACE_RCSID (PortableServer,
00015            Direct_Collocation_Upcall_Wrapper,
00016            "$Id: Direct_Collocation_Upcall_Wrapper.cpp 76995 2007-02-11 12:51:42Z johnnyw $")
00017 
00018 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00019 
00020 void
00021 TAO::Direct_Collocation_Upcall_Wrapper::upcall (
00022   CORBA::Object_ptr obj,
00023   CORBA::Object_out forward_obj,
00024   TAO::Argument ** args,
00025   int num_args,
00026   const char * op,
00027   size_t op_len,
00028   TAO::Collocation_Strategy strategy)
00029 {
00030   TAO_Abstract_ServantBase * const servant = obj->_servant ();
00031 
00032   TAO_Collocated_Skeleton collocated_skel;
00033 
00034   if (servant->_find (op, collocated_skel, strategy, op_len) == -1)
00035     {
00036       throw ::CORBA::BAD_OPERATION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO);
00037     }
00038 
00039 #if (TAO_HAS_MINIMUM_CORBA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00040   try
00041     {
00042 #endif /* TAO_HAS_MINIMUM_CORBA && !CORBA_E_COMPACT && !CORBA_E_MICRO*/
00043       collocated_skel (servant, args, num_args);
00044 #if (TAO_HAS_MINIMUM_CORBA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00045     }
00046   catch (const ::PortableServer::ForwardRequest& forward_request)
00047     {
00048       forward_obj =
00049         CORBA::Object::_duplicate (forward_request.forward_reference.in ());
00050     }
00051 #else
00052   ACE_UNUSED_ARG (forward_obj);
00053 #endif /* TAO_HAS_MINIMUM_CORBA && !CORBA_E_COMPACT && !CORBA_E_MICRO*/
00054 }
00055 
00056 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 13:23:42 2008 for TAO_PortableServer by doxygen 1.3.6