diff options
Diffstat (limited to 'TAO/tao/IORInterceptor')
-rw-r--r-- | TAO/tao/IORInterceptor/IORInfo.cpp | 73 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInfo.h | 18 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.h | 4 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp | 58 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h | 14 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Details.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/IORInterceptor/IORInterceptor_Details.h | 2 |
8 files changed, 72 insertions, 104 deletions
diff --git a/TAO/tao/IORInterceptor/IORInfo.cpp b/TAO/tao/IORInterceptor/IORInfo.cpp index de6dd91494d..56e74eb0662 100644 --- a/TAO/tao/IORInterceptor/IORInfo.cpp +++ b/TAO/tao/IORInterceptor/IORInfo.cpp @@ -28,15 +28,13 @@ TAO_IORInfo::~TAO_IORInfo (void) CORBA::Policy_ptr TAO_IORInfo::get_effective_policy (CORBA::PolicyType type - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); + this->check_validity (); CORBA::Policy_var policy = - this->poa_->get_policy (type ACE_ENV_ARG_PARAMETER); - ACE_CHECK_RETURN (CORBA::Policy::_nil ()); + this->poa_->get_policy (type); if (!CORBA::is_nil (policy.in ())) { @@ -54,70 +52,62 @@ TAO_IORInfo::get_effective_policy (CORBA::PolicyType type void TAO_IORInfo::add_ior_component (const IOP::TaggedComponent &component - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->check_validity (); if (this->components_established_) - ACE_THROW (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, + throw ( ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO)); // Add the given tagged component to all profiles. this->poa_->save_ior_component (component - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } void TAO_IORInfo::add_ior_component_to_profile ( const IOP::TaggedComponent &component, IOP::ProfileId profile_id - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->check_validity (); if (this->components_established_) - ACE_THROW (CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, + throw ( ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 14, CORBA::COMPLETED_NO)); this->poa_->save_ior_component_and_profile_id (component, profile_id - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } char * -TAO_IORInfo::manager_id (ACE_ENV_SINGLE_ARG_DECL) +TAO_IORInfo::manager_id (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->check_validity (); - PortableServer::POAManager_var poa_manager = this->poa_->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); - return poa_manager->get_id (ACE_ENV_SINGLE_ARG_PARAMETER); + PortableServer::POAManager_var poa_manager = this->poa_->the_POAManager (); + return poa_manager->get_id (); } PortableInterceptor::AdapterState -TAO_IORInfo::state (ACE_ENV_SINGLE_ARG_DECL) +TAO_IORInfo::state (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (PortableInterceptor::NON_EXISTENT); + this->check_validity (); - return this->poa_->get_adapter_state (ACE_ENV_SINGLE_ARG_PARAMETER); + return this->poa_->get_adapter_state (); } PortableInterceptor::ObjectReferenceTemplate * -TAO_IORInfo::adapter_template (ACE_ENV_SINGLE_ARG_DECL) +TAO_IORInfo::adapter_template (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->check_validity (); // Return the Object Reference Template whenever an IOR Interceptor // is invoked. Its value is the template created for the adapter @@ -125,8 +115,7 @@ TAO_IORInfo::adapter_template (ACE_ENV_SINGLE_ARG_DECL) // add_ior_component_to_profile. It's a const value and its value // never changes. PortableInterceptor::ObjectReferenceTemplate *adapter_template = - this->poa_->get_adapter_template (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->poa_->get_adapter_template (); if (adapter_template == 0) { @@ -139,11 +128,10 @@ TAO_IORInfo::adapter_template (ACE_ENV_SINGLE_ARG_DECL) } PortableInterceptor::ObjectReferenceFactory * -TAO_IORInfo::current_factory (ACE_ENV_SINGLE_ARG_DECL) +TAO_IORInfo::current_factory (void) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->check_validity (); // Return the current_factory that is used to create the object // references by the adapter. Though initially, its value is the @@ -151,8 +139,7 @@ TAO_IORInfo::current_factory (ACE_ENV_SINGLE_ARG_DECL) // can be changed. The value of the current_factory can be changed // only during the call to components_established method. PortableInterceptor::ObjectReferenceFactory *adapter_factory = - this->poa_->get_obj_ref_factory (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK_RETURN (0); + this->poa_->get_obj_ref_factory (); if (adapter_factory == 0) { @@ -167,19 +154,17 @@ TAO_IORInfo::current_factory (ACE_ENV_SINGLE_ARG_DECL) void TAO_IORInfo::current_factory ( PortableInterceptor::ObjectReferenceFactory * current_factory - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)) { - this->check_validity (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->check_validity (); this->poa_->set_obj_ref_factory (current_factory - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } void -TAO_IORInfo::check_validity (ACE_ENV_SINGLE_ARG_DECL) +TAO_IORInfo::check_validity (void) { if (this->poa_ == 0) { @@ -189,7 +174,7 @@ TAO_IORInfo::check_validity (ACE_ENV_SINGLE_ARG_DECL) // once the POA has invoked all IORInterceptor interception // points. This also prevents memory access violations from // occuring if the POA is destroyed before this IORInfo object. - ACE_THROW (CORBA::OBJECT_NOT_EXIST (TAO::VMCID, + throw ( ::CORBA::OBJECT_NOT_EXIST (TAO::VMCID, CORBA::COMPLETED_NO)); } } diff --git a/TAO/tao/IORInterceptor/IORInfo.h b/TAO/tao/IORInterceptor/IORInfo.h index 3d4803a6792..df8723f914f 100644 --- a/TAO/tao/IORInterceptor/IORInfo.h +++ b/TAO/tao/IORInterceptor/IORInfo.h @@ -62,13 +62,13 @@ public: /// effect for the object whose IOR is being created. virtual CORBA::Policy_ptr get_effective_policy ( CORBA::PolicyType type - ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ) ACE_THROW_SPEC ((CORBA::SystemException)); /// Add the given tagged component to all profiles. virtual void add_ior_component ( const IOP::TaggedComponent & component - ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ) ACE_THROW_SPEC ((CORBA::SystemException)); /// Add the given tagged component to all profiles matching the given @@ -76,28 +76,28 @@ public: virtual void add_ior_component_to_profile ( const IOP::TaggedComponent & component, IOP::ProfileId profile_id - ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual char * manager_id ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + void) ACE_THROW_SPEC ((CORBA::SystemException)); virtual PortableInterceptor::AdapterState state ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + void) ACE_THROW_SPEC ((CORBA::SystemException)); virtual PortableInterceptor::ObjectReferenceTemplate * adapter_template ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + void) ACE_THROW_SPEC ((CORBA::SystemException)); virtual PortableInterceptor::ObjectReferenceFactory * current_factory ( - ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS) + void) ACE_THROW_SPEC ((CORBA::SystemException)); virtual void current_factory ( PortableInterceptor::ObjectReferenceFactory * current_factory - ACE_ENV_ARG_DECL_WITH_DEFAULTS) + ) ACE_THROW_SPEC ((CORBA::SystemException)); //@} @@ -132,7 +132,7 @@ protected: * this IORInfo object is no longer valid. Throw an exception in * that case. */ - void check_validity (ACE_ENV_SINGLE_ARG_DECL); + void check_validity (void); private: diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp index a917dc798d4..e30e2e7505b 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.cpp @@ -16,14 +16,13 @@ TAO_IORInterceptor_Adapter_Factory_Impl::~TAO_IORInterceptor_Adapter_Factory_Imp } TAO_IORInterceptor_Adapter * -TAO_IORInterceptor_Adapter_Factory_Impl::create (ACE_ENV_SINGLE_ARG_DECL) +TAO_IORInterceptor_Adapter_Factory_Impl::create (void) ACE_THROW_SPEC ((CORBA::SystemException)) { TAO_IORInterceptor_Adapter_Impl *nia = 0; ACE_NEW_THROW_EX (nia, TAO_IORInterceptor_Adapter_Impl (), CORBA::NO_MEMORY ()); - ACE_CHECK_RETURN (nia); return nia; } diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.h b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.h index a08507cd6a6..6696a5320c2 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.h +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Factory_Impl.h @@ -43,9 +43,7 @@ class TAO_IORInterceptor_Export TAO_IORInterceptor_Adapter_Factory_Impl public: virtual ~TAO_IORInterceptor_Adapter_Factory_Impl (void); - virtual TAO_IORInterceptor_Adapter * create ( - ACE_ENV_SINGLE_ARG_DECL - ) + virtual TAO_IORInterceptor_Adapter * create (void) ACE_THROW_SPEC ((CORBA::SystemException)); // Used to force the initialization of the ORB code. diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp index 4b9bc703257..8ac7a0a501b 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.cpp @@ -22,32 +22,29 @@ TAO_IORInterceptor_Adapter_Impl::~TAO_IORInterceptor_Adapter_Impl (void) void TAO_IORInterceptor_Adapter_Impl::add_interceptor ( PortableInterceptor::IORInterceptor_ptr i - ACE_ENV_ARG_DECL + ) { this->ior_interceptor_list_.add_interceptor (i - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } void TAO_IORInterceptor_Adapter_Impl::add_interceptor ( PortableInterceptor::IORInterceptor_ptr i, const CORBA::PolicyList& policies - ACE_ENV_ARG_DECL + ) { this->ior_interceptor_list_.add_interceptor (i, policies - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } void -TAO_IORInterceptor_Adapter_Impl::destroy_interceptors (ACE_ENV_SINGLE_ARG_DECL) +TAO_IORInterceptor_Adapter_Impl::destroy_interceptors (void) { - this->ior_interceptor_list_.destroy_interceptors (ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_CHECK; + this->ior_interceptor_list_.destroy_interceptors (); delete this; } @@ -55,7 +52,7 @@ TAO_IORInterceptor_Adapter_Impl::destroy_interceptors (ACE_ENV_SINGLE_ARG_DECL) void TAO_IORInterceptor_Adapter_Impl::establish_components ( TAO_Root_POA* poa - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)) { const size_t interceptor_count = this->ior_interceptor_list_.size (); @@ -71,7 +68,6 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( TAO::VMCID, ENOMEM), CORBA::COMPLETED_NO)); - ACE_CHECK; PortableInterceptor::IORInfo_var info = tao_info; @@ -82,14 +78,13 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( for (size_t i = 0; i < interceptor_count; ++i) { - ACE_TRY + try { this->ior_interceptor_list_.interceptor (i)->establish_components ( info.in () - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); } - ACE_CATCHANY + catch ( ::CORBA::Exception& ex) { // According to the Portable Interceptors specification, // IORInterceptor::establish_components() must not throw an @@ -100,8 +95,7 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( { CORBA::String_var name = this->ior_interceptor_list_.interceptor (i)->name ( - ACE_ENV_SINGLE_ARG_PARAMETER); - ACE_TRY_CHECK; + ); // @@ What do we do if we get an exception here? if (name.in () != 0) @@ -117,15 +111,12 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( "IORInterceptor::establish_components"); } } - ACE_ENDTRY; - ACE_CHECK; } tao_info->components_established (); this->components_established (info.in () - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); // The IORInfo instance is no longer valid. Invalidate it to // prevent the user from peforming "illegal" operations. @@ -135,7 +126,7 @@ TAO_IORInterceptor_Adapter_Impl::establish_components ( void TAO_IORInterceptor_Adapter_Impl::components_established ( PortableInterceptor::IORInfo_ptr info - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)) { // Iterate over the registered IOR interceptors so that they may be @@ -148,7 +139,7 @@ TAO_IORInterceptor_Adapter_Impl::components_established ( // on all the IORInterceptors. for (size_t j = 0; j < interceptor_count; ++j) { - ACE_TRY + try { PortableInterceptor::IORInterceptor_ptr ior_interceptor = this->ior_interceptor_list_.interceptor (j); @@ -159,17 +150,14 @@ TAO_IORInterceptor_Adapter_Impl::components_established ( { ior_3_interceptor->components_established ( info - ACE_ENV_ARG_PARAMETER); - ACE_TRY_CHECK; + ); } } - ACE_CATCHANY + catch ( ::CORBA::Exception&) { - ACE_THROW (CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 6, - CORBA::COMPLETED_NO)); + throw ::CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 6, + CORBA::COMPLETED_NO); } - ACE_ENDTRY; - ACE_CHECK; } } @@ -177,7 +165,7 @@ void TAO_IORInterceptor_Adapter_Impl::adapter_state_changed ( const TAO::ObjectReferenceTemplate_Array &array_obj_ref_template, PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)) { const size_t interceptor_count = this->ior_interceptor_list_.size (); @@ -212,8 +200,7 @@ TAO_IORInterceptor_Adapter_Impl::adapter_state_changed ( ior_3_interceptor->adapter_state_changed ( seq_obj_ref_template, state - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } } } @@ -222,7 +209,7 @@ void TAO_IORInterceptor_Adapter_Impl::adapter_manager_state_changed ( const char * id, PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)) { /// Whenever the POAManager state is changed, the @@ -245,8 +232,7 @@ TAO_IORInterceptor_Adapter_Impl::adapter_manager_state_changed ( ior_3_interceptor->adapter_manager_state_changed ( id, state - ACE_ENV_ARG_PARAMETER); - ACE_CHECK; + ); } } } diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h index 5dc289f77d8..9094acb23fc 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h +++ b/TAO/tao/IORInterceptor/IORInterceptor_Adapter_Impl.h @@ -55,34 +55,34 @@ public: virtual void add_interceptor ( PortableInterceptor::IORInterceptor_ptr interceptor - ACE_ENV_ARG_DECL); + ); virtual void add_interceptor ( PortableInterceptor::IORInterceptor_ptr interceptor, const CORBA::PolicyList& policies - ACE_ENV_ARG_DECL); + ); - virtual void destroy_interceptors (ACE_ENV_SINGLE_ARG_DECL); + virtual void destroy_interceptors (void); - virtual void establish_components (TAO_Root_POA *poa ACE_ENV_ARG_DECL) + virtual void establish_components (TAO_Root_POA *poa ) ACE_THROW_SPEC ((CORBA::SystemException)); /// Call the IORInterceptor::components_established() method on all /// registered IORInterceptors. virtual void components_established (PortableInterceptor::IORInfo_ptr info - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual void adapter_state_changed ( const TAO::ObjectReferenceTemplate_Array &array_obj_ref_template, PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)); virtual void adapter_manager_state_changed ( const char * id, PortableInterceptor::AdapterState state - ACE_ENV_ARG_DECL) + ) ACE_THROW_SPEC ((CORBA::SystemException)); private: diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Details.cpp b/TAO/tao/IORInterceptor/IORInterceptor_Details.cpp index 77835d4cfd0..1317d6a642e 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Details.cpp +++ b/TAO/tao/IORInterceptor/IORInterceptor_Details.cpp @@ -13,10 +13,10 @@ namespace TAO void IORInterceptor_Details::apply_policies ( const CORBA::PolicyList &/*policies*/ - ACE_ENV_ARG_DECL) + ) { // There are currently no policies that apply to IOR Interceptors. - ACE_THROW (CORBA::INV_POLICY ()); + throw ( ::CORBA::INV_POLICY ()); } } diff --git a/TAO/tao/IORInterceptor/IORInterceptor_Details.h b/TAO/tao/IORInterceptor/IORInterceptor_Details.h index bb2ce8b0fa8..9bee1807d7e 100644 --- a/TAO/tao/IORInterceptor/IORInterceptor_Details.h +++ b/TAO/tao/IORInterceptor/IORInterceptor_Details.h @@ -52,7 +52,7 @@ namespace TAO { public: void apply_policies (const CORBA::PolicyList& policies - ACE_ENV_ARG_DECL); + ); }; } |