2 #include "tao/Remote_Object_Proxy_Broker.h"
3 #include "tao/CORBA_String.h"
4 #include "tao/UB_String_Arguments.h"
5 #include "tao/Special_Basic_Arguments.h"
6 #include "tao/Invocation_Adapter.h"
7 #include "tao/IFR_Client_Adapter.h"
8 #include "tao/ORB_Core.h"
9 #include "tao/SystemException.h"
11 #include "ace/Dynamic_Service.h"
13 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
18 Remote_Object_Proxy_Broker::_is_a (CORBA::Object_ptr target
,
21 TAO::Arg_Traits
<ACE_InputCDR::to_boolean
>::ret_val _tao_retval
;
22 TAO::Arg_Traits
<char *>::in_arg_val
_tao_id (type_id
);
24 TAO::Argument
*_tao_signature
[] =
30 TAO::Invocation_Adapter
tao_call (target
,
35 TAO::TAO_CO_NONE
| TAO::TAO_CO_THRU_POA_STRATEGY
);
37 tao_call
.invoke (nullptr, 0);
39 return _tao_retval
.retn ();
42 #if (TAO_HAS_MINIMUM_CORBA == 0)
45 Remote_Object_Proxy_Broker::_non_existent (CORBA::Object_ptr target
)
47 TAO::Arg_Traits
<ACE_InputCDR::to_boolean
>::ret_val _tao_retval
;
49 TAO::Argument
*_tao_signature
[] =
54 TAO::Invocation_Adapter
_tao_call (target
,
59 TAO::TAO_CO_NONE
| TAO::TAO_CO_THRU_POA_STRATEGY
);
61 _tao_call
.invoke (nullptr, 0);
63 return _tao_retval
.retn ();
67 Remote_Object_Proxy_Broker::_get_component (CORBA::Object_ptr target
)
69 TAO::Arg_Traits
<CORBA::Object
>::ret_val _tao_retval
;
71 TAO::Argument
*_tao_signature
[] =
76 TAO::Invocation_Adapter
_tao_call (target
,
81 TAO::TAO_CO_NONE
| TAO::TAO_CO_THRU_POA_STRATEGY
);
83 _tao_call
.invoke (nullptr, 0);
85 return _tao_retval
.retn ();
88 CORBA::InterfaceDef_ptr
89 Remote_Object_Proxy_Broker::_get_interface (CORBA::Object_ptr target
)
91 TAO_IFR_Client_Adapter
*adapter
=
92 ACE_Dynamic_Service
<TAO_IFR_Client_Adapter
>::instance (
93 TAO_ORB_Core::ifr_client_adapter_name ());
95 if (adapter
== nullptr)
97 throw ::CORBA::INTF_REPOS ();
100 return adapter
->get_interface_remote (target
);
104 Remote_Object_Proxy_Broker::_repository_id (CORBA::Object_ptr target
)
106 TAO::Arg_Traits
< ::CORBA::Char
*>::ret_val _tao_retval
;
108 TAO::Argument
*_tao_signature
[] =
113 TAO::Invocation_Adapter
_tao_call (target
,
118 TAO::TAO_CO_NONE
| TAO::TAO_CO_THRU_POA_STRATEGY
);
120 _tao_call
.invoke (nullptr, 0);
122 return _tao_retval
.retn ();
124 #endif /* TAO_HAS_MINIMUM_CORBA == 0 */
127 // -----------------------------------------------------
129 TAO::Remote_Object_Proxy_Broker
*
130 the_tao_remote_object_proxy_broker ()
132 static TAO::Remote_Object_Proxy_Broker the_broker
;
136 TAO_END_VERSIONED_NAMESPACE_DECL