// -*- 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 #include "DomainC.h" #include "tao/Stub.h" #include "tao/Invocation.h" #include "tao/PortableInterceptor.h" #if TAO_HAS_INTERCEPTORS == 1 #include "tao/RequestInfo_Util.h" #include "tao/ClientRequestInfo_i.h" #include "tao/ClientInterceptorAdapter.h" #endif /* TAO_HAS_INTERCEPTORS == 1 */ #include "tao/IFR_Client_Adapter.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 */ int CORBA_DomainManager::_tao_class_id = 0; CORBA_DomainManager_ptr tao_CORBA_DomainManager_duplicate ( CORBA_DomainManager_ptr p ) { return CORBA_DomainManager::_duplicate (p); } void tao_CORBA_DomainManager_release ( CORBA_DomainManager_ptr p ) { CORBA::release (p); } CORBA_DomainManager_ptr tao_CORBA_DomainManager_nil ( void ) { return CORBA_DomainManager::_nil (); } CORBA_DomainManager_ptr tao_CORBA_DomainManager_narrow ( CORBA::Object *p TAO_ENV_ARG_DECL ) { return CORBA_DomainManager::_narrow (p TAO_ENV_ARG_PARAMETER); } CORBA::Object * tao_CORBA_DomainManager_upcast ( void *src ) { CORBA_DomainManager **tmp = ACE_static_cast (CORBA_DomainManager **, src); return *tmp; } // ************************************************************* // Operations for class CORBA_DomainManager_var // ************************************************************* CORBA_DomainManager_var::CORBA_DomainManager_var (void) // default constructor : ptr_ (CORBA_DomainManager::_nil ()) {} ::CORBA_DomainManager_ptr CORBA_DomainManager_var::ptr (void) const { return this->ptr_; } CORBA_DomainManager_var::CORBA_DomainManager_var (const ::CORBA_DomainManager_var &p) // copy constructor : TAO_Base_var (), ptr_ (CORBA_DomainManager::_duplicate (p.ptr ())) {} CORBA_DomainManager_var::~CORBA_DomainManager_var (void) // destructor { CORBA::release (this->ptr_); } CORBA_DomainManager_var & CORBA_DomainManager_var::operator= (CORBA_DomainManager_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; return *this; } CORBA_DomainManager_var & CORBA_DomainManager_var::operator= (const ::CORBA_DomainManager_var &p) { if (this != &p) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_DomainManager::_duplicate (p.ptr ()); } return *this; } CORBA_DomainManager_var::operator const ::CORBA_DomainManager_ptr &() const // cast { return this->ptr_; } CORBA_DomainManager_var::operator ::CORBA_DomainManager_ptr &() // cast { return this->ptr_; } ::CORBA_DomainManager_ptr CORBA_DomainManager_var::operator-> (void) const { return this->ptr_; } ::CORBA_DomainManager_ptr CORBA_DomainManager_var::in (void) const { return this->ptr_; } ::CORBA_DomainManager_ptr & CORBA_DomainManager_var::inout (void) { return this->ptr_; } ::CORBA_DomainManager_ptr & CORBA_DomainManager_var::out (void) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_DomainManager::_nil (); return this->ptr_; } ::CORBA_DomainManager_ptr CORBA_DomainManager_var::_retn (void) { // yield ownership of managed obj reference ::CORBA_DomainManager_ptr val = this->ptr_; this->ptr_ = ::CORBA_DomainManager::_nil (); return val; } ::CORBA_DomainManager_ptr CORBA_DomainManager_var::tao_duplicate (CORBA_DomainManager_ptr p) { return ::CORBA_DomainManager::_duplicate (p); } void CORBA_DomainManager_var::tao_release (CORBA_DomainManager_ptr p) { CORBA::release (p); } ::CORBA_DomainManager_ptr CORBA_DomainManager_var::tao_nil (void) { return ::CORBA_DomainManager::_nil (); } ::CORBA_DomainManager_ptr CORBA_DomainManager_var::tao_narrow ( CORBA::Object *p TAO_ENV_ARG_DECL ) { return ::CORBA_DomainManager::_narrow (p TAO_ENV_ARG_PARAMETER); } CORBA::Object * CORBA_DomainManager_var::tao_upcast (void *src) { CORBA_DomainManager **tmp = ACE_static_cast (CORBA_DomainManager **, src); return *tmp; } // ************************************************************* // Operations for class CORBA_DomainManager_out // ************************************************************* CORBA_DomainManager_out::CORBA_DomainManager_out (CORBA_DomainManager_ptr &p) : ptr_ (p) { this->ptr_ = ::CORBA_DomainManager::_nil (); } CORBA_DomainManager_out::CORBA_DomainManager_out (CORBA_DomainManager_var &p) // constructor from _var : ptr_ (p.out ()) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_DomainManager::_nil (); } CORBA_DomainManager_out::CORBA_DomainManager_out (const ::CORBA_DomainManager_out &p) // copy constructor : ptr_ (ACE_const_cast (CORBA_DomainManager_out &, p).ptr_) {} ::CORBA_DomainManager_out & CORBA_DomainManager_out::operator= (const ::CORBA_DomainManager_out &p) { this->ptr_ = ACE_const_cast (CORBA_DomainManager_out&, p).ptr_; return *this; } CORBA_DomainManager_out & CORBA_DomainManager_out::operator= (const ::CORBA_DomainManager_var &p) { this->ptr_ = ::CORBA_DomainManager::_duplicate (p.ptr ()); return *this; } CORBA_DomainManager_out & CORBA_DomainManager_out::operator= (CORBA_DomainManager_ptr p) { this->ptr_ = p; return *this; } CORBA_DomainManager_out::operator ::CORBA_DomainManager_ptr &() // cast { return this->ptr_; } ::CORBA_DomainManager_ptr & CORBA_DomainManager_out::ptr (void) // ptr { return this->ptr_; } ::CORBA_DomainManager_ptr CORBA_DomainManager_out::operator-> (void) { return this->ptr_; } #if (TAO_HAS_INTERCEPTORS == 1) class TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy : public TAO_ClientRequestInfo_i { public: TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy ( TAO_GIOP_Invocation *_tao_invocation, CORBA::Object_ptr _tao_target, const CORBA::PolicyType & policy_type TAO_ENV_ARG_DECL); virtual Dynamic::ParameterList * arguments ( TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); virtual Dynamic::ExceptionList * exceptions ( TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Any * result ( TAO_ENV_SINGLE_ARG_DECL) 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 TAO_ENV_ARG_DECL_NOT_USED ) : TAO_ClientRequestInfo_i (_tao_invocation, _tao_target), policy_type_ (policy_type) {} Dynamic::ParameterList * TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::arguments (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the argument list on demand. Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); Dynamic::ParameterList_var safe_parameter_list = parameter_list; parameter_list->length (1); CORBA::ULong len = 0; (*parameter_list)[len].argument <<= this->policy_type_; (*parameter_list)[len].mode = CORBA::PARAM_IN; len++; return safe_parameter_list._retn (); } Dynamic::ExceptionList * TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::exceptions (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the exception list on demand. Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); return exception_list; } CORBA::Any * TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::result (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the result on demand. CORBA::Boolean tk_void_any = 0; CORBA::Any *result_any = TAO_RequestInfo_Util::make_any (tk_void_any TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); CORBA::Any_var safe_result_any = result_any; (*result_any) <<= this->_result; return safe_result_any._retn (); } void TAO_ClientRequestInfo_CORBA_DomainManager_get_domain_policy::result (CORBA::Policy_ptr result) { // update the result this->_result = result; } #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_ptr _collocated_tao_target_, CORBA::PolicyType policy_type TAO_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException )) { CORBA::Policy_ptr _tao_retval = CORBA::Policy::_nil (); CORBA::Policy_var _tao_safe_retval (_tao_retval); TAO_Stub *istub = _collocated_tao_target_->_stubobj (); if (istub == 0) ACE_THROW_RETURN (CORBA::INTERNAL (), 0); TAO_GIOP_Twoway_Invocation _tao_call ( istub, "get_domain_policy", 17, 1, istub->orb_core () ); int _invoke_status; #if (TAO_HAS_INTERCEPTORS == 1) TAO_ClientRequestInterceptor_Adapter _tao_vfr ( istub->orb_core ()->client_request_interceptors (), &_tao_call, _invoke_status ); #endif /* TAO_HAS_INTERCEPTORS */ for (;;) { _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 TAO_ENV_ARG_PARAMETER ); ACE_CHECK_RETURN (0); #endif /* TAO_HAS_INTERCEPTORS */ CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG; TAO_INTERCEPTOR (ri.response_expected (1)); #if TAO_HAS_INTERCEPTORS == 1 ACE_TRY { _tao_vfr.send_request ( &ri TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; if (_invoke_status == TAO_INVOKE_RESTART) { _tao_call.restart_flag (1); continue; } #endif /* TAO_HAS_INTERCEPTORS */ _tao_call.start (TAO_ENV_SINGLE_ARG_PARAMETER); TAO_INTERCEPTOR_CHECK_RETURN (0); _tao_call.prepare_header ( ACE_static_cast (CORBA::Octet, _tao_response_flag) TAO_ENV_ARG_PARAMETER ); 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 ); _invoke_status = _tao_call.invoke (0, 0 TAO_ENV_ARG_PARAMETER); TAO_INTERCEPTOR_CHECK_RETURN (0); if (_invoke_status == TAO_INVOKE_EXCEPTION) { TAO_INTERCEPTOR_THROW_RETURN ( CORBA::UNKNOWN (TAO_OMG_VMCID | 1, CORBA::COMPLETED_YES), 0 ); } else if (_invoke_status == TAO_INVOKE_RESTART) { TAO_INTERCEPTOR ( ri.reply_status (_invoke_status); _tao_vfr.receive_other ( &ri TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; ) 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 ); } #if TAO_HAS_INTERCEPTORS == 1 CORBA::Policy_ptr _tao_retval_info = _tao_safe_retval._retn (); ri.result (_tao_retval_info); _tao_safe_retval = _tao_retval_info; ri.reply_status (_invoke_status); _tao_vfr.receive_reply ( &ri TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; } ACE_CATCHANY { ri.exception (&ACE_ANY_EXCEPTION); _tao_vfr.receive_exception ( &ri TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; PortableInterceptor::ReplyStatus _tao_status = ri.reply_status (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION || _tao_status == PortableInterceptor::USER_EXCEPTION) ACE_RE_THROW; } ACE_ENDTRY; ACE_CHECK_RETURN (0); PortableInterceptor::ReplyStatus _tao_status = ri.reply_status (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); if (_tao_status == PortableInterceptor::LOCATION_FORWARD || _tao_status == PortableInterceptor::TRANSPORT_RETRY) continue; #endif /* TAO_HAS_INTERCEPTORS */ break; } return _tao_safe_retval._retn (); } // // End Base & Remote Proxy Implemeentation. /////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////// // Remote & Base Proxy Broker Implementation // _TAO_CORBA_DomainManager_Proxy_Broker::_TAO_CORBA_DomainManager_Proxy_Broker (void) { } _TAO_CORBA_DomainManager_Proxy_Broker::~_TAO_CORBA_DomainManager_Proxy_Broker (void) { } _TAO_CORBA_DomainManager_Proxy_Broker * (*CORBA__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 * TAO_ENV_ARG_DECL_NOT_USED ) { 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_ = ::CORBA__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 TAO_ENV_ARG_DECL ) { if (CORBA::is_nil (obj)) return CORBA_DomainManager::_nil (); if (! obj->_is_local ()) { CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CORBA/DomainManager:1.0" TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (CORBA_DomainManager::_nil ()); if (is_a == 0) return CORBA_DomainManager::_nil (); } return CORBA_DomainManager::_unchecked_narrow (obj TAO_ENV_ARG_PARAMETER); } CORBA_DomainManager_ptr CORBA_DomainManager::_unchecked_narrow ( CORBA::Object_ptr obj TAO_ENV_ARG_DECL_NOT_USED ) { 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 () &&CORBA__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::_tao_class_id ) ) ); } 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 TAO_ENV_ARG_DECL) { if ( (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/DomainManager:1.0")) || (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/CORBA/Object:1.0"))) return 1; // success using local knowledge else return this->CORBA_Object::_is_a (value TAO_ENV_ARG_PARAMETER); } void *CORBA_DomainManager::_tao_QueryInterface (ptr_arith_t type) { void *retv = 0; if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA_DomainManager::_tao_class_id)) retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); if (retv) this->_add_ref (); return retv; } const char* CORBA_DomainManager::_interface_repository_id (void) const { return "IDL:omg.org/CORBA/DomainManager:1.0"; } CORBA::Policy_ptr CORBA_DomainManager::get_domain_policy ( CORBA::PolicyType policy_type TAO_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException )) { _TAO_CORBA_DomainManager_Proxy_Impl &proxy = this->the_TAO_CORBA_DomainManager_Proxy_Broker_->select_proxy (this TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); return proxy.get_domain_policy ( this, policy_type TAO_ENV_ARG_PARAMETER ); } static const CORBA::Long _oc_CORBA_DomainManager[] = { TAO_ENCAP_BYTE_ORDER, // byte order 36, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f446f), ACE_NTOHL (0x6d61696e), ACE_NTOHL (0x4d616e61), ACE_NTOHL (0x6765723a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/CORBA/DomainManager:1.0 14, ACE_NTOHL (0x446f6d61), ACE_NTOHL (0x696e4d61), ACE_NTOHL (0x6e616765), ACE_NTOHL (0x72000000), // name = 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; TAO_NAMESPACE_TYPE (const CORBA::ULong) TAO_NAMESPACE_BEGIN (CORBA) TAO_NAMESPACE_DEFINE (const CORBA::ULong, SecConstruction, 11U) TAO_NAMESPACE_END int CORBA_ConstructionPolicy::_tao_class_id = 0; CORBA_ConstructionPolicy_ptr tao_CORBA_ConstructionPolicy_duplicate ( CORBA_ConstructionPolicy_ptr p ) { return CORBA_ConstructionPolicy::_duplicate (p); } void tao_CORBA_ConstructionPolicy_release ( CORBA_ConstructionPolicy_ptr p ) { CORBA::release (p); } CORBA_ConstructionPolicy_ptr tao_CORBA_ConstructionPolicy_nil ( void ) { return CORBA_ConstructionPolicy::_nil (); } CORBA_ConstructionPolicy_ptr tao_CORBA_ConstructionPolicy_narrow ( CORBA::Object *p TAO_ENV_ARG_DECL ) { return CORBA_ConstructionPolicy::_narrow (p TAO_ENV_ARG_PARAMETER); } CORBA::Object * tao_CORBA_ConstructionPolicy_upcast ( void *src ) { CORBA_ConstructionPolicy **tmp = ACE_static_cast (CORBA_ConstructionPolicy **, src); return *tmp; } // ************************************************************* // Operations for class CORBA_ConstructionPolicy_var // ************************************************************* CORBA_ConstructionPolicy_var::CORBA_ConstructionPolicy_var (void) // default constructor : ptr_ (CORBA_ConstructionPolicy::_nil ()) {} ::CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy_var::ptr (void) const { return this->ptr_; } CORBA_ConstructionPolicy_var::CORBA_ConstructionPolicy_var (const ::CORBA_ConstructionPolicy_var &p) // copy constructor : TAO_Base_var (), ptr_ (CORBA_ConstructionPolicy::_duplicate (p.ptr ())) {} CORBA_ConstructionPolicy_var::~CORBA_ConstructionPolicy_var (void) // destructor { CORBA::release (this->ptr_); } CORBA_ConstructionPolicy_var & CORBA_ConstructionPolicy_var::operator= (CORBA_ConstructionPolicy_ptr p) { CORBA::release (this->ptr_); this->ptr_ = p; return *this; } CORBA_ConstructionPolicy_var & CORBA_ConstructionPolicy_var::operator= (const ::CORBA_ConstructionPolicy_var &p) { if (this != &p) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_ConstructionPolicy::_duplicate (p.ptr ()); } return *this; } CORBA_ConstructionPolicy_var::operator const ::CORBA_ConstructionPolicy_ptr &() const // cast { return this->ptr_; } CORBA_ConstructionPolicy_var::operator ::CORBA_ConstructionPolicy_ptr &() // cast { return this->ptr_; } ::CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy_var::operator-> (void) const { return this->ptr_; } ::CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy_var::in (void) const { return this->ptr_; } ::CORBA_ConstructionPolicy_ptr & CORBA_ConstructionPolicy_var::inout (void) { return this->ptr_; } ::CORBA_ConstructionPolicy_ptr & CORBA_ConstructionPolicy_var::out (void) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_ConstructionPolicy::_nil (); return this->ptr_; } ::CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy_var::_retn (void) { // yield ownership of managed obj reference ::CORBA_ConstructionPolicy_ptr val = this->ptr_; this->ptr_ = ::CORBA_ConstructionPolicy::_nil (); return val; } ::CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy_var::tao_duplicate (CORBA_ConstructionPolicy_ptr p) { return ::CORBA_ConstructionPolicy::_duplicate (p); } void CORBA_ConstructionPolicy_var::tao_release (CORBA_ConstructionPolicy_ptr p) { CORBA::release (p); } ::CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy_var::tao_nil (void) { return ::CORBA_ConstructionPolicy::_nil (); } ::CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy_var::tao_narrow ( CORBA::Object *p TAO_ENV_ARG_DECL ) { return ::CORBA_ConstructionPolicy::_narrow (p TAO_ENV_ARG_PARAMETER); } CORBA::Object * CORBA_ConstructionPolicy_var::tao_upcast (void *src) { CORBA_ConstructionPolicy **tmp = ACE_static_cast (CORBA_ConstructionPolicy **, src); return *tmp; } // ************************************************************* // Operations for class CORBA_ConstructionPolicy_out // ************************************************************* CORBA_ConstructionPolicy_out::CORBA_ConstructionPolicy_out (CORBA_ConstructionPolicy_ptr &p) : ptr_ (p) { this->ptr_ = ::CORBA_ConstructionPolicy::_nil (); } CORBA_ConstructionPolicy_out::CORBA_ConstructionPolicy_out (CORBA_ConstructionPolicy_var &p) // constructor from _var : ptr_ (p.out ()) { CORBA::release (this->ptr_); this->ptr_ = ::CORBA_ConstructionPolicy::_nil (); } CORBA_ConstructionPolicy_out::CORBA_ConstructionPolicy_out (const ::CORBA_ConstructionPolicy_out &p) // copy constructor : ptr_ (ACE_const_cast (CORBA_ConstructionPolicy_out &, p).ptr_) {} ::CORBA_ConstructionPolicy_out & CORBA_ConstructionPolicy_out::operator= (const ::CORBA_ConstructionPolicy_out &p) { this->ptr_ = ACE_const_cast (CORBA_ConstructionPolicy_out&, p).ptr_; return *this; } CORBA_ConstructionPolicy_out & CORBA_ConstructionPolicy_out::operator= (const ::CORBA_ConstructionPolicy_var &p) { this->ptr_ = ::CORBA_ConstructionPolicy::_duplicate (p.ptr ()); return *this; } CORBA_ConstructionPolicy_out & CORBA_ConstructionPolicy_out::operator= (CORBA_ConstructionPolicy_ptr p) { this->ptr_ = p; return *this; } CORBA_ConstructionPolicy_out::operator ::CORBA_ConstructionPolicy_ptr &() // cast { return this->ptr_; } ::CORBA_ConstructionPolicy_ptr & CORBA_ConstructionPolicy_out::ptr (void) // ptr { return this->ptr_; } ::CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy_out::operator-> (void) { return this->ptr_; } #if (TAO_HAS_INTERCEPTORS == 1) class TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager : public TAO_ClientRequestInfo_i { 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 TAO_ENV_ARG_DECL); virtual Dynamic::ParameterList * arguments ( TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); virtual Dynamic::ExceptionList * exceptions ( TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Any * result ( TAO_ENV_SINGLE_ARG_DECL) 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_ptr _tao_target, CORBA_InterfaceDef_ptr object_type, const CORBA::Boolean & constr_policy TAO_ENV_ARG_DECL_NOT_USED ) : TAO_ClientRequestInfo_i (_tao_invocation, _tao_target), object_type_ (object_type), constr_policy_ (constr_policy) {} Dynamic::ParameterList * TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager::arguments (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the argument list on demand. Dynamic::ParameterList *parameter_list = TAO_RequestInfo_Util::make_parameter_list (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); Dynamic::ParameterList_var safe_parameter_list = parameter_list; parameter_list->length (2); CORBA::ULong len = 0; TAO_IFR_Client_Adapter *adapter = ACE_Dynamic_Service::instance ( TAO_ORB_Core::ifr_client_adapter_name () ); adapter->interfacedef_any_insert ( (*parameter_list)[len].argument, this->object_type_ ); (*parameter_list)[len].mode = CORBA::PARAM_IN; len++; (*parameter_list)[len].argument <<= CORBA::Any::from_boolean (this->constr_policy_); (*parameter_list)[len].mode = CORBA::PARAM_IN; len++; return safe_parameter_list._retn (); } Dynamic::ExceptionList * TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager::exceptions (TAO_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC ((CORBA::SystemException)) { // Generate the exception list on demand. Dynamic::ExceptionList *exception_list = TAO_RequestInfo_Util::make_exception_list (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK_RETURN (0); return exception_list; } CORBA::Any * TAO_ClientRequestInfo_CORBA_ConstructionPolicy_make_domain_manager::result (TAO_ENV_SINGLE_ARG_DECL) 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 TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (0); return result_any; } #endif /* TAO_HAS_INTERCEPTORS */ /////////////////////////////////////////////////////////////////////// // Base & Remote Proxy Implementation. // _TAO_CORBA_ConstructionPolicy_Proxy_Impl::_TAO_CORBA_ConstructionPolicy_Proxy_Impl (void) {} _TAO_CORBA_ConstructionPolicy_Remote_Proxy_Impl::_TAO_CORBA_ConstructionPolicy_Remote_Proxy_Impl (void) {} // Remote Implementation of the IDL interface methods void _TAO_CORBA_ConstructionPolicy_Remote_Proxy_Impl::make_domain_manager ( CORBA::Object_ptr _collocated_tao_target_, CORBA_InterfaceDef_ptr object_type, CORBA::Boolean constr_policy TAO_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException )) { TAO_Stub *istub = _collocated_tao_target_->_stubobj (); if (istub == 0) ACE_THROW (CORBA::INTERNAL ()); TAO_GIOP_Twoway_Invocation _tao_call ( istub, "make_domain_manager", 19, 1, istub->orb_core () ); int _invoke_status; #if (TAO_HAS_INTERCEPTORS == 1) TAO_ClientRequestInterceptor_Adapter _tao_vfr ( istub->orb_core ()->client_request_interceptors (), &_tao_call, _invoke_status ); #endif /* TAO_HAS_INTERCEPTORS */ TAO_IFR_Client_Adapter *adapter = ACE_Dynamic_Service::instance ( TAO_ORB_Core::ifr_client_adapter_name () ); for (;;) { _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 TAO_ENV_ARG_PARAMETER ); ACE_CHECK; #endif /* TAO_HAS_INTERCEPTORS */ CORBA::Short _tao_response_flag = TAO_TWOWAY_RESPONSE_FLAG; TAO_INTERCEPTOR (ri.response_expected (1)); #if TAO_HAS_INTERCEPTORS == 1 ACE_TRY { _tao_vfr.send_request ( &ri TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; if (_invoke_status == TAO_INVOKE_RESTART) { _tao_call.restart_flag (1); continue; } #endif /* TAO_HAS_INTERCEPTORS */ _tao_call.start (TAO_ENV_SINGLE_ARG_PARAMETER); TAO_INTERCEPTOR_CHECK; _tao_call.prepare_header ( ACE_static_cast (CORBA::Octet, _tao_response_flag) TAO_ENV_ARG_PARAMETER ); 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)) )) TAO_INTERCEPTOR_THROW ( CORBA::MARSHAL () ); _invoke_status = _tao_call.invoke (0, 0 TAO_ENV_ARG_PARAMETER); TAO_INTERCEPTOR_CHECK; if (_invoke_status == TAO_INVOKE_EXCEPTION) { TAO_INTERCEPTOR_THROW ( CORBA::UNKNOWN (TAO_OMG_VMCID | 1, CORBA::COMPLETED_YES) ); } else if (_invoke_status == TAO_INVOKE_RESTART) { TAO_INTERCEPTOR ( ri.reply_status (_invoke_status); _tao_vfr.receive_other ( &ri TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; ) continue; } #if TAO_HAS_INTERCEPTORS == 1 ri.reply_status (_invoke_status); _tao_vfr.receive_reply ( &ri TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; } ACE_CATCHANY { ri.exception (&ACE_ANY_EXCEPTION); _tao_vfr.receive_exception ( &ri TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; PortableInterceptor::ReplyStatus _tao_status = ri.reply_status (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_TRY_CHECK; if (_tao_status == PortableInterceptor::SYSTEM_EXCEPTION || _tao_status == PortableInterceptor::USER_EXCEPTION) ACE_RE_THROW; } ACE_ENDTRY; ACE_CHECK; PortableInterceptor::ReplyStatus _tao_status = ri.reply_status (TAO_ENV_SINGLE_ARG_PARAMETER); ACE_CHECK; if (_tao_status == PortableInterceptor::LOCATION_FORWARD || _tao_status == PortableInterceptor::TRANSPORT_RETRY) continue; #endif /* TAO_HAS_INTERCEPTORS */ break; } } // // 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 * (*CORBA__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 * TAO_ENV_ARG_DECL_NOT_USED ) { 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_ = ::CORBA__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 TAO_ENV_ARG_DECL ) { if (CORBA::is_nil (obj)) return CORBA_ConstructionPolicy::_nil (); if (! obj->_is_local ()) { CORBA::Boolean is_a = obj->_is_a ("IDL:omg.org/CORBA/ConstructionPolicy:1.0" TAO_ENV_ARG_PARAMETER); ACE_CHECK_RETURN (CORBA_ConstructionPolicy::_nil ()); if (is_a == 0) return CORBA_ConstructionPolicy::_nil (); } return CORBA_ConstructionPolicy::_unchecked_narrow (obj TAO_ENV_ARG_PARAMETER); } CORBA_ConstructionPolicy_ptr CORBA_ConstructionPolicy::_unchecked_narrow ( CORBA::Object_ptr obj TAO_ENV_ARG_DECL_NOT_USED ) { 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 () &&CORBA__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::_tao_class_id ) ) ); } 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 TAO_ENV_ARG_DECL) { if ( (!ACE_OS::strcmp ((char *)value, "IDL:omg.org/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 else return this->CORBA_Object::_is_a (value TAO_ENV_ARG_PARAMETER); } void *CORBA_ConstructionPolicy::_tao_QueryInterface (ptr_arith_t type) { void *retv = 0; if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA_ConstructionPolicy::_narrow)) retv = ACE_reinterpret_cast (void*, this); else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA_Policy::_tao_class_id)) retv = ACE_reinterpret_cast ( void *, ACE_static_cast ( CORBA_Policy_ptr, this ) ); else if (type == ACE_reinterpret_cast (ptr_arith_t, &CORBA::Object::_tao_class_id)) retv = ACE_reinterpret_cast (void *, ACE_static_cast (CORBA::Object_ptr, this)); if (retv) this->_add_ref (); return retv; } const char* CORBA_ConstructionPolicy::_interface_repository_id (void) const { return "IDL:omg.org/CORBA/ConstructionPolicy:1.0"; } void CORBA_ConstructionPolicy::make_domain_manager ( CORBA_InterfaceDef_ptr object_type, CORBA::Boolean constr_policy TAO_ENV_ARG_DECL ) ACE_THROW_SPEC (( CORBA::SystemException )) { _TAO_CORBA_ConstructionPolicy_Proxy_Impl &proxy = this->the_TAO_CORBA_ConstructionPolicy_Proxy_Broker_->select_proxy (this TAO_ENV_ARG_PARAMETER); ACE_CHECK; proxy.make_domain_manager ( this, object_type, constr_policy TAO_ENV_ARG_PARAMETER ); } static const CORBA::Long _oc_CORBA_ConstructionPolicy[] = { TAO_ENCAP_BYTE_ORDER, // byte order 41, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f436f), ACE_NTOHL (0x6e737472), ACE_NTOHL (0x75637469), ACE_NTOHL (0x6f6e506f), ACE_NTOHL (0x6c696379), ACE_NTOHL (0x3a312e30), ACE_NTOHL (0x0), // repository ID = IDL:omg.org/CORBA/ConstructionPolicy:1.0 19, ACE_NTOHL (0x436f6e73), ACE_NTOHL (0x74727563), ACE_NTOHL (0x74696f6e), ACE_NTOHL (0x506f6c69), ACE_NTOHL (0x63790000), // name = 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 (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); if (this->buffer_ != 0) { CORBA_DomainManager **old = ACE_reinterpret_cast (CORBA_DomainManager**, this->buffer_); for (CORBA::ULong i = 0; i < this->length_; ++i) { if (!this->release_) { tmp[i] = CORBA_DomainManager::_duplicate (old[i]); } else { tmp[i] = old[i]; } } if (this->release_) { delete[] old; } } 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) { 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::~_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_); 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 TAO_ENV_ARG_DECL ) { CORBA_DomainManager **tmp = ACE_static_cast (CORBA_DomainManager**, target); *tmp = CORBA_DomainManager::_narrow (src TAO_ENV_ARG_PARAMETER); 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; } #endif /* end #if !defined */ #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ #if !defined (_CORBA_DOMAINMANAGERLIST_CS_) #define _CORBA_DOMAINMANAGERLIST_CS_ // ************************************************************* // CORBA_DomainManagerList // ************************************************************* CORBA_DomainManagerList::CORBA_DomainManagerList (void) {} CORBA_DomainManagerList::CORBA_DomainManagerList (CORBA::ULong max) // uses max size : #if !defined (TAO_USE_SEQUENCE_TEMPLATES) _TAO_Unbounded_Object_Sequence_CORBA_DomainManagerList #else /* TAO_USE_SEQUENCE_TEMPLATES */ TAO_Unbounded_Object_Sequence #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max) {} 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 #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (max, length, buffer, release) {} 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 #endif /* !TAO_USE_SEQUENCE_TEMPLATES */ (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 */ static const CORBA::Long _oc_CORBA_DomainManagerList[] = { TAO_ENCAP_BYTE_ORDER, // byte order 40, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f446f), ACE_NTOHL (0x6d61696e), ACE_NTOHL (0x4d616e61), ACE_NTOHL (0x6765724c), ACE_NTOHL (0x6973743a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/CORBA/DomainManagerList:1.0 18, ACE_NTOHL (0x446f6d61), ACE_NTOHL (0x696e4d61), ACE_NTOHL (0x6e616765), ACE_NTOHL (0x724c6973), ACE_NTOHL (0x74000000), // name = DomainManagerList CORBA::tk_sequence, // typecode kind 80, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order CORBA::tk_objref, // typecode kind 64, // encapsulation length TAO_ENCAP_BYTE_ORDER, // byte order 36, ACE_NTOHL (0x49444c3a), ACE_NTOHL (0x6f6d672e), ACE_NTOHL (0x6f72672f), ACE_NTOHL (0x434f5242), ACE_NTOHL (0x412f446f), ACE_NTOHL (0x6d61696e), ACE_NTOHL (0x4d616e61), ACE_NTOHL (0x6765723a), ACE_NTOHL (0x312e3000), // repository ID = IDL:omg.org/CORBA/DomainManager:1.0 14, ACE_NTOHL (0x446f6d61), ACE_NTOHL (0x696e4d61), ACE_NTOHL (0x6e616765), ACE_NTOHL (0x72000000), // name = 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 TAO_ENV_ARG_PARAMETER); 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) { ((CORBA::Any *)&_tao_any)->_tao_replace ( _tc_CORBA_DomainManager, 1, _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; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) template class TAO_Object_Manager; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) # pragma instantiate TAO_Object_Manager #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_ConstructionPolicy::_nil (); CORBA::TypeCode_var type = _tao_any.type (); CORBA::Boolean result = type->equivalent (_tc_CORBA_ConstructionPolicy TAO_ENV_ARG_PARAMETER); 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) { ((CORBA::Any *)&_tao_any)->_tao_replace ( _tc_CORBA_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; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) || \ defined (ACE_HAS_GNU_REPO) template class TAO_Object_Manager; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) # pragma instantiate TAO_Object_Manager #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ void operator<<= ( CORBA::Any &_tao_any, const CORBA_DomainManagerList &_tao_elem ) // copying { TAO_OutputCDR stream; if (stream << _tao_elem) { _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 { TAO_OutputCDR stream; stream << *_tao_elem; _tao_any._tao_replace ( _tc_CORBA_DomainManagerList, TAO_ENCAP_BYTE_ORDER, stream.begin (), 1, _tao_elem, CORBA_DomainManagerList::_tao_any_destructor ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, CORBA_DomainManagerList *&_tao_elem) { return _tao_any >>= ACE_const_cast( const CORBA_DomainManagerList*&, _tao_elem ); } CORBA::Boolean operator>>= (const CORBA::Any &_tao_any, const CORBA_DomainManagerList *&_tao_elem) { _tao_elem = 0; ACE_TRY_NEW_ENV { CORBA::TypeCode_var type = _tao_any.type (); CORBA::Boolean result = type->equivalent (_tc_CORBA_DomainManagerList TAO_ENV_ARG_PARAMETER); ACE_TRY_CHECK; if (!result) return 0; // not equivalent 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) { ((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 { delete tmp; } } } ACE_CATCHANY { } ACE_ENDTRY; return 0; } CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const CORBA_DomainManager_ptr _tao_objref ) { CORBA::Object_ptr _tao_corba_obj = _tao_objref; return (strm << _tao_corba_obj); } CORBA::Boolean operator>> ( TAO_InputCDR &strm, CORBA_DomainManager_ptr &_tao_objref ) { ACE_TRY_NEW_ENV { CORBA::Object_var obj; if ((strm >> obj.inout ()) == 0) return 0; // narrow to the right type _tao_objref = CORBA_DomainManager::_unchecked_narrow ( obj.in () TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; return 1; } ACE_CATCHANY { // do nothing } ACE_ENDTRY; return 0; } CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const CORBA_ConstructionPolicy_ptr _tao_objref ) { CORBA::Object_ptr _tao_corba_obj = _tao_objref; return (strm << _tao_corba_obj); } CORBA::Boolean operator>> ( TAO_InputCDR &strm, CORBA_ConstructionPolicy_ptr &_tao_objref ) { ACE_TRY_NEW_ENV { CORBA::Object_var obj; if ((strm >> obj.inout ()) == 0) return 0; // narrow to the right type _tao_objref = CORBA_ConstructionPolicy::_unchecked_narrow ( obj.in () TAO_ENV_ARG_PARAMETER ); ACE_TRY_CHECK; return 1; } ACE_CATCHANY { // do nothing } ACE_ENDTRY; return 0; } CORBA::Boolean operator<< ( TAO_OutputCDR &strm, const CORBA_DomainManagerList &_tao_sequence ) { 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++) { _tao_marshal_flag = (strm << _tao_sequence[i].in ()); } return _tao_marshal_flag; } return 0; // error } CORBA::Boolean operator>> ( TAO_InputCDR &strm, CORBA_DomainManagerList &_tao_sequence ) { 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; // Add a check to the length of the sequence // to make sure it does not exceed the length // of the stream. (See bug 58.) if (_tao_seq_len > strm.length()) return 0; // 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; } return 0; // error }