Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / PortableServer / Direct_Collocation_Upcall_Wrapper.cpp
blob09f21adaec486bccc779f5af98a3088569ad2748
1 // -*- C++ -*-
2 #include "tao/PortableServer/Direct_Collocation_Upcall_Wrapper.h"
4 #if (TAO_HAS_MINIMUM_CORBA == 0)
5 # include "tao/PortableServer/ForwardRequestC.h"
6 #endif /* TAO_HAS_MINIMUM_CORBA == 0 */
8 #include "tao/Abstract_Servant_Base.h"
9 #include "tao/ORB_Constants.h"
10 #include "tao/Object.h"
11 #include "tao/SystemException.h"
13 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
15 void
16 TAO::Direct_Collocation_Upcall_Wrapper::upcall (
17 CORBA::Object_ptr obj,
18 CORBA::Object_out forward_obj,
19 bool & is_forwarded,
20 TAO::Argument ** args,
21 int,
22 const char * op,
23 size_t op_len,
24 TAO::Collocation_Strategy strategy)
26 TAO_Abstract_ServantBase * const servant = obj->_servant ();
28 TAO_Collocated_Skeleton collocated_skel;
30 if (servant->_find (op, collocated_skel, strategy, op_len) == -1)
32 throw ::CORBA::BAD_OPERATION (CORBA::OMGVMCID | 2, CORBA::COMPLETED_NO);
35 #if (TAO_HAS_MINIMUM_CORBA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
36 try
38 #endif /* TAO_HAS_MINIMUM_CORBA && !CORBA_E_COMPACT && !CORBA_E_MICRO*/
39 collocated_skel (servant, args);
40 #if (TAO_HAS_MINIMUM_CORBA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
42 catch (const ::PortableServer::ForwardRequest& forward_request)
44 forward_obj =
45 CORBA::Object::_duplicate (forward_request.forward_reference.in ());
46 is_forwarded = true;
48 #else
49 ACE_UNUSED_ARG (forward_obj);
50 ACE_UNUSED_ARG (is_forwarded);
51 #endif /* TAO_HAS_MINIMUM_CORBA && !CORBA_E_COMPACT && !CORBA_E_MICRO*/
54 TAO_END_VERSIONED_NAMESPACE_DECL