summaryrefslogtreecommitdiff
path: root/TAO/tao/DomainC.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-04 04:00:45 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-04 04:00:45 +0000
commit75199592fba5b7a9828bfcb400f0db57b38d7214 (patch)
tree81c992b953412f4bed23b92bf71a73c81fee5981 /TAO/tao/DomainC.cpp
parent46e280e93bfa55ad35478770b2515b818f495438 (diff)
downloadATCD-75199592fba5b7a9828bfcb400f0db57b38d7214.tar.gz
ChangeLogTag:Tue Apr 3 20:56:48 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/DomainC.cpp')
-rw-r--r--TAO/tao/DomainC.cpp1723
1 files changed, 1112 insertions, 611 deletions
diff --git a/TAO/tao/DomainC.cpp b/TAO/tao/DomainC.cpp
index e4110dca797..a997afe8471 100644
--- a/TAO/tao/DomainC.cpp
+++ b/TAO/tao/DomainC.cpp
@@ -1,105 +1,165 @@
-/* -*- C++ -*- $Id$ */
-
-// ****** Code generated by the The ACE ORB (TAO) IDL Compiler *******
-// TAO and the TAO IDL Compiler have been developed by the Center for
-// Distributed Object Computing at Washington University, St. Louis.
+// -*- C++ -*-
+//
+// $Id$
+
+// **** Code generated by the The ACE ORB (TAO) IDL Compiler ****
+// TAO and the TAO IDL Compiler have been developed by:
+// Center for Distributed Object Computing
+// Washington University
+// St. Louis, MO
+// USA
+// http://www.cs.wustl.edu/~schmidt/doc-center.html
+// and
+// Distributed Object Computing Laboratory
+// University of California at Irvine
+// Irvine, CA
+// USA
+// http://doc.ece.uci.edu/
//
// Information about TAO is available at:
-// http://www.cs.wustl.edu/~schmidt/TAO.html
+// http://www.cs.wustl.edu/~schmidt/TAO.html
#include "DomainC.h"
-#include "Stub.h"
-#include "Invocation.h"
-#include "Exception.h"
+
+#include "tao/Stub.h"
+#include "tao/Invocation.h"
+#include "tao/ClientRequestInfo.h"
+#if TAO_HAS_INTERCEPTORS == 1
+#include "tao/RequestInfo_Util.h"
+#endif /* TAO_HAS_INTERCEPTORS == 1 */
#include "tao/IFR_Client_Adapter.h"
-#include "ORB_Core.h"
#include "ace/Dynamic_Service.h"
+#if defined (__BORLANDC__)
+#pragma option -w-rvl -w-rch -w-ccc -w-aus
+#endif /* __BORLANDC__ */
+
#if !defined (__ACE_INLINE__)
#include "DomainC.i"
#endif /* !defined INLINE */
-#include "PortableInterceptor.h"
-#include "RequestInfo_Util.h"
-// default constructor
-CORBA_DomainManager::CORBA_DomainManager (void)
-{}
+#if (TAO_HAS_INTERCEPTORS == 1)
+class TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy : public TAO_ClientRequestInfo
+{
+public:
+ TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy (
+ TAO_GIOP_Invocation *_tao_invocation,
+ CORBA::Object_ptr _tao_target,
+ const CORBA::PolicyType & policy_type,
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ );
-// destructor
-CORBA_DomainManager::~CORBA_DomainManager (void)
+ virtual Dynamic::ParameterList * arguments (
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual Dynamic::ExceptionList * exceptions (
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Any * result (
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ void result (CORBA::Policy_ptr result);
+
+private:
+ TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy (const TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy &);
+ void operator= (const TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy &);
+
+ const CORBA::PolicyType & policy_type_;
+ CORBA::Policy_ptr _result;
+};
+
+TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy (
+ TAO_GIOP_Invocation *_tao_invocation,
+ CORBA::Object_ptr _tao_target,
+ const CORBA::PolicyType & policy_type,
+ CORBA::Environment &
+ )
+ : TAO_ClientRequestInfo (_tao_invocation, _tao_target),
+ policy_type_ (policy_type)
{}
-void CORBA_DomainManager::_tao_any_destructor (void *x)
+Dynamic::ParameterList *
+TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::arguments (CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
- CORBA_DomainManager *tmp = ACE_static_cast (CORBA_DomainManager*,x);
- CORBA::release (tmp);
+ // Generate the argument list on demand.
+ Dynamic::ParameterList *parameter_list =
+ TAO_RequestInfo_Util::make_parameter_list (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+
+ Dynamic::ParameterList_var safe_parameter_list = parameter_list;
+
+ CORBA::ULong length_policy_type = parameter_list->length ();
+ parameter_list->length (length_policy_type + 1);
+ (*parameter_list)[length_policy_type].argument <<= policy_type_;
+ (*parameter_list)[length_policy_type].mode = Dynamic::PARAM_IN;
+
+ return safe_parameter_list._retn ();
}
-CORBA_DomainManager_ptr CORBA_DomainManager::_narrow (
- CORBA::Object_ptr obj,
- CORBA::Environment &ACE_TRY_ENV
- )
+Dynamic::ExceptionList *
+TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::exceptions (CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
- if (CORBA::is_nil (obj))
- return CORBA_DomainManager::_nil ();
- if (! obj->_is_local ())
- {
- CORBA::Boolean is_a = obj->_is_a ("IDL:CORBA/DomainManager:1.0", ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA_DomainManager::_nil ());
- if (is_a == 0)
- return CORBA_DomainManager::_nil ();
- }
- return CORBA_DomainManager::_unchecked_narrow (obj, ACE_TRY_ENV);
+ // Generate the exception list on demand.
+ Dynamic::ExceptionList *exception_list =
+ TAO_RequestInfo_Util::make_exception_list (ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+
+ return exception_list;
}
-CORBA_DomainManager_ptr CORBA_DomainManager::_unchecked_narrow (
- CORBA::Object_ptr obj,
- CORBA::Environment &
- )
+
+CORBA::Any *
+TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::result (CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
{
- if (CORBA::is_nil (obj))
- return CORBA_DomainManager::_nil ();
- if (! obj->_is_local ())
- {
- TAO_Stub* stub = obj->_stubobj ();
- if (stub)
- stub->_incr_refcnt ();
- CORBA_DomainManager_ptr default_proxy = CORBA_DomainManager::_nil ();
+ // Generate the result on demand.
+ CORBA::Boolean tk_void_any = 0;
+ CORBA::Any *result_any =
+ TAO_RequestInfo_Util::make_any (tk_void_any, ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
- if (obj->_is_collocated () && _TAO_collocation_CORBA_DomainManager_Stub_Factory_function_pointer != 0)
- {
- default_proxy = _TAO_collocation_CORBA_DomainManager_Stub_Factory_function_pointer (obj);
- }
- if (CORBA::is_nil (default_proxy))
- ACE_NEW_RETURN (default_proxy, ::CORBA_DomainManager (stub), CORBA_DomainManager::_nil ());
- return default_proxy;
- }
- else
- return
- ACE_reinterpret_cast
- (
- CORBA_DomainManager_ptr,
- obj->_tao_QueryInterface
- (
- ACE_reinterpret_cast
- (
- ptr_arith_t,
- &CORBA_DomainManager::_narrow
- )
- )
- );
+ CORBA::Any_var safe_result_any = result_any;
+
+ (*result_any) <<= this->_result;
+ return safe_result_any._retn ();
}
-CORBA_DomainManager_ptr
-CORBA_DomainManager::_duplicate (CORBA_DomainManager_ptr obj)
+void
+TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::result (CORBA::Policy_ptr result)
{
- if (!CORBA::is_nil (obj))
- obj->_add_ref ();
- return obj;
+ // update the result
+ this->_result = result;
}
-CORBA::Policy_ptr CORBA_DomainManager::get_domain_policy (
+#endif /* TAO_HAS_INTERCEPTORS */
+
+///////////////////////////////////////////////////////////////////////
+// Base & Remote Proxy Implementation.
+//
+
+_TAO_CORBA_DomainManager_Proxy_Impl::_TAO_CORBA_DomainManager_Proxy_Impl (void)
+{}
+
+_TAO_CORBA_DomainManager_Remote_Proxy_Impl::_TAO_CORBA_DomainManager_Remote_Proxy_Impl (void)
+{}
+
+// Remote Implementation of the IDL interface methods
+
+CORBA::Policy_ptr _TAO_CORBA_DomainManager_Remote_Proxy_Impl::get_domain_policy (
+ CORBA_Object *_collocated_tao_target_,
CORBA::PolicyType policy_type,
CORBA::Environment &ACE_TRY_ENV
)
@@ -112,7 +172,7 @@ CORBA::Policy_ptr CORBA_DomainManager::get_domain_policy (
CORBA::Policy_var _tao_safe_retval (_tao_retval);
- TAO_Stub *istub = this->_stubobj ();
+ TAO_Stub *istub = _collocated_tao_target_->_stubobj ();
if (istub == 0)
ACE_THROW_RETURN (CORBA::INTERNAL (), 0);
@@ -126,99 +186,308 @@ CORBA::Policy_ptr CORBA_DomainManager::get_domain_policy (
);
#if (TAO_HAS_INTERCEPTORS == 1)
- TAO_ClientRequestInterceptor_Adapter
- _tao_vfr (istub->orb_core ()->client_request_interceptors ());
+ TAO_ClientRequestInterceptor_Adapter _tao_vfr (
+ istub->orb_core ()->client_request_interceptors ()
+ );
- CORBA_DomainManager::TAO_ClientRequest_Info_CORBA_DomainManager_get_domain_policy
- ri (&_tao_call,
- this,
- policy_type);
+#endif /* TAO_HAS_INTERCEPTORS */
- ACE_TRY
+ for (;;)
{
+ int _invoke_status = TAO_INVOKE_EXCEPTION;
+
+#if TAO_HAS_INTERCEPTORS == 1
+ TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy ri (
+ &_tao_call,
+ _collocated_tao_target_,
+ policy_type,
+ ACE_TRY_ENV
+ );
+ ACE_CHECK_RETURN (0);
+
+ ACE_TRY
+ {
#endif /* TAO_HAS_INTERCEPTORS */
- for (;;)
- {
- _tao_call.start (ACE_TRY_ENV);
- TAO_INTERCEPTOR_CHECK_RETURN (0);
+ _tao_call.start (ACE_TRY_ENV);
+ TAO_INTERCEPTOR_CHECK_RETURN (0);
+
+ CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG;
+ TAO_INTERCEPTOR (ri.response_expected (1));
- TAO_INTERCEPTOR (
- _tao_vfr.send_request (
+ TAO_INTERCEPTOR (
+ _tao_vfr.send_request (
&ri,
ACE_TRY_ENV
)
- );
- TAO_INTERCEPTOR_CHECK_RETURN (0);
- CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG;
+ );
+ TAO_INTERCEPTOR_CHECK_RETURN (0);
- _tao_call.prepare_header (
- ACE_static_cast (CORBA::Octet, _tao_response_flag), ACE_TRY_ENV
- );
- TAO_INTERCEPTOR_CHECK_RETURN (0);
+ _tao_call.prepare_header (
+ ACE_static_cast (CORBA::Octet, _tao_response_flag),
+ ACE_TRY_ENV
+ );
+ TAO_INTERCEPTOR_CHECK_RETURN (0);
- TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
- if (!(
- (_tao_out << policy_type)
- ))
- TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (), 0);
+ TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
+ if (!(
+ (_tao_out << policy_type)
+ ))
+ TAO_INTERCEPTOR_THROW_RETURN (
+ CORBA::MARSHAL (),
+ 0
+ );
+
+ _invoke_status =
+ _tao_call.invoke (0, 0, ACE_TRY_ENV);
+ TAO_INTERCEPTOR_CHECK_RETURN (0);
+
+ if (_invoke_status == TAO_INVOKE_EXCEPTION)
+ {
+ TAO_INTERCEPTOR_THROW_RETURN (
+ CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES),
+ 0
+ );
+
+ }
+
+ TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
+ if (!(
+ (_tao_in >> _tao_safe_retval.inout ())
+ ))
+ {
+ TAO_INTERCEPTOR_THROW_RETURN (
+ CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES),
+ 0
+ );
+
+ }
+
+ TAO_INTERCEPTOR (
+ CORBA::Policy_ptr _tao_retval_info = _tao_safe_retval._retn ();
+ ri.result (_tao_retval_info);
+ _tao_safe_retval = _tao_retval_info;
+ );
+
+ TAO_INTERCEPTOR (
+ ri.reply_status (_invoke_status);
+ if (_invoke_status == TAO_INVOKE_OK)
+ {
+ _tao_vfr.receive_reply (
+ &ri,
+ ACE_TRY_ENV
+ );
+ }
+ else
+ {
+ _tao_vfr.receive_other (
+ &ri,
+ ACE_TRY_ENV
+ );
+ }
+
+ );
+ TAO_INTERCEPTOR_CHECK_RETURN (0);
+
+#if TAO_HAS_INTERCEPTORS == 1
+ }
+ ACE_CATCH (PortableInterceptor::ForwardRequest, exc)
+ {
+ _invoke_status =
+ _tao_call.location_forward (exc.forward.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ ri.forward_reference (exc);
+ _tao_vfr.receive_other (
+ &ri,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCHANY
+ {
+ ri.exception (&ACE_ANY_EXCEPTION);
+ _tao_vfr.receive_exception (
+ &ri,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ ACE_RE_THROW;
+ }
+ ACE_ENDTRY;
+ ACE_CHECK_RETURN (0);
- int _invoke_status =
- _tao_call.invoke (0, 0, ACE_TRY_ENV);
- TAO_INTERCEPTOR_CHECK_RETURN (0);
+#endif /* TAO_HAS_INTERCEPTORS */
if (_invoke_status == TAO_INVOKE_RESTART)
- continue;
- if (_invoke_status != TAO_INVOKE_OK)
- {
- TAO_INTERCEPTOR_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);
+ {
+ _tao_call.restart_flag (1);
+ continue;
+ }
- }
- TAO_InputCDR &_tao_in = _tao_call.inp_stream ();
- if (!(
- (_tao_in >> _tao_safe_retval.inout ())
- ))
- TAO_INTERCEPTOR_THROW_RETURN (CORBA::MARSHAL (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), 0);
- TAO_INTERCEPTOR (
- CORBA::Policy_ptr _tao_retval_info = _tao_safe_retval._retn ();
+ break;
+ }
+ return _tao_safe_retval._retn ();
+}
- ri.result (_tao_retval_info);
- _tao_safe_retval = _tao_retval_info;
- );
+//
+// End Base & Remote Proxy Implemeentation.
+///////////////////////////////////////////////////////////////////////
- TAO_INTERCEPTOR (
- _tao_vfr.receive_reply (
- &ri,
- ACE_TRY_ENV
- )
- );
- TAO_INTERCEPTOR_CHECK_RETURN (0);
- break;
- }
-#if (TAO_HAS_INTERCEPTORS == 1)
+///////////////////////////////////////////////////////////////////////
+// Remote & Base Proxy Broker Implementation
+//
+_TAO_CORBA_DomainManager_Proxy_Broker::_TAO_CORBA_DomainManager_Proxy_Broker (void)
+{
}
-ACE_CATCHANY
- {
- ri.exception (&ACE_ANY_EXCEPTION);
- _tao_vfr.receive_exception (
- &ri,
- ACE_TRY_ENV
- );
- ACE_RE_THROW;
- }
-ACE_ENDTRY;
-ACE_CHECK_RETURN (0);
-#endif /* TAO_HAS_INTERCEPTORS */
-return _tao_safe_retval._retn ();
+
+_TAO_CORBA_DomainManager_Proxy_Broker::~_TAO_CORBA_DomainManager_Proxy_Broker (void)
+{
+}
+
+_TAO_CORBA_DomainManager_Proxy_Broker * (*_TAO_CORBA_DomainManager_Proxy_Broker_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+
+// Factory Member function Implementation.
+_TAO_CORBA_DomainManager_Remote_Proxy_Broker *
+_TAO_CORBA_DomainManager_Remote_Proxy_Broker::the_TAO_CORBA_DomainManager_Remote_Proxy_Broker (void)
+{
+ static ::_TAO_CORBA_DomainManager_Remote_Proxy_Broker remote_proxy_broker;
+ return &remote_proxy_broker;
+}
+
+_TAO_CORBA_DomainManager_Remote_Proxy_Broker::_TAO_CORBA_DomainManager_Remote_Proxy_Broker (void)
+{
+}
+
+_TAO_CORBA_DomainManager_Remote_Proxy_Broker::~_TAO_CORBA_DomainManager_Remote_Proxy_Broker (void)
+{
+}
+
+_TAO_CORBA_DomainManager_Proxy_Impl&
+_TAO_CORBA_DomainManager_Remote_Proxy_Broker::select_proxy (
+ ::CORBA_DomainManager *,
+ CORBA::Environment &
+)
+{
+ return this->remote_proxy_impl_;
+}
+
+
+//
+// End Remote & Base Proxy Broker Implementation
+///////////////////////////////////////////////////////////////////////
+
+
+// default constructor
+CORBA_DomainManager::CORBA_DomainManager (int collocated)
+{
+ this->CORBA_DomainManager_setup_collocation (collocated);
+}
+
+// destructor
+CORBA_DomainManager::~CORBA_DomainManager (void)
+{}
+
+void
+CORBA_DomainManager::CORBA_DomainManager_setup_collocation (int collocated)
+{
+ if (collocated)
+ this->the_TAO_CORBA_DomainManager_Proxy_Broker_ =
+ ::_TAO_CORBA_DomainManager_Proxy_Broker_Factory_function_pointer (this);
+ else
+ this->the_TAO_CORBA_DomainManager_Proxy_Broker_ =
+ ::_TAO_CORBA_DomainManager_Remote_Proxy_Broker::the_TAO_CORBA_DomainManager_Remote_Proxy_Broker ();
+}
+
+void CORBA_DomainManager::_tao_any_destructor (void *x)
+{
+ CORBA_DomainManager *tmp = ACE_static_cast (CORBA_DomainManager*,x);
+ CORBA::release (tmp);
+}
+
+CORBA_DomainManager_ptr CORBA_DomainManager::_narrow (
+ CORBA::Object_ptr obj,
+ CORBA::Environment &ACE_TRY_ENV
+ )
+{
+ if (CORBA::is_nil (obj))
+ return CORBA_DomainManager::_nil ();
+ if (! obj->_is_local ())
+ {
+ CORBA::Boolean is_a = obj->_is_a ("IDL:CORBA_DomainManager:1.0", ACE_TRY_ENV);
+ ACE_CHECK_RETURN (CORBA_DomainManager::_nil ());
+ if (is_a == 0)
+ return CORBA_DomainManager::_nil ();
+ }
+ return CORBA_DomainManager::_unchecked_narrow (obj, ACE_TRY_ENV);
+}
+
+CORBA_DomainManager_ptr CORBA_DomainManager::_unchecked_narrow (
+ CORBA::Object_ptr obj,
+ CORBA::Environment &
+ )
+{
+ if (CORBA::is_nil (obj))
+ return CORBA_DomainManager::_nil ();
+ if (! obj->_is_local ())
+ {
+ TAO_Stub* stub = obj->_stubobj ();
+ if (stub)
+ stub->_incr_refcnt ();
+ CORBA_DomainManager_ptr default_proxy = CORBA_DomainManager::_nil ();
+
+ if (
+ !CORBA::is_nil (stub->servant_orb_var ().ptr ()) &&
+ stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () &&
+ obj->_is_collocated () &&_TAO_CORBA_DomainManager_Proxy_Broker_Factory_function_pointer != 0
+ )
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::CORBA_DomainManager (
+ stub,
+ 1,
+ obj->_servant ()),
+
+ CORBA_DomainManager::_nil ());
+ }
+ if (CORBA::is_nil (default_proxy))
+ ACE_NEW_RETURN (default_proxy, ::CORBA_DomainManager (stub, 0, obj->_servant ()), CORBA_DomainManager::_nil ());
+ return default_proxy;
+ }
+ else
+ return
+ ACE_reinterpret_cast
+ (
+ CORBA_DomainManager_ptr,
+ obj->_tao_QueryInterface
+ (
+ ACE_reinterpret_cast
+ (
+ ptr_arith_t,
+ &CORBA_DomainManager::_narrow
+ )
+ )
+ );
+}
+
+CORBA_DomainManager_ptr
+CORBA_DomainManager::_duplicate (CORBA_DomainManager_ptr obj)
+{
+ if (!CORBA::is_nil (obj))
+ obj->_add_ref ();
+ return obj;
}
CORBA::Boolean CORBA_DomainManager::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
if (
- (!ACE_OS::strcmp ((char *)value, "IDL:CORBA/DomainManager:1.0")) ||
+ (!ACE_OS::strcmp ((char *)value, "IDL:CORBA_DomainManager:1.0")) ||
(!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
return 1; // success using local knowledge
else
@@ -233,10 +502,8 @@ void *CORBA_DomainManager::_tao_QueryInterface (ptr_arith_t type)
&CORBA_DomainManager::_narrow))
retv = ACE_reinterpret_cast (void*, this);
else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_narrow))
- retv = ACE_reinterpret_cast (
- void *,
- ACE_static_cast (CORBA::Object_ptr, this)
- );
+ retv = ACE_reinterpret_cast (void *,
+ ACE_static_cast (CORBA::Object_ptr, this));
if (retv)
this->_add_ref ();
@@ -245,44 +512,146 @@ void *CORBA_DomainManager::_tao_QueryInterface (ptr_arith_t type)
const char* CORBA_DomainManager::_interface_repository_id (void) const
{
- return "IDL:CORBA/DomainManager:1.0";
+ return "IDL:CORBA_DomainManager:1.0";
}
+CORBA::Policy_ptr CORBA_DomainManager::get_domain_policy (
+ CORBA::PolicyType policy_type,
+ CORBA::Environment &ACE_TRY_ENV
+ )
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
+{
+ _TAO_CORBA_DomainManager_Proxy_Impl &proxy =
+ this->the_TAO_CORBA_DomainManager_Proxy_Broker_->select_proxy (this, ACE_TRY_ENV);
+ ACE_CHECK_RETURN (0);
+
+ return proxy.get_domain_policy (
+ this,
+ policy_type,
+ ACE_TRY_ENV
+ );
+}
+
+static const CORBA::Long _oc_CORBA_DomainManager[] =
+{
+ TAO_ENCAP_BYTE_ORDER, // byte order
+ 28,
+ ACE_NTOHL (0x49444c3a),
+ ACE_NTOHL (0x434f5242),
+ ACE_NTOHL (0x415f446f),
+ ACE_NTOHL (0x6d61696e),
+ ACE_NTOHL (0x4d616e61),
+ ACE_NTOHL (0x6765723a),
+ ACE_NTOHL (0x312e3000), // repository ID = IDL:CORBA_DomainManager:1.0
+ 20,
+ ACE_NTOHL (0x434f5242),
+ ACE_NTOHL (0x415f446f),
+ ACE_NTOHL (0x6d61696e),
+ ACE_NTOHL (0x4d616e61),
+ ACE_NTOHL (0x67657200), // name = CORBA_DomainManager
+};
+
+static CORBA::TypeCode _tc_TAO_tc_CORBA_DomainManager (
+ CORBA::tk_objref,
+ sizeof (_oc_CORBA_DomainManager),
+ (char *) &_oc_CORBA_DomainManager,
+ 0,
+ sizeof (CORBA_DomainManager)
+ );
+
+CORBA::TypeCode_ptr _tc_CORBA_DomainManager =
+ &_tc_TAO_tc_CORBA_DomainManager;
+
#if (TAO_HAS_INTERCEPTORS == 1)
+class TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager : public TAO_ClientRequestInfo
+{
+public:
+ TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager (
+ TAO_GIOP_Invocation *_tao_invocation,
+ CORBA::Object_ptr _tao_target,
+ CORBA::InterfaceDef_ptr object_type,
+ const CORBA::Boolean & constr_policy,
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ );
-CORBA_DomainManager::TAO_ClientRequest_Info_CORBA_DomainManager_get_domain_policy::TAO_ClientRequest_Info_CORBA_DomainManager_get_domain_policy (
+ virtual Dynamic::ParameterList * arguments (
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual Dynamic::ExceptionList * exceptions (
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+ virtual CORBA::Any * result (
+ CORBA::Environment &ACE_TRY_ENV =
+ TAO_default_environment ()
+ )
+ ACE_THROW_SPEC ((CORBA::SystemException));
+
+private:
+ TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager (const TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager &);
+ void operator= (const TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager &);
+
+ CORBA::InterfaceDef_ptr object_type_;
+ const CORBA::Boolean & constr_policy_;
+
+};
+
+TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager::TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager (
TAO_GIOP_Invocation *_tao_invocation,
- CORBA::Object *_tao_target,
- CORBA::PolicyType &policy_type)
+ CORBA::Object_ptr _tao_target,
+ CORBA::InterfaceDef_ptr object_type,
+ const CORBA::Boolean & constr_policy,
+ CORBA::Environment &
+ )
: TAO_ClientRequestInfo (_tao_invocation, _tao_target),
- policy_type_ (policy_type)
+ object_type_ (object_type),
+ constr_policy_ (constr_policy)
{}
Dynamic::ParameterList *
-CORBA_DomainManager::TAO_ClientRequest_Info_CORBA_DomainManager_get_domain_policy::arguments (CORBA::Environment &ACE_TRY_ENV)
+TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager::arguments (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
+ // Generate the argument list on demand.
Dynamic::ParameterList *parameter_list =
TAO_RequestInfo_Util::make_parameter_list (ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
Dynamic::ParameterList_var safe_parameter_list = parameter_list;
- // Generate the arg list on demand
- CORBA::ULong len = parameter_list->length ();
- parameter_list->length (len + 1);
- (*parameter_list)[len].argument <<= this->policy_type_;
+ TAO_IFR_Client_Adapter *adapter =
+ ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
+ TAO_ORB_Core::ifr_client_adapter_name ()
+ );
- (*parameter_list)[len].mode = Dynamic::PARAM_IN;
+ CORBA::ULong length_object_type = parameter_list->length ();
+ parameter_list->length (length_object_type + 1);
+ adapter->interfacedef_any_insert (
+ (*parameter_list)[length_object_type].argument,
+ this->object_type_
+ );
+
+ (*parameter_list)[length_object_type].mode = Dynamic::PARAM_IN;
+
+ CORBA::ULong length_constr_policy = parameter_list->length ();
+ parameter_list->length (length_constr_policy + 1);
+ (*parameter_list)[length_constr_policy].argument <<= CORBA::Any::from_boolean (this->constr_policy_);
+ (*parameter_list)[length_constr_policy].mode = Dynamic::PARAM_IN;
return safe_parameter_list._retn ();
}
Dynamic::ExceptionList *
-CORBA_DomainManager::TAO_ClientRequest_Info_CORBA_DomainManager_get_domain_policy::exceptions (
- CORBA::Environment &ACE_TRY_ENV
- )
+TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager::exceptions (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Generate the exception list on demand.
@@ -295,114 +664,35 @@ CORBA_DomainManager::TAO_ClientRequest_Info_CORBA_DomainManager_get_domain_polic
CORBA::Any *
-CORBA_DomainManager::TAO_ClientRequest_Info_CORBA_DomainManager_get_domain_policy::result (
- CORBA::Environment &ACE_TRY_ENV
- )
+TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager::result (CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
{
// Generate the result on demand.
- CORBA::Boolean tk_void_any = 0;
+ CORBA::Boolean tk_void_any = 1;
CORBA::Any *result_any =
TAO_RequestInfo_Util::make_any (tk_void_any, ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
- CORBA::Any_var safe_result_any = result_any;
-
- (*result_any) <<= this->_result;
-
- return safe_result_any._retn ();
-}
-
-void
-CORBA_DomainManager::TAO_ClientRequest_Info_CORBA_DomainManager_get_domain_policy::result (CORBA::Policy_ptr result)
-{
- // update the result
- this->_result = result;
+ return result_any;
}
#endif /* TAO_HAS_INTERCEPTORS */
-#if (TAO_HAS_MINIMUM_CORBA == 0)
+///////////////////////////////////////////////////////////////////////
+// Base & Remote Proxy Implementation.
+//
-// default constructor
-CORBA_ConstructionPolicy::CORBA_ConstructionPolicy (void)
+_TAO_CORBA_ConstructionPolicy_Proxy_Impl::_TAO_CORBA_ConstructionPolicy_Proxy_Impl (void)
{}
-// destructor
-CORBA_ConstructionPolicy::~CORBA_ConstructionPolicy (void)
+_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Impl::_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Impl (void)
{}
-void CORBA_ConstructionPolicy::_tao_any_destructor (void *x)
-{
- CORBA_ConstructionPolicy *tmp = ACE_static_cast (CORBA_ConstructionPolicy*,x);
- CORBA::release (tmp);
-}
-
-CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy::_narrow (
- CORBA::Object_ptr obj,
- CORBA::Environment &ACE_TRY_ENV
- )
-{
- if (CORBA::is_nil (obj))
- return CORBA_ConstructionPolicy::_nil ();
- if (! obj->_is_local ())
- {
- CORBA::Boolean is_a = obj->_is_a ("IDL:CORBA/ConstructionPolicy:1.0", ACE_TRY_ENV);
- ACE_CHECK_RETURN (CORBA_ConstructionPolicy::_nil ());
- if (is_a == 0)
- return CORBA_ConstructionPolicy::_nil ();
- }
- return CORBA_ConstructionPolicy::_unchecked_narrow (obj, ACE_TRY_ENV);
-}
-
-CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy::_unchecked_narrow (
- CORBA::Object_ptr obj,
- CORBA::Environment &
- )
-{
- if (CORBA::is_nil (obj))
- return CORBA_ConstructionPolicy::_nil ();
- if (! obj->_is_local ())
- {
- TAO_Stub* stub = obj->_stubobj ();
- if (stub)
- stub->_incr_refcnt ();
- CORBA_ConstructionPolicy_ptr default_proxy = CORBA_ConstructionPolicy::_nil ();
-
- if (obj->_is_collocated () && _TAO_collocation_CORBA_ConstructionPolicy_Stub_Factory_function_pointer != 0)
- {
- default_proxy = _TAO_collocation_CORBA_ConstructionPolicy_Stub_Factory_function_pointer (obj);
- }
- if (CORBA::is_nil (default_proxy))
- ACE_NEW_RETURN (default_proxy, ::CORBA_ConstructionPolicy (stub), CORBA_ConstructionPolicy::_nil ());
- return default_proxy;
- }
- else
- return
- ACE_reinterpret_cast
- (
- CORBA_ConstructionPolicy_ptr,
- obj->_tao_QueryInterface
- (
- ACE_reinterpret_cast
- (
- ptr_arith_t,
- &CORBA_ConstructionPolicy::_narrow
- )
- )
- );
-}
+// Remote Implementation of the IDL interface methods
-CORBA_ConstructionPolicy_ptr
-CORBA_ConstructionPolicy::_duplicate (CORBA_ConstructionPolicy_ptr obj)
-{
- if (!CORBA::is_nil (obj))
- obj->_add_ref ();
- return obj;
-}
-
-void CORBA_ConstructionPolicy::make_domain_manager (
- CORBA_InterfaceDef_ptr object_type,
+void _TAO_CORBA_ConstructionPolicy_Remote_Proxy_Impl::make_domain_manager (
+ CORBA_Object *_collocated_tao_target_,
+ CORBA::InterfaceDef_ptr object_type,
CORBA::Boolean constr_policy,
CORBA::Environment &ACE_TRY_ENV
)
@@ -410,7 +700,11 @@ void CORBA_ConstructionPolicy::make_domain_manager (
CORBA::SystemException
))
{
- TAO_Stub *istub = this->_stubobj ();
+
+
+
+
+ TAO_Stub *istub = _collocated_tao_target_->_stubobj ();
if (istub == 0)
ACE_THROW (CORBA::INTERNAL ());
@@ -424,97 +718,298 @@ void CORBA_ConstructionPolicy::make_domain_manager (
);
#if (TAO_HAS_INTERCEPTORS == 1)
-
TAO_ClientRequestInterceptor_Adapter _tao_vfr (
istub->orb_core ()->client_request_interceptors ()
);
- CORBA_ConstructionPolicy::TAO_ClientRequest_Info_CORBA_ConstructionPolicy_make_domain_manager ri (
- &_tao_call,
- this,
- object_type,
- constr_policy,
- ACE_TRY_ENV
- );
- ACE_CHECK;
- ACE_TRY
- {
-#endif /* TAO_HAS_INTERCEPTORS */
+#endif /* TAO_HAS_INTERCEPTORS */
- TAO_IFR_Client_Adapter *adapter =
- ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
- TAO_ORB_Core::ifr_client_adapter_name ()
- );
+ TAO_IFR_Client_Adapter *adapter =
+ ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
+ TAO_ORB_Core::ifr_client_adapter_name ()
+ );
- for (;;)
+ for (;;)
+ {
+ int _invoke_status = TAO_INVOKE_EXCEPTION;
+
+#if TAO_HAS_INTERCEPTORS == 1
+ TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager ri (
+ &_tao_call,
+ _collocated_tao_target_,
+ object_type,
+ constr_policy,
+ ACE_TRY_ENV
+ );
+ ACE_CHECK;
+
+ ACE_TRY
{
+#endif /* TAO_HAS_INTERCEPTORS */
+
_tao_call.start (ACE_TRY_ENV);
TAO_INTERCEPTOR_CHECK;
+ CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG;
+ TAO_INTERCEPTOR (ri.response_expected (1));
+
TAO_INTERCEPTOR (
- _tao_vfr.send_request (
- &ri,
- ACE_TRY_ENV
- )
- );
+ _tao_vfr.send_request (
+ &ri,
+ ACE_TRY_ENV
+ )
+ );
TAO_INTERCEPTOR_CHECK;
- CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG;
_tao_call.prepare_header (
- ACE_static_cast (CORBA::Octet, _tao_response_flag), ACE_TRY_ENV
+ ACE_static_cast (CORBA::Octet, _tao_response_flag),
+ ACE_TRY_ENV
);
TAO_INTERCEPTOR_CHECK;
TAO_OutputCDR &_tao_out = _tao_call.out_stream ();
if (!(
- (adapter->interfacedef_cdr_insert (_tao_out, object_type)) &&
- (_tao_out << CORBA::Any::from_boolean (constr_policy))
+ (adapter->interfacedef_cdr_insert (_tao_out, object_type)) &&
+ (_tao_out << CORBA::Any::from_boolean (constr_policy))
))
- TAO_INTERCEPTOR_THROW (CORBA::MARSHAL());
- int _invoke_status =
+ TAO_INTERCEPTOR_THROW (
+ CORBA::MARSHAL ()
+ );
+
+ _invoke_status =
_tao_call.invoke (0, 0, ACE_TRY_ENV);
- TAO_INTERCEPTOR_CHECK;
+ TAO_INTERCEPTOR_CHECK;
+
+ if (_invoke_status == TAO_INVOKE_EXCEPTION)
+ {
+ TAO_INTERCEPTOR_THROW (
+ CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES)
+ );
+
+ }
- if (_invoke_status == TAO_INVOKE_RESTART)
- continue;
- if (_invoke_status != TAO_INVOKE_OK)
- {
- TAO_INTERCEPTOR_THROW (CORBA::UNKNOWN(TAO_DEFAULT_MINOR_CODE,
- CORBA::COMPLETED_YES));
- }
TAO_INTERCEPTOR (
- _tao_vfr.receive_reply (
- &ri,
- ACE_TRY_ENV
- )
+ ri.reply_status (_invoke_status);
+ if (_invoke_status == TAO_INVOKE_OK)
+ {
+ _tao_vfr.receive_reply (
+ &ri,
+ ACE_TRY_ENV
+ );
+ }
+ else
+ {
+ _tao_vfr.receive_other (
+ &ri,
+ ACE_TRY_ENV
+ );
+ }
+
);
TAO_INTERCEPTOR_CHECK;
- break;
+
+#if TAO_HAS_INTERCEPTORS == 1
+ }
+ ACE_CATCH (PortableInterceptor::ForwardRequest, exc)
+ {
+ _invoke_status =
+ _tao_call.location_forward (exc.forward.in (), ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ ri.forward_reference (exc);
+ _tao_vfr.receive_other (
+ &ri,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
}
+ ACE_CATCHANY
+ {
+ ri.exception (&ACE_ANY_EXCEPTION);
+ _tao_vfr.receive_exception (
+ &ri,
+ ACE_TRY_ENV
+ );
+ ACE_TRY_CHECK;
+ ACE_RE_THROW;
+ }
+ ACE_ENDTRY;
+ ACE_CHECK;
-#if (TAO_HAS_INTERCEPTORS == 1)
+#endif /* TAO_HAS_INTERCEPTORS */
+ if (_invoke_status == TAO_INVOKE_RESTART)
+ {
+ _tao_call.restart_flag (1);
+ continue;
+ }
+
+ break;
}
- ACE_CATCHANY
+
+}
+
+
+//
+// End Base & Remote Proxy Implemeentation.
+///////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////
+// Remote & Base Proxy Broker Implementation
+//
+
+_TAO_CORBA_ConstructionPolicy_Proxy_Broker::_TAO_CORBA_ConstructionPolicy_Proxy_Broker (void)
+{
+}
+
+_TAO_CORBA_ConstructionPolicy_Proxy_Broker::~_TAO_CORBA_ConstructionPolicy_Proxy_Broker (void)
+{
+}
+
+_TAO_CORBA_ConstructionPolicy_Proxy_Broker * (*_TAO_CORBA_ConstructionPolicy_Proxy_Broker_Factory_function_pointer) (
+ CORBA::Object_ptr obj
+ ) = 0;
+
+// Factory Member function Implementation.
+_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker *
+_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker::the_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker (void)
+{
+ static ::_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker remote_proxy_broker;
+ return &remote_proxy_broker;
+}
+
+_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker::_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker (void)
+{
+}
+
+_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker::~_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker (void)
+{
+}
+
+_TAO_CORBA_ConstructionPolicy_Proxy_Impl&
+_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker::select_proxy (
+ ::CORBA_ConstructionPolicy *,
+ CORBA::Environment &
+)
+{
+ return this->remote_proxy_impl_;
+}
+
+
+//
+// End Remote & Base Proxy Broker Implementation
+///////////////////////////////////////////////////////////////////////
+
+
+// default constructor
+CORBA_ConstructionPolicy::CORBA_ConstructionPolicy (int collocated)
+{
+ this->CORBA_ConstructionPolicy_setup_collocation (collocated);
+}
+
+// destructor
+CORBA_ConstructionPolicy::~CORBA_ConstructionPolicy (void)
+{}
+
+void
+CORBA_ConstructionPolicy::CORBA_ConstructionPolicy_setup_collocation (int collocated)
+{
+ if (collocated)
+ this->the_TAO_CORBA_ConstructionPolicy_Proxy_Broker_ =
+ ::_TAO_CORBA_ConstructionPolicy_Proxy_Broker_Factory_function_pointer (this);
+ else
+ this->the_TAO_CORBA_ConstructionPolicy_Proxy_Broker_ =
+ ::_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker::the_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Broker ();
+
+ this->CORBA_Policy_setup_collocation (collocated);
+}
+
+void CORBA_ConstructionPolicy::_tao_any_destructor (void *x)
+{
+ CORBA_ConstructionPolicy *tmp = ACE_static_cast (CORBA_ConstructionPolicy*,x);
+ CORBA::release (tmp);
+}
+
+CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy::_narrow (
+ CORBA::Object_ptr obj,
+ CORBA::Environment &ACE_TRY_ENV
+ )
+{
+ if (CORBA::is_nil (obj))
+ return CORBA_ConstructionPolicy::_nil ();
+ if (! obj->_is_local ())
{
- ri.exception (&ACE_ANY_EXCEPTION);
- _tao_vfr.receive_exception (
- &ri,
- ACE_TRY_ENV
- );
- ACE_RE_THROW;
+ CORBA::Boolean is_a = obj->_is_a ("IDL:CORBA_ConstructionPolicy:1.0", ACE_TRY_ENV);
+ ACE_CHECK_RETURN (CORBA_ConstructionPolicy::_nil ());
+ if (is_a == 0)
+ return CORBA_ConstructionPolicy::_nil ();
}
- ACE_ENDTRY;
- ACE_CHECK;
+ return CORBA_ConstructionPolicy::_unchecked_narrow (obj, ACE_TRY_ENV);
+}
-#endif /* TAO_HAS_INTERCEPTORS */
+CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy::_unchecked_narrow (
+ CORBA::Object_ptr obj,
+ CORBA::Environment &
+ )
+{
+ if (CORBA::is_nil (obj))
+ return CORBA_ConstructionPolicy::_nil ();
+ if (! obj->_is_local ())
+ {
+ TAO_Stub* stub = obj->_stubobj ();
+ if (stub)
+ stub->_incr_refcnt ();
+ CORBA_ConstructionPolicy_ptr default_proxy = CORBA_ConstructionPolicy::_nil ();
+
+ if (
+ !CORBA::is_nil (stub->servant_orb_var ().ptr ()) &&
+ stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects () &&
+ obj->_is_collocated () &&_TAO_CORBA_ConstructionPolicy_Proxy_Broker_Factory_function_pointer != 0
+ )
+ {
+ ACE_NEW_RETURN (
+ default_proxy,
+ ::CORBA_ConstructionPolicy (
+ stub,
+ 1,
+ obj->_servant ()),
+
+ CORBA_ConstructionPolicy::_nil ());
+ }
+ if (CORBA::is_nil (default_proxy))
+ ACE_NEW_RETURN (default_proxy, ::CORBA_ConstructionPolicy (stub, 0, obj->_servant ()), CORBA_ConstructionPolicy::_nil ());
+ return default_proxy;
+ }
+ else
+ return
+ ACE_reinterpret_cast
+ (
+ CORBA_ConstructionPolicy_ptr,
+ obj->_tao_QueryInterface
+ (
+ ACE_reinterpret_cast
+ (
+ ptr_arith_t,
+ &CORBA_ConstructionPolicy::_narrow
+ )
+ )
+ );
+}
+
+CORBA_ConstructionPolicy_ptr
+CORBA_ConstructionPolicy::_duplicate (CORBA_ConstructionPolicy_ptr obj)
+{
+ if (!CORBA::is_nil (obj))
+ obj->_add_ref ();
+ return obj;
}
CORBA::Boolean CORBA_ConstructionPolicy::_is_a (const CORBA::Char *value, CORBA::Environment &ACE_TRY_ENV)
{
if (
- (!ACE_OS::strcmp ((char *)value, "IDL:CORBA/ConstructionPolicy:1.0")) ||
+ (!ACE_OS::strcmp ((char *)value, "IDL:CORBA_ConstructionPolicy:1.0")) ||
(!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Policy:1.0")) ||
(!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0")))
return 1; // success using local knowledge
@@ -552,169 +1047,78 @@ void *CORBA_ConstructionPolicy::_tao_QueryInterface (ptr_arith_t type)
const char* CORBA_ConstructionPolicy::_interface_repository_id (void) const
{
- return "IDL:CORBA/ConstructionPolicy:1.0";
-}
-
-
-#if (TAO_HAS_INTERCEPTORS == 1)
-
-CORBA_ConstructionPolicy::TAO_ClientRequest_Info_CORBA_ConstructionPolicy_make_domain_manager::TAO_ClientRequest_Info_CORBA_ConstructionPolicy_make_domain_manager (
- TAO_GIOP_Invocation *_tao_invocation,
- CORBA::Object *_tao_target,
- IR_InterfaceDef *object_type,
- CORBA::Boolean &constr_policy,
- CORBA::Environment &
- )
- : TAO_ClientRequestInfo (_tao_invocation, _tao_target),
- object_type_ (object_type),
- constr_policy_ (constr_policy)
-{}
-
-Dynamic::ParameterList *
-CORBA_ConstructionPolicy::TAO_ClientRequest_Info_CORBA_ConstructionPolicy_make_domain_manager::arguments (CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Generate the arg list on demand.
- Dynamic::ParameterList *parameter_list =
- TAO_RequestInfo_Util::make_parameter_list (ACE_TRY_ENV);
- ACE_CHECK_RETURN (0);
-
- Dynamic::ParameterList_var safe_parameter_list = parameter_list;
-
- CORBA::ULong len = parameter_list->length ();
- parameter_list->length (len + 1);
-
- TAO_IFR_Client_Adapter *adapter =
- ACE_Dynamic_Service<TAO_IFR_Client_Adapter>::instance (
- TAO_ORB_Core::ifr_client_adapter_name ()
- );
-
- adapter->interfacedef_any_insert ((*parameter_list)[len].argument,
- this->object_type_);
-
- (*parameter_list)[len].mode = Dynamic::PARAM_IN;
- len = parameter_list->length ();
- parameter_list->length (len + 1);
- (*parameter_list)[len].argument <<= CORBA::Any::from_boolean (this->constr_policy_ );
- (*parameter_list)[len].mode = Dynamic::PARAM_IN;
-
- return safe_parameter_list._retn ();
-}
-
-Dynamic::ExceptionList *
-CORBA_ConstructionPolicy::TAO_ClientRequest_Info_CORBA_ConstructionPolicy_make_domain_manager::exceptions (
- CORBA::Environment &ACE_TRY_ENV
- )
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // Generate the exception list on demand.
- Dynamic::ExceptionList *exception_list =
- TAO_RequestInfo_Util::make_exception_list (ACE_TRY_ENV);
- ACE_CHECK_RETURN (0);
-
- return exception_list;
+ return "IDL:CORBA_ConstructionPolicy:1.0";
}
-
-CORBA::Any *
-CORBA_ConstructionPolicy::TAO_ClientRequest_Info_CORBA_ConstructionPolicy_make_domain_manager::result (
+void CORBA_ConstructionPolicy::make_domain_manager (
+ CORBA::InterfaceDef_ptr object_type,
+ CORBA::Boolean constr_policy,
CORBA::Environment &ACE_TRY_ENV
)
- ACE_THROW_SPEC ((CORBA::SystemException))
+ ACE_THROW_SPEC ((
+ CORBA::SystemException
+ ))
{
- // Generate the result on demand.
- CORBA::Boolean tk_void_any = 1;
- CORBA::Any *result_any =
- TAO_RequestInfo_Util::make_any (tk_void_any, ACE_TRY_ENV);
- ACE_CHECK_RETURN (0);
-
- return result_any;
-}
-
-#endif /* TAO_HAS_INTERCEPTORS */
-
-CORBA_ConstructionPolicy_ptr (*_TAO_collocation_CORBA_ConstructionPolicy_Stub_Factory_function_pointer) (
- CORBA::Object_ptr obj
- ) = 0;
+ _TAO_CORBA_ConstructionPolicy_Proxy_Impl &proxy =
+ this->the_TAO_CORBA_ConstructionPolicy_Proxy_Broker_->select_proxy (this, ACE_TRY_ENV);
+ ACE_CHECK;
-void operator<<= (CORBA::Any &_tao_any, CORBA_ConstructionPolicy_ptr _tao_elem)
-{
- TAO_OutputCDR stream;
- if (stream << _tao_elem)
- {
- _tao_any._tao_replace (
- CORBA::_tc_ConstructionPolicy,
- TAO_ENCAP_BYTE_ORDER,
- stream.begin (),
- 1,
- CORBA_ConstructionPolicy::_duplicate (_tao_elem),
- CORBA_ConstructionPolicy::_tao_any_destructor
- );
- }
+ proxy.make_domain_manager (
+ this,
+ object_type,
+ constr_policy,
+ ACE_TRY_ENV
+ );
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_ConstructionPolicy_ptr &_tao_elem)
+static const CORBA::Long _oc_CORBA_ConstructionPolicy[] =
{
- ACE_TRY_NEW_ENV
- {
- _tao_elem = CORBA_ConstructionPolicy::_nil ();
- CORBA::TypeCode_var type = _tao_any.type ();
- CORBA::Boolean result =
- type->equivalent (CORBA::_tc_ConstructionPolicy, ACE_TRY_ENV);
- ACE_TRY_CHECK;
-
- if (!result)
- {
- return 0;
- }
-
- TAO_InputCDR stream (
- _tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ()
- );
- if (stream >> _tao_elem)
- {
- ((CORBA::Any *)&_tao_any)->_tao_replace (
- CORBA::_tc_ConstructionPolicy,
- 1,
- _tao_elem,
- CORBA_ConstructionPolicy::_tao_any_destructor
- );
- return 1;
- }
- }
- ACE_CATCHANY
- {
- _tao_elem = CORBA_ConstructionPolicy::_nil ();
- return 0;
- }
- ACE_ENDTRY;
- _tao_elem = CORBA_ConstructionPolicy::_nil ();
- return 0;
-}
+ TAO_ENCAP_BYTE_ORDER, // byte order
+ 33,
+ ACE_NTOHL (0x49444c3a),
+ ACE_NTOHL (0x434f5242),
+ ACE_NTOHL (0x415f436f),
+ ACE_NTOHL (0x6e737472),
+ ACE_NTOHL (0x75637469),
+ ACE_NTOHL (0x6f6e506f),
+ ACE_NTOHL (0x6c696379),
+ ACE_NTOHL (0x3a312e30),
+ ACE_NTOHL (0x0), // repository ID = IDL:CORBA_ConstructionPolicy:1.0
+ 25,
+ ACE_NTOHL (0x434f5242),
+ ACE_NTOHL (0x415f436f),
+ ACE_NTOHL (0x6e737472),
+ ACE_NTOHL (0x75637469),
+ ACE_NTOHL (0x6f6e506f),
+ ACE_NTOHL (0x6c696379),
+ ACE_NTOHL (0x0), // name = CORBA_ConstructionPolicy
+};
+
+static CORBA::TypeCode _tc_TAO_tc_CORBA_ConstructionPolicy (
+ CORBA::tk_objref,
+ sizeof (_oc_CORBA_ConstructionPolicy),
+ (char *) &_oc_CORBA_ConstructionPolicy,
+ 0,
+ sizeof (CORBA_ConstructionPolicy)
+ );
+
+CORBA::TypeCode_ptr _tc_CORBA_ConstructionPolicy =
+ &_tc_TAO_tc_CORBA_ConstructionPolicy;
-#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
- defined (ACE_HAS_GNU_REPO)
-template class TAO_Object_Manager<CORBA_ConstructionPolicy,CORBA_ConstructionPolicy_var>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Manager<CORBA_ConstructionPolicy,CORBA_ConstructionPolicy_var>
-#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
-
-#endif /* TAO_HAS_MINIMUM_CORBA */
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
#if !defined (__TAO_UNBOUNDED_OBJECT_SEQUENCE_CORBA_DOMAINMANAGERLIST_CS_)
#define __TAO_UNBOUNDED_OBJECT_SEQUENCE_CORBA_DOMAINMANAGERLIST_CS_
-// The Base_Sequence functions, please see tao/Sequence.h
-void
-_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_allocate_buffer (CORBA::ULong length)
-{
- CORBA_DomainManager **tmp = 0;
- tmp = _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::allocbuf (length);
+ // The Base_Sequence functions, please see tao/Sequence.h
+ void
+ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_allocate_buffer (CORBA::ULong length)
+ {
+ CORBA_DomainManager **tmp = 0;
+ tmp = _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::allocbuf (length);
- if (this->buffer_ != 0)
+ if (this->buffer_ != 0)
{
CORBA_DomainManager **old = ACE_reinterpret_cast (CORBA_DomainManager**, this->buffer_);
for (CORBA::ULong i = 0; i < this->length_; ++i)
@@ -727,58 +1131,58 @@ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_allocate_buffer (CORBA:
delete[] old;
}
- this->buffer_ = tmp;
-}
+ this->buffer_ = tmp;
+ }
-void
-_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_deallocate_buffer (void)
-{
- if (this->buffer_ == 0 || this->release_ == 0)
- return;
- CORBA_DomainManager **tmp = ACE_reinterpret_cast (CORBA_DomainManager**, this->buffer_);
- for (CORBA::ULong i = 0; i < this->length_; ++i)
+ void
+ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_deallocate_buffer (void)
+ {
+ if (this->buffer_ == 0 || this->release_ == 0)
+ return;
+ CORBA_DomainManager **tmp = ACE_reinterpret_cast (CORBA_DomainManager**, this->buffer_);
+ for (CORBA::ULong i = 0; i < this->length_; ++i)
{
CORBA::release (tmp[i]);
tmp[i] = CORBA_DomainManager::_nil ();
}
- _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::freebuf (tmp);
- this->buffer_ = 0;
-}
+ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::freebuf (tmp);
+ this->buffer_ = 0;
+ }
-_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::~_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList (void)
-{
- this->_deallocate_buffer ();
-}
+ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::~_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList (void)
+ {
+ this->_deallocate_buffer ();
+ }
-void
-_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_shrink_buffer (CORBA::ULong nl, CORBA::ULong ol)
-{
- CORBA_DomainManager **tmp = ACE_reinterpret_cast (CORBA_DomainManager**, this->buffer_);
+ void
+ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_shrink_buffer (CORBA::ULong nl, CORBA::ULong ol)
+ {
+ CORBA_DomainManager **tmp = ACE_reinterpret_cast (CORBA_DomainManager**, this->buffer_);
- for (CORBA::ULong i = nl; i < ol; ++i)
+ for (CORBA::ULong i = nl; i < ol; ++i)
{
CORBA::release (tmp[i]);
tmp[i] = CORBA_DomainManager::_nil ();
}
-}
-
-void
-_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_downcast (
- void* target,
- CORBA_Object *src,
- CORBA_Environment &ACE_TRY_ENV
- )
-{
- CORBA_DomainManager **tmp = ACE_static_cast (CORBA_DomainManager**, target);
- *tmp = CORBA_DomainManager::_narrow (src, ACE_TRY_ENV);
-}
+ }
+ void
+ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_downcast (
+ void* target,
+ CORBA_Object *src,
+ CORBA_Environment &ACE_TRY_ENV
+ )
+ {
+ CORBA_DomainManager **tmp = ACE_static_cast (CORBA_DomainManager**, target);
+ *tmp = CORBA_DomainManager::_narrow (src, ACE_TRY_ENV);
+ ACE_CHECK;
+ }
-CORBA_Object*
-_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_upcast (void *src) const
-{
- CORBA_DomainManager **tmp = ACE_static_cast (CORBA_DomainManager**, src);
- return *tmp;
-}
+ CORBA_Object*
+ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_upcast (void *src) const
+ {
+ CORBA_DomainManager **tmp = ACE_static_cast (CORBA_DomainManager**, src);
+ return *tmp;
+ }
#endif /* end #if !defined */
@@ -794,7 +1198,6 @@ _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList::_upcast (void *src) cons
CORBA_DomainManagerList::CORBA_DomainManagerList (void)
{}
-
CORBA_DomainManagerList::CORBA_DomainManagerList (CORBA::ULong max) // uses max size
:
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
@@ -802,112 +1205,212 @@ CORBA_DomainManagerList::CORBA_DomainManagerList (CORBA::ULong max) // uses max
#else /* TAO_USE_SEQUENCE_TEMPLATES */
TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
- (max)
+ (max)
{}
-
-CORBA_DomainManagerList::CORBA_DomainManagerList (
- CORBA::ULong max,
- CORBA::ULong length,
- CORBA_DomainManager_ptr *buffer,
- CORBA::Boolean release
- )
+CORBA_DomainManagerList::CORBA_DomainManagerList (CORBA::ULong max, CORBA::ULong length, CORBA_DomainManager_ptr *buffer, CORBA::Boolean release)
:
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList
#else /* TAO_USE_SEQUENCE_TEMPLATES */
TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
- (max, length, buffer, release)
+ (max, length, buffer, release)
{}
-
-CORBA_DomainManagerList::CORBA_DomainManagerList (
- const CORBA_DomainManagerList &seq
- ) // copy ctor
+CORBA_DomainManagerList::CORBA_DomainManagerList (const CORBA_DomainManagerList &seq) // copy ctor
:
#if !defined (TAO_USE_SEQUENCE_TEMPLATES)
_TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList
#else /* TAO_USE_SEQUENCE_TEMPLATES */
TAO_Unbounded_Object_Sequence<CORBA_DomainManager,CORBA_DomainManager_var>
#endif /* !TAO_USE_SEQUENCE_TEMPLATES */
- (seq)
+ (seq)
{}
-
CORBA_DomainManagerList::~CORBA_DomainManagerList (void) // dtor
{}
-
void CORBA_DomainManagerList::_tao_any_destructor (void *x)
{
CORBA_DomainManagerList *tmp = ACE_static_cast (CORBA_DomainManagerList*,x);
delete tmp;
}
+
#endif /* end #if !defined */
-CORBA_DomainManager_ptr (*_TAO_collocation_CORBA_DomainManager_Stub_Factory_function_pointer) (
- CORBA::Object_ptr obj
- ) = 0;
+static const CORBA::Long _oc_CORBA_DomainManagerList[] =
+{
+ TAO_ENCAP_BYTE_ORDER, // byte order
+ 32,
+ ACE_NTOHL (0x49444c3a),
+ ACE_NTOHL (0x434f5242),
+ ACE_NTOHL (0x415f446f),
+ ACE_NTOHL (0x6d61696e),
+ ACE_NTOHL (0x4d616e61),
+ ACE_NTOHL (0x6765724c),
+ ACE_NTOHL (0x6973743a),
+ ACE_NTOHL (0x312e3000), // repository ID = IDL:CORBA_DomainManagerList:1.0
+ 24,
+ ACE_NTOHL (0x434f5242),
+ ACE_NTOHL (0x415f446f),
+ ACE_NTOHL (0x6d61696e),
+ ACE_NTOHL (0x4d616e61),
+ ACE_NTOHL (0x6765724c),
+ ACE_NTOHL (0x69737400), // name = CORBA_DomainManagerList
+ CORBA::tk_sequence, // typecode kind
+ 76, // encapsulation length
+ TAO_ENCAP_BYTE_ORDER, // byte order
+ CORBA::tk_objref, // typecode kind
+ 60, // encapsulation length
+ TAO_ENCAP_BYTE_ORDER, // byte order
+ 28,
+ ACE_NTOHL (0x49444c3a),
+ ACE_NTOHL (0x434f5242),
+ ACE_NTOHL (0x415f446f),
+ ACE_NTOHL (0x6d61696e),
+ ACE_NTOHL (0x4d616e61),
+ ACE_NTOHL (0x6765723a),
+ ACE_NTOHL (0x312e3000), // repository ID = IDL:CORBA_DomainManager:1.0
+ 20,
+ ACE_NTOHL (0x434f5242),
+ ACE_NTOHL (0x415f446f),
+ ACE_NTOHL (0x6d61696e),
+ ACE_NTOHL (0x4d616e61),
+ ACE_NTOHL (0x67657200), // name = CORBA_DomainManager
+
+ 0U,
+
+};
+
+static CORBA::TypeCode _tc_TAO_tc_CORBA_DomainManagerList (
+ CORBA::tk_alias,
+ sizeof (_oc_CORBA_DomainManagerList),
+ (char *) &_oc_CORBA_DomainManagerList,
+ 0,
+ sizeof (CORBA_DomainManagerList)
+ );
+
+CORBA::TypeCode_ptr _tc_CORBA_DomainManagerList =
+ &_tc_TAO_tc_CORBA_DomainManagerList;
void operator<<= (CORBA::Any &_tao_any, CORBA_DomainManager_ptr _tao_elem)
{
TAO_OutputCDR stream;
if (stream << _tao_elem)
+ {
+ _tao_any._tao_replace (
+ _tc_CORBA_DomainManager,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ CORBA_DomainManager::_duplicate (_tao_elem),
+ CORBA_DomainManager::_tao_any_destructor
+ );
+ }
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_DomainManager_ptr &_tao_elem)
+{
+ ACE_TRY_NEW_ENV
+ {
+ _tao_elem = CORBA_DomainManager::_nil ();
+ CORBA::TypeCode_var type = _tao_any.type ();
+
+ CORBA::Boolean result = type->equivalent (_tc_CORBA_DomainManager, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ if (!result)
+ return 0; // not equivalent
+
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
{
- _tao_any._tao_replace (
- CORBA::_tc_DomainManager,
- TAO_ENCAP_BYTE_ORDER,
- stream.begin (),
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ _tc_CORBA_DomainManager,
1,
- CORBA_DomainManager::_duplicate (_tao_elem),
+ _tao_elem,
CORBA_DomainManager::_tao_any_destructor
);
+ return 1;
}
+ }
+ ACE_CATCHANY
+ {
+ _tao_elem = CORBA_DomainManager::_nil ();
+ return 0;
+ }
+ ACE_ENDTRY;
+ _tao_elem = CORBA_DomainManager::_nil ();
+ return 0;
}
-CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_DomainManager_ptr &_tao_elem)
+#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var>;
+ #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+ # pragma instantiate TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var>
+#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
+
+void operator<<= (CORBA::Any &_tao_any, CORBA_ConstructionPolicy_ptr _tao_elem)
+{
+ TAO_OutputCDR stream;
+ if (stream << _tao_elem)
+ {
+ _tao_any._tao_replace (
+ _tc_CORBA_ConstructionPolicy,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin (),
+ 1,
+ CORBA_ConstructionPolicy::_duplicate (_tao_elem),
+ CORBA_ConstructionPolicy::_tao_any_destructor
+ );
+ }
+}
+
+CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_ConstructionPolicy_ptr &_tao_elem)
{
ACE_TRY_NEW_ENV
- {
- _tao_elem = CORBA_DomainManager::_nil ();
- CORBA::TypeCode_var type = _tao_any.type ();
- CORBA::Boolean result =
- type->equivalent (CORBA::_tc_DomainManager, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ {
+ _tao_elem = CORBA_ConstructionPolicy::_nil ();
+ CORBA::TypeCode_var type = _tao_any.type ();
- if (!result)
- {
- return 0;
- }
+ CORBA::Boolean result = type->equivalent (_tc_CORBA_ConstructionPolicy, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
- TAO_InputCDR stream (
- _tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ()
+ if (!result)
+ return 0; // not equivalent
+
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> _tao_elem)
+ {
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ _tc_CORBA_ConstructionPolicy,
+ 1,
+ _tao_elem,
+ CORBA_ConstructionPolicy::_tao_any_destructor
);
- if (stream >> _tao_elem)
- {
- ((CORBA::Any *)&_tao_any)->_tao_replace (
- CORBA::_tc_DomainManager,
- 1,
- _tao_elem,
- CORBA_DomainManager::_tao_any_destructor
- );
- return 1;
- }
+ return 1;
}
+ }
ACE_CATCHANY
- {
- _tao_elem = CORBA_DomainManager::_nil ();
- return 0;
- }
+ {
+ _tao_elem = CORBA_ConstructionPolicy::_nil ();
+ return 0;
+ }
ACE_ENDTRY;
- _tao_elem = CORBA_DomainManager::_nil ();
+ _tao_elem = CORBA_ConstructionPolicy::_nil ();
return 0;
}
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \
- defined (ACE_HAS_GNU_REPO)
- template class TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var>;
-#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
-# pragma instantiate TAO_Object_Manager<CORBA_DomainManager,CORBA_DomainManager_var>
+ defined (ACE_HAS_GNU_REPO)
+ template class TAO_Object_Manager<CORBA_ConstructionPolicy,CORBA_ConstructionPolicy_var>;
+ #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+ # pragma instantiate TAO_Object_Manager<CORBA_ConstructionPolicy,CORBA_ConstructionPolicy_var>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
void operator<<= (
@@ -917,13 +1420,13 @@ void operator<<= (
{
TAO_OutputCDR stream;
if (stream << _tao_elem)
- {
- _tao_any._tao_replace (
- CORBA::_tc_DomainManagerList,
- TAO_ENCAP_BYTE_ORDER,
- stream.begin ()
- );
- }
+ {
+ _tao_any._tao_replace (
+ _tc_CORBA_DomainManagerList,
+ TAO_ENCAP_BYTE_ORDER,
+ stream.begin ()
+ );
+ }
}
void operator<<= (CORBA::Any &_tao_any, CORBA_DomainManagerList *_tao_elem) // non copying
@@ -931,7 +1434,7 @@ void operator<<= (CORBA::Any &_tao_any, CORBA_DomainManagerList *_tao_elem) // n
TAO_OutputCDR stream;
stream << *_tao_elem;
_tao_any._tao_replace (
- CORBA::_tc_DomainManagerList,
+ _tc_CORBA_DomainManagerList,
TAO_ENCAP_BYTE_ORDER,
stream.begin (),
1,
@@ -952,53 +1455,51 @@ CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA_DomainManage
{
_tao_elem = 0;
ACE_TRY_NEW_ENV
- {
- CORBA::TypeCode_var type = _tao_any.type ();
- CORBA::Boolean result =
- type->equivalent (CORBA::_tc_DomainManagerList, ACE_TRY_ENV);
- ACE_TRY_CHECK;
+ {
+ CORBA::TypeCode_var type = _tao_any.type ();
- if (!result)
- {
- return 0;
- }
+ CORBA::Boolean result = type->equivalent (_tc_CORBA_DomainManagerList, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+
+ if (!result)
+ return 0; // not equivalent
- if (_tao_any.any_owns_data ())
+ if (_tao_any.any_owns_data ())
+ {
+ _tao_elem = ACE_static_cast(
+ const CORBA_DomainManagerList*,
+ _tao_any.value ()
+ );
+ return 1;
+ }
+ else
+ {
+ CORBA_DomainManagerList *tmp;
+ ACE_NEW_RETURN (tmp, CORBA_DomainManagerList, 0);
+ TAO_InputCDR stream (
+ _tao_any._tao_get_cdr (),
+ _tao_any._tao_byte_order ()
+ );
+ if (stream >> *tmp)
{
- _tao_elem = ACE_static_cast(
- const CORBA_DomainManagerList*,
- _tao_any.value ()
+ ((CORBA::Any *)&_tao_any)->_tao_replace (
+ _tc_CORBA_DomainManagerList,
+ 1,
+ ACE_static_cast (void *, tmp),
+ CORBA_DomainManagerList::_tao_any_destructor
);
+ _tao_elem = tmp;
return 1;
}
else
{
- CORBA_DomainManagerList *tmp;
- ACE_NEW_RETURN (tmp, CORBA_DomainManagerList, 0);
- TAO_InputCDR stream (
- _tao_any._tao_get_cdr (),
- _tao_any._tao_byte_order ()
- );
- if (stream >> *tmp)
- {
- ((CORBA::Any *)&_tao_any)->_tao_replace (
- CORBA::_tc_DomainManagerList,
- 1,
- ACE_static_cast (void *, tmp),
- CORBA_DomainManagerList::_tao_any_destructor
- );
- _tao_elem = tmp;
- return 1;
- }
- else
- {
- delete tmp;
- }
+ delete tmp;
}
}
+ }
ACE_CATCHANY
- {
- }
+ {
+ }
ACE_ENDTRY;
return 0;
}
@@ -1009,15 +1510,15 @@ CORBA::Boolean operator<< (
)
{
if (strm << _tao_sequence.length ())
+ {
+ // encode all elements
+ CORBA::Boolean _tao_marshal_flag = 1;
+ for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++)
{
- // encode all elements
- CORBA::Boolean _tao_marshal_flag = 1;
- for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++)
- {
- _tao_marshal_flag = (strm << _tao_sequence[i].in ());
- }
- return _tao_marshal_flag;
+ _tao_marshal_flag = (strm << _tao_sequence[i].in ());
}
+ return _tao_marshal_flag;
+ }
return 0; // error
}
@@ -1028,19 +1529,19 @@ CORBA::Boolean operator>> (
{
CORBA::ULong _tao_seq_len;
if (strm >> _tao_seq_len)
+ {
+ // set the length of the sequence
+ _tao_sequence.length (_tao_seq_len);
+ // If length is 0 we return true.
+ if (0 >= _tao_seq_len)
+ return 1;
+ // retrieve all the elements
+ CORBA::Boolean _tao_marshal_flag = 1;
+ for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++)
{
- // set the length of the sequence
- _tao_sequence.length (_tao_seq_len);
- // If length is 0 we return true.
- if (0 >= _tao_seq_len)
- return 1;
- // retrieve all the elements
- CORBA::Boolean _tao_marshal_flag = 1;
- for (CORBA::ULong i = 0; i < _tao_sequence.length () && _tao_marshal_flag; i++)
- {
- _tao_marshal_flag = (strm >> _tao_sequence[i].out ());
- }
- return _tao_marshal_flag;
+ _tao_marshal_flag = (strm >> _tao_sequence[i].out ());
}
+ return _tao_marshal_flag;
+ }
return 0; // error
}