summaryrefslogtreecommitdiff
path: root/TAO/tao/Object.cpp
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-01-23 17:13:14 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-01-23 17:13:14 +0000
commit393c54c845640cf4db830c156d0a73776e859cc5 (patch)
tree3831c655544e353df08361e8c2e61d7c3e14f117 /TAO/tao/Object.cpp
parentdca05965e1a89e48b7e80c73dff9bc8aac256079 (diff)
downloadATCD-393c54c845640cf4db830c156d0a73776e859cc5.tar.gz
ChangeLogTag: Tue Jan 23 11:08:00 2001 Jeff Parsons <parsons@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/Object.cpp')
-rw-r--r--TAO/tao/Object.cpp83
1 files changed, 23 insertions, 60 deletions
diff --git a/TAO/tao/Object.cpp b/TAO/tao/Object.cpp
index 41948a3893d..a95bf711096 100644
--- a/TAO/tao/Object.cpp
+++ b/TAO/tao/Object.cpp
@@ -13,10 +13,7 @@
#include "tao/debug.h"
#include "tao/Remote_Object_Proxy_Broker.h"
#include "tao/Dynamic_Adapter.h"
-
-#if (TAO_HAS_INTERFACE_REPOSITORY == 1)
-#include "tao/InterfaceC.h"
-#endif /* TAO_HAS_INTERFACE_REPOSITORY == 1 */
+#include "tao/IFR_Client_Adapter.h"
#include "ace/Dynamic_Service.h"
@@ -370,70 +367,36 @@ CORBA_Object::_non_existent (CORBA::Environment &ACE_TRY_ENV)
return _tao_retval;
}
-#if (TAO_HAS_INTERFACE_REPOSITORY == 1)
-
-IR::InterfaceDef_ptr
-CORBA_Object::_get_interface (CORBA::Environment &ACE_TRY_ENV)
+CORBA_IRObject_ptr
+CORBA_Object::_get_interface_def (CORBA::Environment &ACE_TRY_ENV)
{
- IR::InterfaceDef_ptr _tao_retval = IR::InterfaceDef::_nil();
-
- TAO_Stub *istub = this->_stubobj ();
- if (istub == 0)
- ACE_THROW_RETURN (CORBA::INTERNAL (
- CORBA_SystemException::_tao_minor_code (
- TAO_DEFAULT_MINOR_CODE,
- EINVAL),
- CORBA::COMPLETED_NO),
- _tao_retval);
-
-
- TAO_GIOP_Twoway_Invocation _tao_call (
- istub,
- "_interface",
- 10,
- 0,
- istub->orb_core ()
- );
-
- for (;;)
- {
- _tao_call.start (ACE_TRY_ENV);
- ACE_CHECK_RETURN (_tao_retval);
-
- CORBA::Short flag = TAO_TWOWAY_RESPONSE_FLAG;
+ TAO_IFR_Client_Adapter *adapter =
+ ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
+ TAO_ORB_Core::ifr_client_adapter_name ()
+ );
- _tao_call.prepare_header (ACE_static_cast (CORBA::Octet, flag),
- ACE_TRY_ENV);
- ACE_CHECK_RETURN (_tao_retval);
+ CORBA::ORB_var orb = this->_stubobj ()->servant_orb_var ();
- int _invoke_status =
- _tao_call.invoke (0, 0, ACE_TRY_ENV);
- ACE_CHECK_RETURN (_tao_retval);
+ return adapter->get_interface_def (orb.in (),
+ this->_interface_repository_id (),
+ ACE_TRY_ENV);
+}
- if (_invoke_status == TAO_INVOKE_RESTART)
- continue;
- // if (_invoke_status == TAO_INVOKE_EXCEPTION)
- // cannot happen
- if (_invoke_status != TAO_INVOKE_OK)
- {
- ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE,
- CORBA::COMPLETED_YES),
- _tao_retval);
- }
- break;
- }
+IR_InterfaceDef *
+CORBA_Object::_get_interface (CORBA::Environment &ACE_TRY_ENV)
+{
+ TAO_IFR_Client_Adapter *adapter =
+ ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
+ TAO_ORB_Core::ifr_client_adapter_name ()
+ );
- TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
- if (!(
- (_tao_in >> _tao_retval)
- ))
- ACE_THROW_RETURN (CORBA::MARSHAL (), _tao_retval);
+ CORBA::ORB_var orb = this->_stubobj ()->servant_orb_var ();
- return _tao_retval;
+ return adapter->get_interface (orb.in (),
+ this->_interface_repository_id (),
+ ACE_TRY_ENV);
}
-#endif /* TAO_HAS_INTERFACE_REPOSITORY == 1 */
-
CORBA::ImplementationDef_ptr
CORBA_Object::_get_implementation (CORBA::Environment &)
{