diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-04 18:58:07 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-04 18:58:07 +0000 |
commit | d2c501f4e06a6a6fe1b1df647003efcae33e5ad4 (patch) | |
tree | 1fa9e868cb01b5ae09333602eb5142092453af0c /TAO/tao/PortableServer | |
parent | f093d7dce0fa8985fc8eaeafdd4004c4805fc260 (diff) | |
download | ATCD-d2c501f4e06a6a6fe1b1df647003efcae33e5ad4.tar.gz |
Sun Feb 4 18:51:14 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/tao/PortableServer')
35 files changed, 161 insertions, 345 deletions
diff --git a/TAO/tao/PortableServer/LifespanStrategyFactoryImpl.cpp b/TAO/tao/PortableServer/LifespanStrategyFactoryImpl.cpp index 02b20df1881..2ae31deafd4 100644 --- a/TAO/tao/PortableServer/LifespanStrategyFactoryImpl.cpp +++ b/TAO/tao/PortableServer/LifespanStrategyFactoryImpl.cpp @@ -50,9 +50,7 @@ namespace TAO } void - LifespanStrategyFactoryImpl::destroy ( - LifespanStrategy *strategy - ) + LifespanStrategyFactoryImpl::destroy (LifespanStrategy *strategy) { switch (strategy->type ()) { diff --git a/TAO/tao/PortableServer/LifespanStrategyPersistent.cpp b/TAO/tao/PortableServer/LifespanStrategyPersistent.cpp index 3d089ef2b79..8f16ff49b3a 100644 --- a/TAO/tao/PortableServer/LifespanStrategyPersistent.cpp +++ b/TAO/tao/PortableServer/LifespanStrategyPersistent.cpp @@ -21,9 +21,7 @@ namespace TAO namespace Portable_Server { void - LifespanStrategyPersistent::strategy_init ( - TAO_Root_POA *poa - ) + LifespanStrategyPersistent::strategy_init (TAO_Root_POA *poa) { LifespanStrategy::strategy_init (poa); diff --git a/TAO/tao/PortableServer/LifespanStrategyPersistentFactoryImpl.cpp b/TAO/tao/PortableServer/LifespanStrategyPersistentFactoryImpl.cpp index 29ed3ec4cac..19d079dcb95 100644 --- a/TAO/tao/PortableServer/LifespanStrategyPersistentFactoryImpl.cpp +++ b/TAO/tao/PortableServer/LifespanStrategyPersistentFactoryImpl.cpp @@ -38,9 +38,7 @@ namespace TAO } void - LifespanStrategyPersistentFactoryImpl::destroy ( - LifespanStrategy *strategy - ) + LifespanStrategyPersistentFactoryImpl::destroy (LifespanStrategy *strategy) { strategy->strategy_cleanup (); diff --git a/TAO/tao/PortableServer/LifespanStrategyTransientFactoryImpl.cpp b/TAO/tao/PortableServer/LifespanStrategyTransientFactoryImpl.cpp index 0072ac6fd52..724f137d507 100644 --- a/TAO/tao/PortableServer/LifespanStrategyTransientFactoryImpl.cpp +++ b/TAO/tao/PortableServer/LifespanStrategyTransientFactoryImpl.cpp @@ -38,9 +38,7 @@ namespace TAO } void - LifespanStrategyTransientFactoryImpl::destroy ( - LifespanStrategy *strategy - ) + LifespanStrategyTransientFactoryImpl::destroy (LifespanStrategy *strategy) { strategy->strategy_cleanup (); diff --git a/TAO/tao/PortableServer/ORT_Adapter.h b/TAO/tao/PortableServer/ORT_Adapter.h index 8fab6447616..3ddbc63ac6b 100644 --- a/TAO/tao/PortableServer/ORT_Adapter.h +++ b/TAO/tao/PortableServer/ORT_Adapter.h @@ -63,13 +63,11 @@ namespace TAO virtual int activate (const char *server_id, const char *orb_id, PortableInterceptor::AdapterName *, - PortableServer::POA_ptr poa - ) = 0; + PortableServer::POA_ptr poa) = 0; /// Set a different ort_factory to be used. virtual int set_obj_ref_factory ( - PortableInterceptor::ObjectReferenceFactory *current_factory - ) = 0; + PortableInterceptor::ObjectReferenceFactory *current_factory) = 0; /// Accessor methods to ObjectReferenceTemplate template virtual PortableInterceptor::ObjectReferenceTemplate * @@ -100,9 +98,7 @@ namespace TAO const char * repository_id, const PortableInterceptor::ObjectId & id ) - ACE_THROW_SPEC (( - CORBA::SystemException - )) = 0; + ACE_THROW_SPEC ((CORBA::SystemException)) = 0; //@} }; diff --git a/TAO/tao/PortableServer/Object_Adapter.cpp b/TAO/tao/PortableServer/Object_Adapter.cpp index 196377f46ec..90cc0619560 100644 --- a/TAO/tao/PortableServer/Object_Adapter.cpp +++ b/TAO/tao/PortableServer/Object_Adapter.cpp @@ -342,8 +342,7 @@ TAO_Object_Adapter::create_lock (int enable_locking, int TAO_Object_Adapter::dispatch_servant (const TAO::ObjectKey &key, TAO_ServerRequest &req, - CORBA::Object_out forward_to - ) + CORBA::Object_out forward_to) { ACE_FUNCTION_TIMEPROBE (TAO_OBJECT_ADAPTER_DISPATCH_SERVANT_START); @@ -354,11 +353,7 @@ TAO_Object_Adapter::dispatch_servant (const TAO::ObjectKey &key, // Set up state in the POA et al (including the POA Current), so // that we know that this servant is currently in an upcall. const char *operation = req.operation (); - int result = - servant_upcall.prepare_for_upcall (key, - operation, - forward_to - ); + int result = servant_upcall.prepare_for_upcall (key, operation, forward_to); if (result != TAO_Adapter::DS_OK) return result; @@ -366,13 +361,11 @@ TAO_Object_Adapter::dispatch_servant (const TAO::ObjectKey &key, // Preprocess request. if (req.collocated ()) { - servant_upcall.pre_invoke_collocated_request ( - ); + servant_upcall.pre_invoke_collocated_request (); } else { - servant_upcall.pre_invoke_remote_request (req - ); + servant_upcall.pre_invoke_remote_request (req); } // Servant dispatch. @@ -401,8 +394,7 @@ TAO_Object_Adapter::dispatch_servant (const TAO::ObjectKey &key, void TAO_Object_Adapter::locate_poa (const TAO::ObjectKey &key, PortableServer::ObjectId &system_id, - TAO_Root_POA *&poa - ) + TAO_Root_POA *&poa) { TAO_Object_Adapter::poa_name poa_system_name; CORBA::Boolean is_root = false; diff --git a/TAO/tao/PortableServer/POAManager.cpp b/TAO/tao/PortableServer/POAManager.cpp index a271dfdf4d1..6625cb3743c 100644 --- a/TAO/tao/PortableServer/POAManager.cpp +++ b/TAO/tao/PortableServer/POAManager.cpp @@ -87,21 +87,18 @@ TAO_POA_Manager::activate_i (void) } } - this->adapter_manager_state_changed (this->state_ - ); + this->adapter_manager_state_changed (this->state_); } void TAO_POA_Manager::deactivate_i (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion - ) + CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)) { // Is the <wait_for_completion> semantics for this thread correct? TAO_Root_POA::check_for_valid_wait_for_completions (this->object_adapter_.orb_core (), - wait_for_completion - ); + wait_for_completion); // This operation changes the state of the POA manager to // inactive. If issued while the POA manager is in the inactive @@ -153,9 +150,7 @@ TAO_POA_Manager::deactivate_i (CORBA::Boolean etherealize_objects, // strategy to stop the dispatching threads. poa->poa_deactivated_hook (); - poa->deactivate_all_objects_i (etherealize_objects, - wait_for_completion - ); + poa->deactivate_all_objects_i (etherealize_objects, wait_for_completion); } // If the ORB::shutdown operation is called, it makes a call on @@ -163,14 +158,11 @@ TAO_POA_Manager::deactivate_i (CORBA::Boolean etherealize_objects, // manager known in the process; the wait_for_completion parameter // to deactivate will be the same as the similarly named parameter // of ORB::shutdown. - - this->adapter_manager_state_changed (this->state_ - ); + this->adapter_manager_state_changed (this->state_); } void -TAO_POA_Manager::adapter_manager_state_changed (PortableServer::POAManager::State state - ) +TAO_POA_Manager::adapter_manager_state_changed (PortableServer::POAManager::State state) ACE_THROW_SPEC ((CORBA::SystemException)) { PortableInterceptor::AdapterState adapter_state = @@ -182,23 +174,20 @@ TAO_POA_Manager::adapter_manager_state_changed (PortableServer::POAManager::Stat if (ior_adapter) { ior_adapter->adapter_manager_state_changed (this->id_.in (), - adapter_state - ); + adapter_state); } } #if (TAO_HAS_MINIMUM_POA == 0) void -TAO_POA_Manager::hold_requests_i (CORBA::Boolean wait_for_completion - ) +TAO_POA_Manager::hold_requests_i (CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)) { // Is the <wait_for_completion> semantics for this thread correct? TAO_Root_POA::check_for_valid_wait_for_completions (this->object_adapter_.orb_core (), - wait_for_completion - ); + wait_for_completion); // This operation changes the state of the POA manager to // holding. If issued while the POA manager is in the inactive @@ -237,25 +226,21 @@ TAO_POA_Manager::hold_requests_i (CORBA::Boolean wait_for_completion ++iterator) { TAO_Root_POA *poa = *iterator; - poa->wait_for_completions (wait_for_completion - ); + poa->wait_for_completions (wait_for_completion); } } - this->adapter_manager_state_changed (this->state_ - ); + this->adapter_manager_state_changed (this->state_); } void -TAO_POA_Manager::discard_requests_i (CORBA::Boolean wait_for_completion - ) +TAO_POA_Manager::discard_requests_i (CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)) { // Is the <wait_for_completion> semantics for this thread correct? TAO_Root_POA::check_for_valid_wait_for_completions (this->object_adapter_.orb_core (), - wait_for_completion - ); + wait_for_completion); // This operation changes the state of the POA manager to // discarding. If issued while the POA manager is in the inactive @@ -296,13 +281,11 @@ TAO_POA_Manager::discard_requests_i (CORBA::Boolean wait_for_completion ++iterator) { TAO_Root_POA *poa = *iterator; - poa->wait_for_completions (wait_for_completion - ); + poa->wait_for_completions (wait_for_completion); } } - this->adapter_manager_state_changed (this->state_ - ); + this->adapter_manager_state_changed (this->state_); } #endif /* TAO_HAS_MINIMUM_POA == 0 */ diff --git a/TAO/tao/PortableServer/POAManager.h b/TAO/tao/PortableServer/POAManager.h index 6e37d9db634..e2935dd6023 100644 --- a/TAO/tao/PortableServer/POAManager.h +++ b/TAO/tao/PortableServer/POAManager.h @@ -68,8 +68,7 @@ public: #if (TAO_HAS_MINIMUM_POA == 0) - void hold_requests (CORBA::Boolean wait_for_completion - ) + void hold_requests (CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)); @@ -79,8 +78,7 @@ public: PortableServer::POAManager::AdapterInactive)); void deactivate (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion - ) + CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)); @@ -109,12 +107,10 @@ public: PortableServer::POAManager::State get_state_i () ACE_THROW_SPEC ((CORBA::SystemException)); - virtual CORBA::ORB_ptr _get_orb ( - - ); + virtual CORBA::ORB_ptr _get_orb (void); #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) - CORBA::PolicyList& get_policies (); + CORBA::PolicyList& get_policies (void); #endif protected: @@ -124,26 +120,22 @@ protected: PortableServer::POAManager::AdapterInactive)); void deactivate_i (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion - ) + CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)); /// Method needed for notifying the IORInterceptors that the state /// of POAManager changed. - void adapter_manager_state_changed (PortableServer::POAManager::State state - ) + void adapter_manager_state_changed (PortableServer::POAManager::State state) ACE_THROW_SPEC ((CORBA::SystemException)); #if (TAO_HAS_MINIMUM_POA == 0) - void hold_requests_i (CORBA::Boolean wait_for_completion - ) + void hold_requests_i (CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)); - void discard_requests_i (CORBA::Boolean wait_for_completion - ) + void discard_requests_i (CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)); diff --git a/TAO/tao/PortableServer/POAManager.inl b/TAO/tao/PortableServer/POAManager.inl index c8bcd0e7c50..cfbdb77cd85 100644 --- a/TAO/tao/PortableServer/POAManager.inl +++ b/TAO/tao/PortableServer/POAManager.inl @@ -27,8 +27,7 @@ TAO_POA_Manager::activate (void) #if (TAO_HAS_MINIMUM_POA == 0) ACE_INLINE void -TAO_POA_Manager::hold_requests (CORBA::Boolean wait_for_completion - ) +TAO_POA_Manager::hold_requests (CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)) { @@ -39,8 +38,7 @@ TAO_POA_Manager::hold_requests (CORBA::Boolean wait_for_completion } ACE_INLINE void -TAO_POA_Manager::discard_requests (CORBA::Boolean wait_for_completion - ) +TAO_POA_Manager::discard_requests (CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)) { @@ -52,17 +50,14 @@ TAO_POA_Manager::discard_requests (CORBA::Boolean wait_for_completion ACE_INLINE void TAO_POA_Manager::deactivate (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion - ) + CORBA::Boolean wait_for_completion) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POAManager::AdapterInactive)) { // Lock access to the POAManager for the duration of this transaction TAO_OBJECT_ADAPTER_GUARD; - this->deactivate_i (etherealize_objects, - wait_for_completion - ); + this->deactivate_i (etherealize_objects, wait_for_completion); } #endif /* TAO_HAS_MINIMUM_POA == 0 */ @@ -131,7 +126,7 @@ TAO_POA_Manager::generate_manager_id (void) const #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) ACE_INLINE -CORBA::PolicyList& TAO_POA_Manager::get_policies () +CORBA::PolicyList& TAO_POA_Manager::get_policies (void) { return this->policies_; } diff --git a/TAO/tao/PortableServer/POAManagerFactory.cpp b/TAO/tao/PortableServer/POAManagerFactory.cpp index d62e36592d4..62606565686 100644 --- a/TAO/tao/PortableServer/POAManagerFactory.cpp +++ b/TAO/tao/PortableServer/POAManagerFactory.cpp @@ -36,12 +36,10 @@ TAO_POAManager_Factory::create_POAManager ( TAO_POA_Policy_Set tao_policies (TAO_POA_Policy_Set (this->object_adapter_.default_poa_policies ())); // Merge policies from the ORB level. - this->object_adapter_.validator ().merge_policies (tao_policies.policies () - ); + this->object_adapter_.validator ().merge_policies (tao_policies.policies ()); // Merge in any policies that the user may have specified. - tao_policies.merge_policies (policies - ); + tao_policies.merge_policies (policies); // If any of the policy objects specified are not valid for the ORB // implementation, if conflicting policy objects are specified, or @@ -50,8 +48,7 @@ TAO_POAManager_Factory::create_POAManager ( // InvalidPolicy exception is raised containing the index in the // policies parameter value of the first offending policy object. tao_policies.validate_policies (this->object_adapter_.validator (), - this->object_adapter_.orb_core () - ); + this->object_adapter_.orb_core ()); PortableServer::POAManager_var poamanager; @@ -84,8 +81,7 @@ TAO_POAManager_Factory::create_POAManager ( } ::PortableServer::POAManagerFactory::POAManagerSeq * -TAO_POAManager_Factory::list ( - void) +TAO_POAManager_Factory::list (void) ACE_THROW_SPEC ((CORBA::SystemException)) { ::PortableServer::POAManagerFactory::POAManagerSeq_var poamanagers; @@ -112,8 +108,7 @@ TAO_POAManager_Factory::list ( } ::PortableServer::POAManager_ptr -TAO_POAManager_Factory::find ( - const char * id ) +TAO_POAManager_Factory::find (const char * id ) ACE_THROW_SPEC ((CORBA::SystemException)) { ::PortableServer::POAManager_ptr poamanager = @@ -123,8 +118,7 @@ TAO_POAManager_Factory::find ( iterator != this->poamanager_set_.end (); ++iterator) { - CORBA::String_var poamanagerid = - (*iterator)->get_id (); + CORBA::String_var poamanagerid = (*iterator)->get_id (); if (ACE_OS::strcmp (id, poamanagerid.in()) == 0) { @@ -153,8 +147,7 @@ int TAO_POAManager_Factory::remove_poamanager ( ::PortableServer::POAManager_ptr poamanager) { - int retval = 0; - retval = this->poamanager_set_.remove (poamanager); + int retval = this->poamanager_set_.remove (poamanager); if (retval == 0) { diff --git a/TAO/tao/PortableServer/POAManagerFactory.h b/TAO/tao/PortableServer/POAManagerFactory.h index ea0fa1d0cee..62d4830b10c 100644 --- a/TAO/tao/PortableServer/POAManagerFactory.h +++ b/TAO/tao/PortableServer/POAManagerFactory.h @@ -49,18 +49,15 @@ public: virtual ::PortableServer::POAManager_ptr create_POAManager ( const char * id, - const ::CORBA::PolicyList & policies - ) + const ::CORBA::PolicyList & policies) ACE_THROW_SPEC ((CORBA::SystemException, ::PortableServer::POAManagerFactory::ManagerAlreadyExists, ::CORBA::PolicyError)); - virtual ::PortableServer::POAManagerFactory::POAManagerSeq * list ( - void) + virtual ::PortableServer::POAManagerFactory::POAManagerSeq * list (void) ACE_THROW_SPEC ((CORBA::SystemException)); - virtual ::PortableServer::POAManager_ptr find ( - const char * id ) + virtual ::PortableServer::POAManager_ptr find (const char * id ) ACE_THROW_SPEC ((CORBA::SystemException)); void remove_all_poamanagers (void); diff --git a/TAO/tao/PortableServer/POA_Current.cpp b/TAO/tao/PortableServer/POA_Current.cpp index 2789b50878c..1afa61544d3 100644 --- a/TAO/tao/PortableServer/POA_Current.cpp +++ b/TAO/tao/PortableServer/POA_Current.cpp @@ -75,8 +75,7 @@ namespace TAO POA_Current_Impl * POA_Current::implementation (POA_Current_Impl *new_current) { - TAO_TSS_Resources *tss = - TAO_TSS_Resources::instance (); + TAO_TSS_Resources *tss = TAO_TSS_Resources::instance (); POA_Current_Impl *old = static_cast <POA_Current_Impl *> diff --git a/TAO/tao/PortableServer/POA_Current_Factory.h b/TAO/tao/PortableServer/POA_Current_Factory.h index 678ce9f043c..bc0f3a9d7e4 100644 --- a/TAO/tao/PortableServer/POA_Current_Factory.h +++ b/TAO/tao/PortableServer/POA_Current_Factory.h @@ -34,8 +34,7 @@ public: /// Creates a PICurrent and returns it. virtual CORBA::Object_ptr create_object (CORBA::ORB_ptr orb, int argc, - ACE_TCHAR *argv [] - ) + ACE_TCHAR *argv []) ACE_THROW_SPEC ((CORBA::SystemException)); }; diff --git a/TAO/tao/PortableServer/POA_Current_Impl.cpp b/TAO/tao/PortableServer/POA_Current_Impl.cpp index eab3e4d0e4f..87c214651a5 100644 --- a/TAO/tao/PortableServer/POA_Current_Impl.cpp +++ b/TAO/tao/PortableServer/POA_Current_Impl.cpp @@ -28,13 +28,12 @@ namespace TAO servant_ (0), priority_ (TAO_INVALID_PRIORITY), previous_current_impl_ (0), - setup_done_ (0) + setup_done_ (false) { } void - POA_Current_Impl::setup (::TAO_Root_POA *p, - const TAO::ObjectKey &key) + POA_Current_Impl::setup (::TAO_Root_POA *p, const TAO::ObjectKey &key) { // Remember information about this upcall. this->poa_ = p; @@ -49,7 +48,7 @@ namespace TAO this->tss_resources_->poa_current_impl_ = this; // Setup is complete. - this->setup_done_ = 1; + this->setup_done_ = true; } POA_Current_Impl * diff --git a/TAO/tao/PortableServer/POA_Current_Impl.h b/TAO/tao/PortableServer/POA_Current_Impl.h index c14df79916d..32c6841f397 100644 --- a/TAO/tao/PortableServer/POA_Current_Impl.h +++ b/TAO/tao/PortableServer/POA_Current_Impl.h @@ -137,8 +137,7 @@ namespace TAO void teardown (void); /// Setup the current. - void setup (::TAO_Root_POA *impl, - const TAO::ObjectKey &key); + void setup (::TAO_Root_POA *impl, const TAO::ObjectKey &key); private: @@ -174,7 +173,7 @@ namespace TAO POA_Current_Impl *previous_current_impl_; /// Is setup complete? - int setup_done_; + bool setup_done_; /// Pointer to tss resources. TAO_TSS_Resources *tss_resources_; diff --git a/TAO/tao/PortableServer/POA_Guard.cpp b/TAO/tao/PortableServer/POA_Guard.cpp index f13233c81e9..17b976b6244 100644 --- a/TAO/tao/PortableServer/POA_Guard.cpp +++ b/TAO/tao/PortableServer/POA_Guard.cpp @@ -15,9 +15,7 @@ namespace TAO { namespace Portable_Server { - POA_Guard::POA_Guard (::TAO_Root_POA &poa - , - int check_for_destruction) + POA_Guard::POA_Guard (::TAO_Root_POA &poa, bool check_for_destruction) : guard_ (poa.lock ()) { if (!this->guard_.locked ()) @@ -33,8 +31,7 @@ namespace TAO // course, the thread making the non-servant upcall is this thread. poa.object_adapter ().wait_for_non_servant_upcalls_to_complete (); - if (check_for_destruction && - poa.cleanup_in_progress ()) + if (check_for_destruction && poa.cleanup_in_progress ()) throw CORBA::BAD_INV_ORDER ( CORBA::SystemException::_tao_minor_code ( diff --git a/TAO/tao/PortableServer/POA_Guard.h b/TAO/tao/PortableServer/POA_Guard.h index ae77c6de2be..53f39fc7686 100644 --- a/TAO/tao/PortableServer/POA_Guard.h +++ b/TAO/tao/PortableServer/POA_Guard.h @@ -41,9 +41,7 @@ namespace TAO class TAO_PortableServer_Export POA_Guard { public: - POA_Guard (::TAO_Root_POA &poa - , - int check_for_destruction = 1); + POA_Guard (::TAO_Root_POA &poa, bool check_for_destruction = true); private: ACE_Guard<ACE_Lock> guard_; diff --git a/TAO/tao/PortableServer/POA_Policy_Set.cpp b/TAO/tao/PortableServer/POA_Policy_Set.cpp index cd60ac7b1a2..084ce2cb75f 100644 --- a/TAO/tao/PortableServer/POA_Policy_Set.cpp +++ b/TAO/tao/PortableServer/POA_Policy_Set.cpp @@ -33,8 +33,8 @@ TAO_POA_Policy_Set::~TAO_POA_Policy_Set (void) } void -TAO_POA_Policy_Set::add_client_exposed_fixed_policies (CORBA::PolicyList *client_exposed_policies - ) +TAO_POA_Policy_Set::add_client_exposed_fixed_policies ( + CORBA::PolicyList *client_exposed_policies) { CORBA::ULong cep_index = client_exposed_policies->length (); @@ -48,9 +48,7 @@ TAO_POA_Policy_Set::add_client_exposed_fixed_policies (CORBA::PolicyList *client if (policy->_tao_scope () & TAO_POLICY_CLIENT_EXPOSED) { client_exposed_policies->length (cep_index + 1); - (*client_exposed_policies)[cep_index] = - policy->copy (); - + (*client_exposed_policies)[cep_index] = policy->copy (); cep_index++; } } @@ -58,8 +56,7 @@ TAO_POA_Policy_Set::add_client_exposed_fixed_policies (CORBA::PolicyList *client void TAO_POA_Policy_Set::validate_policies (TAO_Policy_Validator &validator, - TAO_ORB_Core &orb_core - ) + TAO_ORB_Core &orb_core) { // Just give a last chance for all the unloaded validators in other // libraries to be registered @@ -80,7 +77,7 @@ TAO_POA_Policy_Set::validate_policies (TAO_Policy_Validator &validator, if (validator.legal_policy (type) == 0) { -#if ! defined (CORBA_E_MICRO) +#if !defined (CORBA_E_MICRO) // An invalid policy was specified. Let the user know about // it. throw PortableServer::POA::InvalidPolicy (); diff --git a/TAO/tao/PortableServer/POA_Policy_Set.inl b/TAO/tao/PortableServer/POA_Policy_Set.inl index e91e7111d94..ced101d0a5d 100644 --- a/TAO/tao/PortableServer/POA_Policy_Set.inl +++ b/TAO/tao/PortableServer/POA_Policy_Set.inl @@ -17,33 +17,26 @@ TAO_POA_Policy_Set::get_policy_by_index (CORBA::ULong index) } ACE_INLINE CORBA::Policy_ptr -TAO_POA_Policy_Set::get_cached_policy (TAO_Cached_Policy_Type type - ) +TAO_POA_Policy_Set::get_cached_policy (TAO_Cached_Policy_Type type) { - return this->impl_.get_cached_policy (type - ); + return this->impl_.get_cached_policy (type); } ACE_INLINE void -TAO_POA_Policy_Set::merge_policies (const CORBA::PolicyList &policies - ) +TAO_POA_Policy_Set::merge_policies (const CORBA::PolicyList &policies) { // Add the policies if they don't exist, override them if they do. - this->impl_.set_policy_overrides (policies, - CORBA::ADD_OVERRIDE - ); + this->impl_.set_policy_overrides (policies, CORBA::ADD_OVERRIDE); } ACE_INLINE void -TAO_POA_Policy_Set::merge_policy (const CORBA::Policy_ptr policy - ) +TAO_POA_Policy_Set::merge_policy (const CORBA::Policy_ptr policy) { this->impl_.set_policy (policy); } ACE_INLINE CORBA::Policy_ptr -TAO_POA_Policy_Set::get_policy (CORBA::PolicyType policy - ) +TAO_POA_Policy_Set::get_policy (CORBA::PolicyType policy) { return this->impl_.get_policy (policy); } diff --git a/TAO/tao/PortableServer/Regular_POA.cpp b/TAO/tao/PortableServer/Regular_POA.cpp index 336bf44a057..332cbb25d69 100644 --- a/TAO/tao/PortableServer/Regular_POA.cpp +++ b/TAO/tao/PortableServer/Regular_POA.cpp @@ -42,7 +42,7 @@ TAO_Regular_POA::remove_from_parent_i (void) // Remove POA from the parent if (this->parent_ != 0) { - int result = this->parent_->delete_child (this->name_); + int const result = this->parent_->delete_child (this->name_); if (result != 0) { throw ::CORBA::OBJ_ADAPTER (); diff --git a/TAO/tao/PortableServer/RequestProcessingStrategy.cpp b/TAO/tao/PortableServer/RequestProcessingStrategy.cpp index 9a5f04eb0a3..237449a1938 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategy.cpp +++ b/TAO/tao/PortableServer/RequestProcessingStrategy.cpp @@ -29,17 +29,14 @@ namespace TAO void RequestProcessingStrategy::strategy_init( TAO_Root_POA *poa, - ::PortableServer::ServantRetentionPolicyValue sr_value - ) + ::PortableServer::ServantRetentionPolicyValue sr_value) { poa_ = poa; sr_value_ = sr_value; } void - RequestProcessingStrategy::strategy_init( - TAO_Root_POA *poa - ) + RequestProcessingStrategy::strategy_init(TAO_Root_POA *poa) { poa_ = poa; } diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyAOMOnly.cpp b/TAO/tao/PortableServer/RequestProcessingStrategyAOMOnly.cpp index 02ce198ef8c..00820d38a9d 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyAOMOnly.cpp +++ b/TAO/tao/PortableServer/RequestProcessingStrategyAOMOnly.cpp @@ -33,8 +33,7 @@ namespace TAO void RequestProcessingStrategyAOMOnly::set_servant_manager ( - PortableServer::ServantManager_ptr /*imgr*/ - ) + PortableServer::ServantManager_ptr /*imgr*/) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -43,8 +42,7 @@ namespace TAO void RequestProcessingStrategyAOMOnly::set_servant ( - PortableServer::Servant /*servant*/ - ) + PortableServer::Servant /*servant*/) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -64,12 +62,9 @@ namespace TAO TAO_SERVANT_LOCATION RequestProcessingStrategyAOMOnly::locate_servant ( const PortableServer::ObjectId & system_id, - PortableServer::Servant & servant - ) + PortableServer::Servant & servant) { - return this->poa_->servant_present (system_id, - servant - ); + return this->poa_->servant_present (system_id, servant); } PortableServer::Servant @@ -78,15 +73,13 @@ namespace TAO const PortableServer::ObjectId &system_id, TAO::Portable_Server::Servant_Upcall &servant_upcall, TAO::Portable_Server::POA_Current_Impl &poa_current_impl, - bool & /*wait_occurred_restart_call*/ - ) + bool & /*wait_occurred_restart_call*/) { PortableServer::Servant servant = 0; servant = this->poa_->find_servant (system_id, servant_upcall, - poa_current_impl - ); + poa_current_impl); if (servant == 0) { @@ -100,30 +93,25 @@ namespace TAO PortableServer::Servant RequestProcessingStrategyAOMOnly::system_id_to_servant ( - const PortableServer::ObjectId &system_id - ) + const PortableServer::ObjectId &system_id) { - return this->poa_->find_servant (system_id - ); + return this->poa_->find_servant (system_id); } PortableServer::Servant RequestProcessingStrategyAOMOnly::id_to_servant ( - const PortableServer::ObjectId &id - ) + const PortableServer::ObjectId &id) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy)) { - return this->poa_->user_id_to_servant_i (id - ); + return this->poa_->user_id_to_servant_i (id); } void RequestProcessingStrategyAOMOnly::cleanup_servant ( PortableServer::Servant servant, - const PortableServer::ObjectId &user_id - ) + const PortableServer::ObjectId &user_id) { if (servant) { @@ -137,9 +125,7 @@ namespace TAO // This operation causes the association of the Object Id specified // by the oid parameter and its servant to be removed from the // Active Object Map. - int result = this->poa_->unbind_using_user_id (user_id); - - if (result != 0) + if (this->poa_->unbind_using_user_id (user_id) != 0) { throw ::CORBA::OBJ_ADAPTER (); } @@ -153,8 +139,7 @@ namespace TAO PortableServer::ObjectId * RequestProcessingStrategyAOMOnly::servant_to_id ( - PortableServer::Servant servant - ) + PortableServer::Servant servant) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy)) diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyDefaultServant.cpp b/TAO/tao/PortableServer/RequestProcessingStrategyDefaultServant.cpp index 19d8be55286..4da60d19159 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyDefaultServant.cpp +++ b/TAO/tao/PortableServer/RequestProcessingStrategyDefaultServant.cpp @@ -29,15 +29,13 @@ namespace TAO } void - RequestProcessingStrategyDefaultServant::strategy_cleanup( - void) + RequestProcessingStrategyDefaultServant::strategy_cleanup(void) { this->default_servant_ = 0; } PortableServer::ServantManager_ptr - RequestProcessingStrategyDefaultServant::get_servant_manager ( - void) + RequestProcessingStrategyDefaultServant::get_servant_manager (void) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -46,8 +44,7 @@ namespace TAO void RequestProcessingStrategyDefaultServant::set_servant_manager ( - PortableServer::ServantManager_ptr /*imgr*/ - ) + PortableServer::ServantManager_ptr /*imgr*/) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -55,8 +52,7 @@ namespace TAO } PortableServer::Servant - RequestProcessingStrategyDefaultServant::get_servant ( - void) + RequestProcessingStrategyDefaultServant::get_servant (void) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -106,9 +102,7 @@ namespace TAO { TAO_SERVANT_LOCATION location = TAO_SERVANT_NOT_FOUND; - location = this->poa_->servant_present (system_id, - servant - ); + location = this->poa_->servant_present (system_id, servant); if (location == TAO_SERVANT_NOT_FOUND) { @@ -134,8 +128,7 @@ namespace TAO servant = this->poa_->find_servant (system_id, servant_upcall, - poa_current_impl - ); + poa_current_impl); if (servant == 0) { @@ -163,15 +156,13 @@ namespace TAO PortableServer::Servant RequestProcessingStrategyDefaultServant::system_id_to_servant ( - const PortableServer::ObjectId &system_id - ) + const PortableServer::ObjectId &system_id) { PortableServer::Servant servant = this->default_servant_.in (); if (servant == 0) { - servant = this->poa_->find_servant (system_id - ); + servant = this->poa_->find_servant (system_id); } return servant; @@ -179,8 +170,7 @@ namespace TAO PortableServer::Servant RequestProcessingStrategyDefaultServant::id_to_servant ( - const PortableServer::ObjectId & /*id*/ - ) + const PortableServer::ObjectId & /*id*/) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy)) @@ -218,9 +208,7 @@ namespace TAO // This operation causes the association of the Object Id specified // by the oid parameter and its servant to be removed from the // Active Object Map. - int result = this->poa_->unbind_using_user_id (user_id); - - if (result != 0) + if (this->poa_->unbind_using_user_id (user_id) != 0) { throw ::CORBA::OBJ_ADAPTER (); } diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp b/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp index 34288d600c2..fd86bc09d46 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp +++ b/TAO/tao/PortableServer/RequestProcessingStrategyServantActivator.cpp @@ -28,23 +28,20 @@ namespace TAO } void - RequestProcessingStrategyServantActivator::strategy_cleanup ( - void) + RequestProcessingStrategyServantActivator::strategy_cleanup (void) { { Non_Servant_Upcall non_servant_upcall (*this->poa_); ACE_UNUSED_ARG (non_servant_upcall); - this->servant_activator_ = - PortableServer::ServantActivator::_nil (); + this->servant_activator_ = PortableServer::ServantActivator::_nil (); } RequestProcessingStrategy::strategy_cleanup (); } PortableServer::ServantManager_ptr - RequestProcessingStrategyServantActivator::get_servant_manager ( - void) + RequestProcessingStrategyServantActivator::get_servant_manager (void) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -53,8 +50,7 @@ namespace TAO void RequestProcessingStrategyServantActivator::set_servant_manager ( - PortableServer::ServantManager_ptr imgr - ) + PortableServer::ServantManager_ptr imgr) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -77,8 +73,7 @@ namespace TAO TAO_SERVANT_LOCATION RequestProcessingStrategyServantActivator::locate_servant ( const PortableServer::ObjectId &system_id, - PortableServer::Servant &servant - ) + PortableServer::Servant &servant) { TAO_SERVANT_LOCATION location = TAO_SERVANT_NOT_FOUND; @@ -163,7 +158,7 @@ namespace TAO // are no errors or if a restart is not required. if (!wait_occurred_restart_call) { - int result = + int const result = this->poa_-> rebind_using_user_id_and_system_id (servant, poa_current_impl.object_id (), @@ -222,8 +217,7 @@ namespace TAO PortableServer::Servant RequestProcessingStrategyServantActivator::incarnate_servant ( - const PortableServer::ObjectId& object_id - ) + const PortableServer::ObjectId& object_id) { PortableServer::Servant servant = 0; @@ -235,8 +229,7 @@ namespace TAO // Invocations of incarnate on the servant manager are serialized. // Invocations of etherealize on the servant manager are serialized. // Invocations of incarnate and etherealize on the servant manager are mutually exclusive. - servant = this->servant_activator_->incarnate (object_id, - this->poa_); + servant = this->servant_activator_->incarnate (object_id, this->poa_); if (servant == 0) { @@ -301,9 +294,7 @@ namespace TAO // This operation causes the association of the Object Id specified // by the oid parameter and its servant to be removed from the // Active Object Map. - int const result = this->poa_->unbind_using_user_id (user_id); - - if (result != 0) + if (this->poa_->unbind_using_user_id (user_id) != 0) throw ::CORBA::OBJ_ADAPTER (); } diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyServantLocator.cpp b/TAO/tao/PortableServer/RequestProcessingStrategyServantLocator.cpp index 13ee337c87e..6f9d111df4a 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyServantLocator.cpp +++ b/TAO/tao/PortableServer/RequestProcessingStrategyServantLocator.cpp @@ -26,8 +26,7 @@ namespace TAO } void - RequestProcessingStrategyServantLocator::strategy_cleanup( - void) + RequestProcessingStrategyServantLocator::strategy_cleanup(void) { { Non_Servant_Upcall non_servant_upcall (*this->poa_); @@ -40,8 +39,7 @@ namespace TAO } PortableServer::ServantManager_ptr - RequestProcessingStrategyServantLocator::get_servant_manager ( - void) + RequestProcessingStrategyServantLocator::get_servant_manager (void) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -50,8 +48,7 @@ namespace TAO void RequestProcessingStrategyServantLocator::set_servant_manager ( - PortableServer::ServantManager_ptr imgr - ) + PortableServer::ServantManager_ptr imgr) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -66,8 +63,7 @@ namespace TAO CORBA::COMPLETED_NO); } - this->servant_locator_ = PortableServer::ServantLocator::_narrow (imgr - ); + this->servant_locator_ = PortableServer::ServantLocator::_narrow (imgr); this->validate_servant_manager (this->servant_locator_.in ()); } @@ -75,14 +71,11 @@ namespace TAO TAO_SERVANT_LOCATION RequestProcessingStrategyServantLocator::locate_servant ( const PortableServer::ObjectId &system_id, - PortableServer::Servant &servant - ) + PortableServer::Servant &servant) { TAO_SERVANT_LOCATION location = TAO_SERVANT_NOT_FOUND; - location = this->poa_->servant_present (system_id, - servant - ); + location = this->poa_->servant_present (system_id, servant); if (location == TAO_SERVANT_NOT_FOUND) { @@ -101,15 +94,11 @@ namespace TAO const PortableServer::ObjectId &system_id, TAO::Portable_Server::Servant_Upcall &servant_upcall, TAO::Portable_Server::POA_Current_Impl &poa_current_impl, - bool &/*wait_occurred_restart_call*/ - ) + bool &/*wait_occurred_restart_call*/) { - PortableServer::Servant servant = 0; - - servant = this->poa_->find_servant (system_id, - servant_upcall, - poa_current_impl - ); + PortableServer::Servant servant = this->poa_->find_servant (system_id, + servant_upcall, + poa_current_impl); if (servant != 0) { @@ -162,8 +151,7 @@ namespace TAO this->servant_locator_->preinvoke (poa_current_impl.object_id (), this->poa_, operation, - cookie - ); + cookie); if (servant == 0) { @@ -183,8 +171,7 @@ namespace TAO void RequestProcessingStrategyServantLocator::cleanup_servant ( PortableServer::Servant servant, - const PortableServer::ObjectId &user_id - ) + const PortableServer::ObjectId &user_id) { if (servant) { @@ -198,9 +185,7 @@ namespace TAO // This operation causes the association of the Object Id specified // by the oid parameter and its servant to be removed from the // Active Object Map. - int result = this->poa_->unbind_using_user_id (user_id); - - if (result != 0) + if (this->poa_->unbind_using_user_id (user_id) != 0) { throw ::CORBA::OBJ_ADAPTER (); } @@ -230,8 +215,7 @@ namespace TAO this->poa_, servant_upcall.operation (), servant_upcall.locator_cookie (), - servant_upcall.servant () - ); + servant_upcall.servant ()); } catch (const ::CORBA::Exception&) { diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyServantLocator.h b/TAO/tao/PortableServer/RequestProcessingStrategyServantLocator.h index d8421919159..05426727ba1 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyServantLocator.h +++ b/TAO/tao/PortableServer/RequestProcessingStrategyServantLocator.h @@ -40,21 +40,17 @@ namespace TAO virtual void strategy_cleanup(void); - PortableServer::ServantManager_ptr get_servant_manager ( - void) + PortableServer::ServantManager_ptr get_servant_manager (void) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)); - void set_servant_manager ( - PortableServer::ServantManager_ptr imgr - ) + void set_servant_manager (PortableServer::ServantManager_ptr imgr) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)); virtual TAO_SERVANT_LOCATION locate_servant ( const PortableServer::ObjectId &system_id, - PortableServer::Servant &servant - ); + PortableServer::Servant &servant); virtual void post_invoke_servant_cleanup( const PortableServer::ObjectId &system_id, @@ -65,13 +61,11 @@ namespace TAO const PortableServer::ObjectId &system_id, TAO::Portable_Server::Servant_Upcall &servant_upcall, TAO::Portable_Server::POA_Current_Impl &poa_current_impl, - bool &wait_occurred_restart_call - ); + bool &wait_occurred_restart_call); virtual void cleanup_servant ( PortableServer::Servant servant, - const PortableServer::ObjectId &user_id - ); + const PortableServer::ObjectId &user_id); virtual void etherealize_objects (CORBA::Boolean etherealize_objects); diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyServantLocatorFI.cpp b/TAO/tao/PortableServer/RequestProcessingStrategyServantLocatorFI.cpp index 8ba3bc27b77..01b51f34b47 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyServantLocatorFI.cpp +++ b/TAO/tao/PortableServer/RequestProcessingStrategyServantLocatorFI.cpp @@ -58,8 +58,7 @@ namespace TAO void RequestProcessingStrategyServantLocatorFactoryImpl::destroy ( - RequestProcessingStrategy *strategy - ) + RequestProcessingStrategy *strategy) { strategy->strategy_cleanup (); diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyServantLocatorFI.h b/TAO/tao/PortableServer/RequestProcessingStrategyServantLocatorFI.h index eb36b20eba1..de7bcb6d926 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyServantLocatorFI.h +++ b/TAO/tao/PortableServer/RequestProcessingStrategyServantLocatorFI.h @@ -40,9 +40,7 @@ namespace TAO ::PortableServer::RequestProcessingPolicyValue value, ::PortableServer::ServantRetentionPolicyValue srvalue); - virtual void destroy ( - RequestProcessingStrategy *strategy - ); + virtual void destroy (RequestProcessingStrategy *strategy); }; } } diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyServantManager.cpp b/TAO/tao/PortableServer/RequestProcessingStrategyServantManager.cpp index 9c84ebf7acc..71366a29c94 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyServantManager.cpp +++ b/TAO/tao/PortableServer/RequestProcessingStrategyServantManager.cpp @@ -24,8 +24,7 @@ namespace TAO } PortableServer::Servant - RequestProcessingStrategyServantManager::get_servant ( - void) + RequestProcessingStrategyServantManager::get_servant (void) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -34,8 +33,7 @@ namespace TAO void RequestProcessingStrategyServantManager::set_servant ( - PortableServer::Servant servant - ) + PortableServer::Servant servant) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)) { @@ -59,17 +57,14 @@ namespace TAO PortableServer::Servant RequestProcessingStrategyServantManager::system_id_to_servant ( - const PortableServer::ObjectId &system_id - ) + const PortableServer::ObjectId &system_id) { - return this->poa_->find_servant (system_id - ); + return this->poa_->find_servant (system_id); } PortableServer::ObjectId * RequestProcessingStrategyServantManager::servant_to_id ( - PortableServer::Servant servant - ) + PortableServer::Servant servant) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy)) @@ -79,8 +74,7 @@ namespace TAO PortableServer::Servant RequestProcessingStrategyServantManager::id_to_servant ( - const PortableServer::ObjectId &id - ) + const PortableServer::ObjectId &id) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy)) diff --git a/TAO/tao/PortableServer/RequestProcessingStrategyServantManager.h b/TAO/tao/PortableServer/RequestProcessingStrategyServantManager.h index be63e7652ae..d69ceed12ef 100644 --- a/TAO/tao/PortableServer/RequestProcessingStrategyServantManager.h +++ b/TAO/tao/PortableServer/RequestProcessingStrategyServantManager.h @@ -41,7 +41,7 @@ namespace TAO ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)); - void set_servant (PortableServer::Servant servant ) + void set_servant (PortableServer::Servant servant) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::WrongPolicy)); @@ -50,19 +50,16 @@ namespace TAO ); virtual PortableServer::Servant system_id_to_servant ( - const PortableServer::ObjectId &system_id - ); + const PortableServer::ObjectId &system_id); virtual PortableServer::Servant id_to_servant ( - const PortableServer::ObjectId &id - ) + const PortableServer::ObjectId &id) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::ObjectNotActive, PortableServer::POA::WrongPolicy)); virtual PortableServer::ObjectId *servant_to_id ( - PortableServer::Servant servant - ) + PortableServer::Servant servant) ACE_THROW_SPEC ((CORBA::SystemException, PortableServer::POA::ServantNotActive, PortableServer::POA::WrongPolicy)); diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyFactoryImpl.cpp b/TAO/tao/PortableServer/ServantRetentionStrategyFactoryImpl.cpp index f6d22016419..7cc94f9f523 100644 --- a/TAO/tao/PortableServer/ServantRetentionStrategyFactoryImpl.cpp +++ b/TAO/tao/PortableServer/ServantRetentionStrategyFactoryImpl.cpp @@ -49,8 +49,7 @@ namespace TAO void ServantRetentionStrategyFactoryImpl::destroy ( - ServantRetentionStrategy *strategy - ) + ServantRetentionStrategy *strategy) { const char *strategy_factory_name = 0; diff --git a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp index 645b75f1985..ad91b278b33 100644 --- a/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp +++ b/TAO/tao/PortableServer/ServantRetentionStrategyRetain.cpp @@ -77,7 +77,7 @@ namespace TAO { TAO_Active_Object_Map_Entry *active_object_map_entry = 0; - int result = this->active_object_map_-> + int const result = this->active_object_map_-> find_entry_using_user_id (id, active_object_map_entry); // If there is no active object associated with the specified Object @@ -204,8 +204,7 @@ namespace TAO PortableServer::Servant servant = 0; int const result = - this->active_object_map_->find_servant_using_user_id (id, - servant); + this->active_object_map_->find_servant_using_user_id (id, servant); if (result == -1) { @@ -372,8 +371,7 @@ namespace TAO { bool deactivated = false; int servant_in_map = - this->active_object_map_->is_servant_in_map (servant, - deactivated); + this->active_object_map_->is_servant_in_map (servant, deactivated); if (!servant_in_map) { @@ -505,8 +503,7 @@ namespace TAO i < counter; ++i) { - this->deactivate_map_entry (map_entries[i] - ); + this->deactivate_map_entry (map_entries[i]); } } @@ -773,8 +770,7 @@ namespace TAO // Inform the custom servant dispatching (CSD) strategy that the // sevant is activated. - this->poa_->servant_activated_hook (servant, - user_id.in ()); + this->poa_->servant_activated_hook (servant, user_id.in ()); // ATTENTION: Trick locking here, see class header for details Non_Servant_Upcall non_servant_upcall (*this->poa_); @@ -850,7 +846,7 @@ namespace TAO if (!priorities_match) { throw ( ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 1, - CORBA::COMPLETED_NO)); + CORBA::COMPLETED_NO)); } bool const may_activate = diff --git a/TAO/tao/PortableServer/Servant_Base.h b/TAO/tao/PortableServer/Servant_Base.h index 217a3ea006b..b8923c91fdc 100644 --- a/TAO/tao/PortableServer/Servant_Base.h +++ b/TAO/tao/PortableServer/Servant_Base.h @@ -67,33 +67,22 @@ public: virtual ~TAO_ServantBase (void); /// Returns the default POA for this servant. - virtual PortableServer::POA_ptr _default_POA ( - void - ); + virtual PortableServer::POA_ptr _default_POA (void); /// Local implementation of the CORBA::Object::_is_a method. - virtual CORBA::Boolean _is_a (const char *logical_type_id - ); + virtual CORBA::Boolean _is_a (const char *logical_type_id); /// Default _non_existent: always returns false. - virtual CORBA::Boolean _non_existent ( - void - ); + virtual CORBA::Boolean _non_existent (void); /// Query the Interface Repository for the interface definition. - virtual CORBA::InterfaceDef_ptr _get_interface ( - void - ); + virtual CORBA::InterfaceDef_ptr _get_interface (void); /// Default _get_component: always returns CORBA::Object::_nil(). - virtual CORBA::Object_ptr _get_component ( - void - ); + virtual CORBA::Object_ptr _get_component (void); /// Get the repository id. - virtual char * _repository_id ( - void - ); + virtual char * _repository_id (void); /// This is an auxiliary method for _this() and _narrow(). virtual TAO_Stub *_create_stub (void); @@ -105,9 +94,7 @@ public: * results and out parameters (if any) or the exceptions thrown into * @a request. */ - virtual void _dispatch (TAO_ServerRequest &request, - void *servant_upcall - ) = 0; + virtual void _dispatch (TAO_ServerRequest &request, void *servant_upcall) = 0; /// Please see documentation in tao/Abstract_Servant_Base.h for /// details. @@ -156,13 +143,11 @@ protected: virtual void synchronous_upcall_dispatch (TAO_ServerRequest & req, void * servant_upcall, - void * derived_this - ); + void * derived_this); virtual void asynchronous_upcall_dispatch (TAO_ServerRequest & req, void * servant_upcall, - void * derived_this - ); + void * derived_this); protected: /// Reference counter. diff --git a/TAO/tao/PortableServer/Servant_Dispatcher.h b/TAO/tao/PortableServer/Servant_Dispatcher.h index 82737fc268c..f2c2c0e319e 100644 --- a/TAO/tao/PortableServer/Servant_Dispatcher.h +++ b/TAO/tao/PortableServer/Servant_Dispatcher.h @@ -58,7 +58,6 @@ public: CORBA::Short servant_priority, TAO_ServerRequest &req, TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state - ) = 0; /// Pre_invoke collocated request. @@ -81,8 +80,7 @@ public: ACE_Lock &lock, TAO_SYNCH_MUTEX &thread_lock, TAO_ORB_Core &orb_core, - TAO_Object_Adapter *object_adapter - ) = 0; + TAO_Object_Adapter *object_adapter) = 0; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/PortableServer/Servant_Upcall.cpp b/TAO/tao/PortableServer/Servant_Upcall.cpp index f3d56fe9d55..03f0d48e9a3 100644 --- a/TAO/tao/PortableServer/Servant_Upcall.cpp +++ b/TAO/tao/PortableServer/Servant_Upcall.cpp @@ -52,8 +52,7 @@ namespace TAO Servant_Upcall::prepare_for_upcall ( const TAO::ObjectKey &key, const char *operation, - CORBA::Object_out forward_to - ) + CORBA::Object_out forward_to) { while (1) { @@ -63,8 +62,7 @@ namespace TAO this->prepare_for_upcall_i (key, operation, forward_to, - wait_occurred_restart_call - ); + wait_occurred_restart_call); if (result == TAO_Adapter::DS_FAILED && wait_occurred_restart_call) @@ -108,17 +106,13 @@ namespace TAO ); // Locate the POA. - this->object_adapter_->locate_poa (key, - this->system_id_, - this->poa_ - ); + this->object_adapter_->locate_poa (key, this->system_id_, this->poa_); // Check the state of the POA. this->poa_->check_state (); // Setup current for this request. - this->current_context_.setup (this->poa_, - key); + this->current_context_.setup (this->poa_, key); // Increase <poa->outstanding_requests_> for the duration of finding // the POA, finding the servant, and making the upcall. @@ -231,8 +225,7 @@ namespace TAO // Check if a non-servant upcall is in progress. If a non-servant // upcall is in progress, wait for it to complete. Unless of // course, the thread making the non-servant upcall is this thread. - this->object_adapter_->wait_for_non_servant_upcalls_to_complete ( - ); + this->object_adapter_->wait_for_non_servant_upcalls_to_complete (); // Locate the POA. this->object_adapter_->locate_poa (key, this->system_id_, this->poa_); @@ -337,10 +330,8 @@ namespace TAO Servant_Upcall::single_threaded_poa_cleanup (void) { #if (TAO_HAS_MINIMUM_POA == 0) - int result = 0; - // Since the servant lock was acquired, we must release it. - result = this->poa_->exit (); + int const result = this->poa_->exit (); ACE_UNUSED_ARG (result); #endif /* TAO_HAS_MINIMUM_POA == 0 */ @@ -361,7 +352,7 @@ namespace TAO if (this->active_object_map_entry_ != 0) { // Decrement the reference count. - CORBA::UShort new_count = + CORBA::UShort const new_count = --this->active_object_map_entry_->reference_count_; if (new_count == 0) @@ -415,7 +406,6 @@ namespace TAO // non-servant upcalls to be in progress at this point. if (this->poa_->waiting_destruction_) { - try { this->poa_->complete_destruction_i (); |