diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-15 15:23:19 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-15 15:23:19 +0000 |
commit | 7ba88e5bbcac6ce04e99eafadbb592d473956a13 (patch) | |
tree | 2243e0996c897506a11148f413b1832fae88d38f | |
parent | 1dfa898c7031e6950fb0b88ba22156d4028d93d4 (diff) | |
download | ATCD-7ba88e5bbcac6ce04e99eafadbb592d473956a13.tar.gz |
Thu Feb 15 15:22:14 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | TAO/ChangeLog | 13 | ||||
-rw-r--r-- | TAO/tao/RTCORBA/RT_ORB.h | 39 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_Acceptor_Filters.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp | 11 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_POA.cpp | 299 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_POA.inl | 33 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_Policy_Validator.cpp | 49 | ||||
-rw-r--r-- | TAO/tao/RTPortableServer/RT_Policy_Validator.h | 19 |
9 files changed, 148 insertions, 322 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index d3aeb88ce1e..14694b61690 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,16 @@ +Thu Feb 15 15:22:14 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/RTCORBA/RT_ORB.h: + * tao/RTPortableServer/RT_Acceptor_Filters.cpp: + * tao/RTPortableServer/RT_Collocation_Resolver.cpp: + * tao/RTPortableServer/RT_Object_Adapter_Factory.cpp: + * tao/RTPortableServer/RT_POA.cpp: + * tao/RTPortableServer/RT_POA.inl: + * tao/RTPortableServer/RT_Policy_Validator.cpp: + * tao/RTPortableServer/RT_Policy_Validator.h: + Code layout changes and cleanup now we zapped the emulated exception + macros + Thu Feb 15 13:23:14 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> * tao/Base_Transport_Property.h: diff --git a/TAO/tao/RTCORBA/RT_ORB.h b/TAO/tao/RTCORBA/RT_ORB.h index f485e2fb64a..03c51d802dd 100644 --- a/TAO/tao/RTCORBA/RT_ORB.h +++ b/TAO/tao/RTCORBA/RT_ORB.h @@ -133,8 +133,7 @@ public: * parameters. */ RTCORBA::TCPProtocolProperties_ptr - create_tcp_protocol_properties ( - CORBA::Long send_buffer_size, + create_tcp_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, @@ -142,36 +141,29 @@ public: CORBA::Boolean enable_network_priority); RTCORBA::UnixDomainProtocolProperties_ptr - create_unix_domain_protocol_properties ( - CORBA::Long send_buffer_size, - CORBA::Long recv_buffer_size ); + create_unix_domain_protocol_properties (CORBA::Long send_buffer_size, + CORBA::Long recv_buffer_size); RTCORBA::SharedMemoryProtocolProperties_ptr - create_shared_memory_protocol_properties ( - CORBA::Long send_buffer_size, + create_shared_memory_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, CORBA::Boolean no_delay, CORBA::Long preallocate_buffer_size, const char *mmap_filename, - const char *mmap_lockname - ); + const char *mmap_lockname); RTCORBA::UserDatagramProtocolProperties_ptr - create_user_datagram_protocol_properties ( - CORBA::Boolean enable_network_priority - ); + create_user_datagram_protocol_properties (CORBA::Boolean enable_network_priority); RTCORBA::StreamControlProtocolProperties_ptr - create_stream_control_protocol_properties ( - CORBA::Long send_buffer_size, + create_stream_control_protocol_properties (CORBA::Long send_buffer_size, CORBA::Long recv_buffer_size, CORBA::Boolean keep_alive, CORBA::Boolean dont_route, CORBA::Boolean no_delay, - CORBA::Boolean enable_network_priority - ); + CORBA::Boolean enable_network_priority); /// Create a RTCORBA threadpool to manage a set of threads without lanes. virtual RTCORBA::ThreadpoolId @@ -181,8 +173,7 @@ public: RTCORBA::Priority default_priority, CORBA::Boolean allow_request_buffering, CORBA::ULong max_buffered_requests, - CORBA::ULong max_request_buffer_size - ); + CORBA::ULong max_request_buffer_size); /** * Create a threadpool and separate it into subsets based on @@ -194,19 +185,15 @@ public: CORBA::Boolean allow_borrowing, CORBA::Boolean allow_request_buffering, CORBA::ULong max_buffered_requests, - CORBA::ULong max_request_buffer_size - ); + CORBA::ULong max_request_buffer_size); /// Free the resources associated with the specified threadpool. - virtual void destroy_threadpool (RTCORBA::ThreadpoolId threadpool - ); + virtual void destroy_threadpool (RTCORBA::ThreadpoolId threadpool); /// Create a priority model policy for use when configuring a POA. virtual RTCORBA::PriorityModelPolicy_ptr - create_priority_model_policy ( - RTCORBA::PriorityModel priority_model, - RTCORBA::Priority server_priority - ); + create_priority_model_policy (RTCORBA::PriorityModel priority_model, + RTCORBA::Priority server_priority); /// Create a ThreadpoolPolicy instance for POA creation virtual RTCORBA::ThreadpoolPolicy_ptr diff --git a/TAO/tao/RTPortableServer/RT_Acceptor_Filters.cpp b/TAO/tao/RTPortableServer/RT_Acceptor_Filters.cpp index 53444f8e1b4..aaa8a9ea4ee 100644 --- a/TAO/tao/RTPortableServer/RT_Acceptor_Filters.cpp +++ b/TAO/tao/RTPortableServer/RT_Acceptor_Filters.cpp @@ -52,9 +52,7 @@ int TAO_Server_Protocol_Acceptor_Filter::encode_endpoints (TAO_MProfile &mprofile) { // Encode endpoints. - for (CORBA::ULong i = 0; - i < mprofile.profile_count (); - ++i) + for (CORBA::ULong i = 0; i < mprofile.profile_count (); ++i) { TAO_Profile *profile = mprofile.get_profile (i); if (profile->encode_endpoints () == -1) diff --git a/TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp b/TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp index e49aaefad0c..f11b3cd3c52 100644 --- a/TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp +++ b/TAO/tao/RTPortableServer/RT_Collocation_Resolver.cpp @@ -28,15 +28,13 @@ TAO_RT_Collocation_Resolver::is_collocated (CORBA::Object_ptr object) const return false; // Get the orb core. - TAO_ORB_Core *orb_core = - object->_stubobj ()->servant_orb_var ()->orb_core (); + TAO_ORB_Core *orb_core = object->_stubobj ()->servant_orb_var ()->orb_core (); // Lookup the target POA. Note that Object Adapter lock is held // until <servant_upcall> dies. TAO::Portable_Server::Servant_Upcall servant_upcall (orb_core); TAO_Root_POA *poa = - servant_upcall.lookup_POA (object->_stubobj ()->object_key () - ); + servant_upcall.lookup_POA (object->_stubobj ()->object_key ()); // Get the thread pool associated with this POA. TAO_Thread_Pool *target_thread_pool = @@ -95,11 +93,10 @@ TAO_RT_Collocation_Resolver::is_collocated (CORBA::Object_ptr object) const CORBA::Short target_priority; if (-1 == poa->find_servant_priority (servant_upcall.system_id_, - target_priority - )) + target_priority)) { return false; - }; + } // If it matches the current thread's priority, then we are // collocated. Otherwise we are not. diff --git a/TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.cpp b/TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.cpp index 4dc295d06aa..06f592d5cc9 100644 --- a/TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.cpp +++ b/TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.cpp @@ -23,8 +23,7 @@ TAO_RT_Object_Adapter_Factory::create (TAO_ORB_Core *orb_core) if (!orb_core->orb_params ()->disable_rt_collocation_resolver ()) { // Set the name of the collocation resolver to be RT_Collocation_Resolver. - TAO_ORB_Core::set_collocation_resolver ( - "RT_Collocation_Resolver"); + TAO_ORB_Core::set_collocation_resolver ("RT_Collocation_Resolver"); ACE_Service_Config::process_directive ( ace_svc_desc_TAO_RT_Collocation_Resolver); } diff --git a/TAO/tao/RTPortableServer/RT_POA.cpp b/TAO/tao/RTPortableServer/RT_POA.cpp index 0145c706d44..1a79cf2b377 100644 --- a/TAO/tao/RTPortableServer/RT_POA.cpp +++ b/TAO/tao/RTPortableServer/RT_POA.cpp @@ -52,14 +52,11 @@ TAO_RT_POA::TAO_RT_POA (const TAO_Root_POA::String &name, lock, thread_lock, orb_core, - object_adapter - ), + object_adapter), thread_pool_ (0) { - // Parse the RT policies and update our policy cache. - this->parse_rt_policies (this->policies () - ); + this->parse_rt_policies (this->policies ()); } TAO_RT_POA::~TAO_RT_POA (void) @@ -74,8 +71,7 @@ TAO_RT_POA::new_POA (const String &name, ACE_Lock &lock, TAO_SYNCH_MUTEX &thread_lock, TAO_ORB_Core &orb_core, - TAO_Object_Adapter *object_adapter - ) + TAO_Object_Adapter *object_adapter) { TAO_RT_POA *poa = 0; @@ -99,12 +95,10 @@ TAO_RT_POA::parse_rt_policies (TAO_POA_Policy_Set &policies) { { CORBA::Policy_var policy = - policies.get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL - ); + policies.get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL); RTCORBA::PriorityModelPolicy_var priority_model = - RTCORBA::PriorityModelPolicy::_narrow (policy.in () - ); + RTCORBA::PriorityModelPolicy::_narrow (policy.in ()); if (!CORBA::is_nil (priority_model.in ())) { @@ -123,13 +117,11 @@ TAO_RT_POA::parse_rt_policies (TAO_POA_Policy_Set &policies) this->thread_pool_ = TAO_POA_RT_Policy_Validator::extract_thread_pool (this->orb_core_, - policies.policies () - ); + policies.policies ()); } void -TAO_RT_POA::validate_priority (RTCORBA::Priority priority - ) +TAO_RT_POA::validate_priority (RTCORBA::Priority priority) { if (priority < RTCORBA::minPriority // The line below will always be false unless the value of @@ -146,11 +138,9 @@ TAO_RT_POA::validate_priority (RTCORBA::Priority priority // case, bands do not matter since matching the lanes priority is a // stricter condition than meeting the band ranges. In addition, // when the POA was created, the bands had to match the lanes. - if (this->thread_pool_ != 0 && - this->thread_pool_->with_lanes ()) + if (this->thread_pool_ != 0 && this->thread_pool_->with_lanes ()) { - TAO_Thread_Lane **lanes = - this->thread_pool_->lanes (); + TAO_Thread_Lane **lanes = this->thread_pool_->lanes (); for (CORBA::ULong i = 0; i != this->thread_pool_->number_of_lanes (); @@ -168,12 +158,10 @@ TAO_RT_POA::validate_priority (RTCORBA::Priority priority // Check if we have bands. CORBA::Policy_var bands = this->policies ().get_cached_policy ( - TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION - ); + TAO_CACHED_POLICY_RT_PRIORITY_BANDED_CONNECTION); RTCORBA::PriorityBandedConnectionPolicy_var priority_bands - = RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands.in () - ); + = RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands.in ()); TAO_PriorityBandedConnectionPolicy *priority_bands_i = dynamic_cast <TAO_PriorityBandedConnectionPolicy *> @@ -233,22 +221,18 @@ TAO_RT_POA::validate_policies (void) TAO_Stub * TAO_RT_POA::key_to_stub_i (const TAO::ObjectKey &object_key, const char *type_id, - CORBA::Short priority - ) + CORBA::Short priority) { // Client exposed policies. CORBA::PolicyList_var client_exposed_policies = - this->client_exposed_policies (priority - ); + this->client_exposed_policies (priority); // Server protocol policy. CORBA::Policy_var protocol = - this->policies ().get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL - ); + this->policies ().get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL); RTCORBA::ServerProtocolPolicy_var server_protocol_policy = - RTCORBA::ServerProtocolPolicy::_narrow (protocol.in () - ); + RTCORBA::ServerProtocolPolicy::_narrow (protocol.in ()); TAO_ServerProtocolPolicy *server_protocol = dynamic_cast <TAO_ServerProtocolPolicy *> (server_protocol_policy.in ()); @@ -272,19 +256,15 @@ TAO_RT_POA::key_to_stub_i (const TAO::ObjectKey &object_key, TAO_Thread_Lane_Resources &resources = thread_lane_resources_manager.default_lane_resources (); - acceptor_registry = - &resources.acceptor_registry (); + acceptor_registry = &resources.acceptor_registry (); } else { - TAO_Thread_Lane **lanes = - this->thread_pool_->lanes (); + TAO_Thread_Lane **lanes = this->thread_pool_->lanes (); - TAO_Thread_Lane_Resources &resources = - lanes[0]->resources (); + TAO_Thread_Lane_Resources &resources = lanes[0]->resources (); - acceptor_registry = - &resources.acceptor_registry (); + acceptor_registry = &resources.acceptor_registry (); } return @@ -292,8 +272,7 @@ TAO_RT_POA::key_to_stub_i (const TAO::ObjectKey &object_key, type_id, client_exposed_policies._retn (), &filter, - *acceptor_registry - ); + *acceptor_registry); } // If this POA has the SERVER_DECLARED policy, create the IOR with @@ -330,8 +309,7 @@ TAO_RT_POA::key_to_stub_i (const TAO::ObjectKey &object_key, ); RTCORBA::PriorityBandedConnectionPolicy_var priority_bands - = RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands.in () - ); + = RTCORBA::PriorityBandedConnectionPolicy::_narrow (bands.in ()); TAO_PriorityBandedConnectionPolicy *priority_bands_i = dynamic_cast <TAO_PriorityBandedConnectionPolicy *> (priority_bands.in ()); @@ -340,8 +318,7 @@ TAO_RT_POA::key_to_stub_i (const TAO::ObjectKey &object_key, type_id, client_exposed_policies._retn (), &filter, - priority_bands_i - ); + priority_bands_i); } TAO_Stub * @@ -349,8 +326,7 @@ TAO_RT_POA::create_stub_object (const TAO::ObjectKey &object_key, const char *type_id, CORBA::PolicyList *policy_list, TAO_Acceptor_Filter *filter, - TAO_PriorityBandedConnectionPolicy *priority_bands - ) + TAO_PriorityBandedConnectionPolicy *priority_bands) { int error = 0; @@ -420,10 +396,7 @@ TAO_RT_POA::create_stub_object (const TAO::ObjectKey &object_key, CORBA::COMPLETED_NO); return - this->orb_core_.create_stub_object (mprofile, - type_id, - policy_list - ); + this->orb_core_.create_stub_object (mprofile, type_id, policy_list); } size_t @@ -466,8 +439,7 @@ TAO_RT_POA::lane_required (TAO_Thread_Lane *lane, } CORBA::PolicyList * -TAO_RT_POA::client_exposed_policies (CORBA::Short object_priority - ) +TAO_RT_POA::client_exposed_policies (CORBA::Short object_priority) { CORBA::PolicyList *client_exposed_policies = 0; ACE_NEW_THROW_EX (client_exposed_policies, @@ -478,8 +450,7 @@ TAO_RT_POA::client_exposed_policies (CORBA::Short object_priority CORBA::PolicyList_var safe_client_exposed_policies = client_exposed_policies; // Add in all of the client exposed policies. - this->policies_.add_client_exposed_fixed_policies (client_exposed_policies - ); + this->policies_.add_client_exposed_fixed_policies (client_exposed_policies); // Check if the priority model policy has been set, and if so, let // the client know about it. @@ -523,120 +494,81 @@ TAO_RT_POA::client_exposed_policies (CORBA::Short object_priority PortableServer::POA_ptr TAO_RT_POA::create_POA (const char *adapter_name, PortableServer::POAManager_ptr poa_manager, - const CORBA::PolicyList &policies - ) + const CORBA::PolicyList &policies) { - PortableServer::POA_ptr poa = this->TAO_Regular_POA::create_POA (adapter_name, - poa_manager, - policies - ); - return poa; + return this->TAO_Regular_POA::create_POA (adapter_name, poa_manager, policies); } PortableServer::POA_ptr -TAO_RT_POA::find_POA (const char *adapter_name, - CORBA::Boolean activate_it - ) +TAO_RT_POA::find_POA (const char *adapter_name, CORBA::Boolean activate_it) { - PortableServer::POA_ptr poa = this->TAO_Regular_POA::find_POA (adapter_name, - activate_it - ); - return poa; + return this->TAO_Regular_POA::find_POA (adapter_name, activate_it); } void TAO_RT_POA::destroy (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion - ) + CORBA::Boolean wait_for_completion) { - this->TAO_Regular_POA::destroy (etherealize_objects, - wait_for_completion - ); + this->TAO_Regular_POA::destroy (etherealize_objects, wait_for_completion); } #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) PortableServer::ThreadPolicy_ptr -TAO_RT_POA::create_thread_policy (PortableServer::ThreadPolicyValue value - ) +TAO_RT_POA::create_thread_policy (PortableServer::ThreadPolicyValue value) { - PortableServer::ThreadPolicy_ptr policy = - this->TAO_Regular_POA::create_thread_policy (value - ); - return policy; + return this->TAO_Regular_POA::create_thread_policy (value); } #endif /* TAO_HAS_MINIMUM_POA == 0 */ #if !defined (CORBA_E_MICRO) PortableServer::LifespanPolicy_ptr -TAO_RT_POA::create_lifespan_policy (PortableServer::LifespanPolicyValue value - ) +TAO_RT_POA::create_lifespan_policy (PortableServer::LifespanPolicyValue value) { - PortableServer::LifespanPolicy_ptr policy = - this->TAO_Regular_POA::create_lifespan_policy (value - ); - return policy; + return this->TAO_Regular_POA::create_lifespan_policy (value); } #endif #if !defined (CORBA_E_MICRO) PortableServer::IdUniquenessPolicy_ptr -TAO_RT_POA::create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value - ) +TAO_RT_POA::create_id_uniqueness_policy (PortableServer::IdUniquenessPolicyValue value) { - PortableServer::IdUniquenessPolicy_ptr policy = - this->TAO_Regular_POA::create_id_uniqueness_policy (value - ); - return policy; + return this->TAO_Regular_POA::create_id_uniqueness_policy (value); } #endif #if !defined (CORBA_E_MICRO) PortableServer::IdAssignmentPolicy_ptr -TAO_RT_POA::create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value - ) +TAO_RT_POA::create_id_assignment_policy (PortableServer::IdAssignmentPolicyValue value) { - PortableServer::IdAssignmentPolicy_ptr policy = - this->TAO_Regular_POA::create_id_assignment_policy (value - ); - return policy; + return this->TAO_Regular_POA::create_id_assignment_policy (value); } #endif - #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) PortableServer::ImplicitActivationPolicy_ptr -TAO_RT_POA::create_implicit_activation_policy (PortableServer::ImplicitActivationPolicyValue value - ) +TAO_RT_POA::create_implicit_activation_policy ( + PortableServer::ImplicitActivationPolicyValue value) { - PortableServer::ImplicitActivationPolicy_ptr policy = - this->TAO_Regular_POA::create_implicit_activation_policy (value - ); - return policy; + return this->TAO_Regular_POA::create_implicit_activation_policy (value); } PortableServer::ServantRetentionPolicy_ptr -TAO_RT_POA::create_servant_retention_policy (PortableServer::ServantRetentionPolicyValue value - ) +TAO_RT_POA::create_servant_retention_policy ( + PortableServer::ServantRetentionPolicyValue value) { - PortableServer::ServantRetentionPolicy_ptr policy = - this->TAO_Regular_POA::create_servant_retention_policy (value - ); - return policy; + return this->TAO_Regular_POA::create_servant_retention_policy (value); } PortableServer::RequestProcessingPolicy_ptr -TAO_RT_POA::create_request_processing_policy (PortableServer::RequestProcessingPolicyValue value - ) +TAO_RT_POA::create_request_processing_policy ( + PortableServer::RequestProcessingPolicyValue value) { - PortableServer::RequestProcessingPolicy_ptr policy = - this->TAO_Regular_POA::create_request_processing_policy (value - ); - return policy; + return this->TAO_Regular_POA::create_request_processing_policy (value); } #endif /* TAO_HAS_MINIMUM_POA == 0 && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) */ @@ -644,33 +576,25 @@ TAO_RT_POA::create_request_processing_policy (PortableServer::RequestProcessingP char * TAO_RT_POA::the_name (void) { - char * name = - this->TAO_Regular_POA::the_name (); - return name; + return this->TAO_Regular_POA::the_name (); } PortableServer::POA_ptr TAO_RT_POA::the_parent (void) { - PortableServer::POA_ptr parent = - this->TAO_Regular_POA::the_parent (); - return parent; + return this->TAO_Regular_POA::the_parent (); } PortableServer::POAList * TAO_RT_POA::the_children (void) { - PortableServer::POAList *children = - this->TAO_Regular_POA::the_children (); - return children; + return this->TAO_Regular_POA::the_children (); } PortableServer::POAManager_ptr TAO_RT_POA::the_POAManager (void) { - PortableServer::POAManager_ptr poa_manager = - this->TAO_Regular_POA::the_POAManager (); - return poa_manager; + return this->TAO_Regular_POA::the_POAManager (); } @@ -679,164 +603,109 @@ TAO_RT_POA::the_POAManager (void) PortableServer::AdapterActivator_ptr TAO_RT_POA::the_activator (void) { - PortableServer::AdapterActivator_ptr activator = - this->TAO_Regular_POA::the_activator (); - return activator; + return this->TAO_Regular_POA::the_activator ();; } void -TAO_RT_POA::the_activator (PortableServer::AdapterActivator_ptr adapter_activator - ) +TAO_RT_POA::the_activator (PortableServer::AdapterActivator_ptr adapter_activator) { - this->TAO_Regular_POA::the_activator (adapter_activator - ); + this->TAO_Regular_POA::the_activator (adapter_activator); } PortableServer::ServantManager_ptr TAO_RT_POA::get_servant_manager (void) { - PortableServer::ServantManager_ptr servant_manager = - this->TAO_Regular_POA::get_servant_manager (); - return servant_manager; + return this->TAO_Regular_POA::get_servant_manager (); } void -TAO_RT_POA::set_servant_manager (PortableServer::ServantManager_ptr imgr - ) +TAO_RT_POA::set_servant_manager (PortableServer::ServantManager_ptr imgr) { - this->TAO_Regular_POA::set_servant_manager (imgr - ); + this->TAO_Regular_POA::set_servant_manager (imgr); } PortableServer::Servant TAO_RT_POA::get_servant (void) { - PortableServer::Servant servant = - this->TAO_Regular_POA::get_servant (); - return servant; + return this->TAO_Regular_POA::get_servant (); } void -TAO_RT_POA::set_servant (PortableServer::Servant servant - ) +TAO_RT_POA::set_servant (PortableServer::Servant servant) { - this->TAO_Regular_POA::set_servant (servant - ); + this->TAO_Regular_POA::set_servant (servant); } #endif /* TAO_HAS_MINIMUM_POA == 0 */ PortableServer::ObjectId * -TAO_RT_POA::activate_object (PortableServer::Servant p_servant - ) +TAO_RT_POA::activate_object (PortableServer::Servant p_servant) { - PortableServer::ObjectId *object_id = - this->TAO_Regular_POA::activate_object (p_servant - ); - return object_id; + return this->TAO_Regular_POA::activate_object (p_servant); } #if !defined (CORBA_E_MICRO) void TAO_RT_POA::activate_object_with_id (const PortableServer::ObjectId &id, - PortableServer::Servant p_servant - ) + PortableServer::Servant p_servant) { - this->TAO_Regular_POA::activate_object_with_id (id, - p_servant - ); + this->TAO_Regular_POA::activate_object_with_id (id, p_servant); } #endif void -TAO_RT_POA::deactivate_object (const PortableServer::ObjectId &oid - ) +TAO_RT_POA::deactivate_object (const PortableServer::ObjectId &oid) { - this->TAO_Regular_POA::deactivate_object (oid - ); + this->TAO_Regular_POA::deactivate_object (oid); } CORBA::Object_ptr -TAO_RT_POA::create_reference (const char *intf - ) +TAO_RT_POA::create_reference (const char *intf) { - CORBA::Object_ptr obj = - this->TAO_Regular_POA::create_reference (intf - ); - return obj; + return this->TAO_Regular_POA::create_reference (intf); } CORBA::Object_ptr TAO_RT_POA::create_reference_with_id (const PortableServer::ObjectId &oid, - const char *intf - ) + const char *intf) { - CORBA::Object_ptr obj = - this->TAO_Regular_POA::create_reference_with_id (oid, - intf - ); - return obj; + return this->TAO_Regular_POA::create_reference_with_id (oid, intf); } PortableServer::ObjectId * -TAO_RT_POA::servant_to_id (PortableServer::Servant p_servant - ) +TAO_RT_POA::servant_to_id (PortableServer::Servant p_servant) { - PortableServer::ObjectId *object_id = - this->TAO_Regular_POA::servant_to_id (p_servant - ); - return object_id; + return this->TAO_Regular_POA::servant_to_id (p_servant); } CORBA::Object_ptr -TAO_RT_POA::servant_to_reference (PortableServer::Servant p_servant - ) +TAO_RT_POA::servant_to_reference (PortableServer::Servant p_servant) { - CORBA::Object_ptr obj = - this->TAO_Regular_POA::servant_to_reference (p_servant - ); - return obj; + return this->TAO_Regular_POA::servant_to_reference (p_servant); } - PortableServer::Servant -TAO_RT_POA::reference_to_servant (CORBA::Object_ptr reference - ) +TAO_RT_POA::reference_to_servant (CORBA::Object_ptr reference) { - PortableServer::Servant servant = - this->TAO_Regular_POA::reference_to_servant (reference - ); - return servant; + return this->TAO_Regular_POA::reference_to_servant (reference); } PortableServer::ObjectId * -TAO_RT_POA::reference_to_id (CORBA::Object_ptr reference - ) +TAO_RT_POA::reference_to_id (CORBA::Object_ptr reference) { - PortableServer::ObjectId *object_id = - this->TAO_Regular_POA::reference_to_id (reference - ); - return object_id; + return this->TAO_Regular_POA::reference_to_id (reference); } PortableServer::Servant -TAO_RT_POA::id_to_servant (const PortableServer::ObjectId &oid - ) +TAO_RT_POA::id_to_servant (const PortableServer::ObjectId &oid) { - PortableServer::Servant servant = - this->TAO_Regular_POA::id_to_servant (oid - ); - return servant; + return this->TAO_Regular_POA::id_to_servant (oid); } CORBA::Object_ptr -TAO_RT_POA::id_to_reference (const PortableServer::ObjectId &oid - ) +TAO_RT_POA::id_to_reference (const PortableServer::ObjectId &oid) { - CORBA::Object_ptr obj = - this->TAO_Regular_POA::id_to_reference (oid - ); - return obj; + return this->TAO_Regular_POA::id_to_reference (oid); } CORBA::OctetSeq * diff --git a/TAO/tao/RTPortableServer/RT_POA.inl b/TAO/tao/RTPortableServer/RT_POA.inl index 6ae1dc2512a..4b771dd5661 100644 --- a/TAO/tao/RTPortableServer/RT_POA.inl +++ b/TAO/tao/RTPortableServer/RT_POA.inl @@ -10,8 +10,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE CORBA::Object_ptr TAO_RT_POA::create_reference_with_priority (const char * intf, - RTCORBA::Priority priority - ) + RTCORBA::Priority priority) { // Check that this method can be used based on this POA's policies. this->validate_policies (); @@ -21,16 +20,13 @@ TAO_RT_POA::create_reference_with_priority (const char * intf, // Lock access for the duration of this transaction. TAO_POA_GUARD_RETURN (0); - return this->create_reference_i (intf, - priority - ); + return this->create_reference_i (intf, priority); } ACE_INLINE CORBA::Object_ptr TAO_RT_POA::create_reference_with_id_and_priority (const PortableServer::ObjectId & oid, const char * intf, - RTCORBA::Priority priority - ) + RTCORBA::Priority priority) { // Check that this method can be used based on this POA's policies. this->validate_policies (); @@ -40,23 +36,19 @@ TAO_RT_POA::create_reference_with_id_and_priority (const PortableServer::ObjectI // Lock access for the duration of this transaction. TAO_POA_GUARD_RETURN (0); - return this->create_reference_with_id_i (oid, - intf, - priority - ); + return this->create_reference_with_id_i (oid, intf, priority); } ACE_INLINE PortableServer::ObjectId * TAO_RT_POA::activate_object_with_priority (PortableServer::Servant servant, - RTCORBA::Priority priority - ) + RTCORBA::Priority priority) { // Check that this method can be used based on this POA's policies. this->validate_policies (); this->validate_priority (priority); - while (1) + while (true) { bool wait_occurred_restart_call = false; @@ -64,10 +56,7 @@ TAO_RT_POA::activate_object_with_priority (PortableServer::Servant servant, TAO_POA_GUARD_RETURN (0); PortableServer::ObjectId *result = - this->activate_object_i (servant, - priority, - wait_occurred_restart_call - ); + this->activate_object_i (servant, priority, wait_occurred_restart_call); // If we ended up waiting on a condition variable, the POA state // may have changed while we are waiting. Therefore, we need to @@ -82,15 +71,14 @@ TAO_RT_POA::activate_object_with_priority (PortableServer::Servant servant, ACE_INLINE void TAO_RT_POA::activate_object_with_id_and_priority (const PortableServer::ObjectId & oid, PortableServer::Servant servant, - RTCORBA::Priority priority - ) + RTCORBA::Priority priority) { // Check that this method can be used based on this POA's policies. this->validate_policies (); this->validate_priority (priority); - while (1) + while (true) { bool wait_occurred_restart_call = false; @@ -100,8 +88,7 @@ TAO_RT_POA::activate_object_with_id_and_priority (const PortableServer::ObjectId this->activate_object_with_id_i (oid, servant, priority, - wait_occurred_restart_call - ); + wait_occurred_restart_call); // If we ended up waiting on a condition variable, the POA state // may have changed while we are waiting. Therefore, we need to diff --git a/TAO/tao/RTPortableServer/RT_Policy_Validator.cpp b/TAO/tao/RTPortableServer/RT_Policy_Validator.cpp index 96c16d2ce44..0925a40adbd 100644 --- a/TAO/tao/RTPortableServer/RT_Policy_Validator.cpp +++ b/TAO/tao/RTPortableServer/RT_Policy_Validator.cpp @@ -79,8 +79,7 @@ TAO_POA_RT_Policy_Validator::validate_server_protocol (TAO_Policy_Set &policies) } RTCORBA::ServerProtocolPolicy_var server_protocol_policy = - RTCORBA::ServerProtocolPolicy::_narrow (protocol.in () - ); + RTCORBA::ServerProtocolPolicy::_narrow (protocol.in ()); TAO_ServerProtocolPolicy *server_protocol = dynamic_cast <TAO_ServerProtocolPolicy *> @@ -150,8 +149,7 @@ TAO_POA_RT_Policy_Validator::validate_server_protocol (TAO_Policy_Set &policies) } void -TAO_POA_RT_Policy_Validator::validate_priorities (TAO_Policy_Set &policies - ) +TAO_POA_RT_Policy_Validator::validate_priorities (TAO_Policy_Set &policies) { // Initialize to the default priority/priority model. CORBA::Short priority = @@ -164,8 +162,7 @@ TAO_POA_RT_Policy_Validator::validate_priorities (TAO_Policy_Set &policies ); RTCORBA::PriorityModelPolicy_var priority_model = - RTCORBA::PriorityModelPolicy::_narrow (policy.in () - ); + RTCORBA::PriorityModelPolicy::_narrow (policy.in ()); if (!CORBA::is_nil (priority_model.in ())) { @@ -358,8 +355,7 @@ TAO_POA_RT_Policy_Validator::validate_thread_pool (TAO_Policy_Set &policies } void -TAO_POA_RT_Policy_Validator::merge_policies_impl (TAO_Policy_Set &policies - ) +TAO_POA_RT_Policy_Validator::merge_policies_impl (TAO_Policy_Set &policies) { // Check if the user has specified the priority model policy. CORBA::Policy_var priority_model = @@ -371,8 +367,7 @@ TAO_POA_RT_Policy_Validator::merge_policies_impl (TAO_Policy_Set &policies // If not, check if the priority model policy has been specified // at the ORB level. priority_model = - this->orb_core_.get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL - ); + this->orb_core_.get_cached_policy (TAO_CACHED_POLICY_PRIORITY_MODEL); if (!CORBA::is_nil (priority_model.in ())) { @@ -383,8 +378,7 @@ TAO_POA_RT_Policy_Validator::merge_policies_impl (TAO_Policy_Set &policies // Check if the user has specified the server protocol policy. CORBA::Policy_var server_protocol = - policies.get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL - ); + policies.get_cached_policy (TAO_CACHED_POLICY_RT_SERVER_PROTOCOL); if (CORBA::is_nil (server_protocol.in ())) { @@ -404,8 +398,7 @@ TAO_POA_RT_Policy_Validator::merge_policies_impl (TAO_Policy_Set &policies // Check if the user has specified the thread pool policy. CORBA::Policy_var thread_pool = - policies.get_cached_policy (TAO_CACHED_POLICY_THREADPOOL - ); + policies.get_cached_policy (TAO_CACHED_POLICY_THREADPOOL); if (CORBA::is_nil (thread_pool.in ())) { @@ -526,39 +519,29 @@ TAO_POA_RT_Policy_Validator::server_protocol_policy_from_acceptor_registry (RTCO /* static */ TAO_Thread_Pool * TAO_POA_RT_Policy_Validator::extract_thread_pool (TAO_ORB_Core &orb_core, - TAO_Policy_Set &policies - ) + TAO_Policy_Set &policies) { CORBA::Policy_var policy = - policies.get_cached_policy (TAO_CACHED_POLICY_THREADPOOL - ); + policies.get_cached_policy (TAO_CACHED_POLICY_THREADPOOL); RTCORBA::ThreadpoolPolicy_var thread_pool_policy = - RTCORBA::ThreadpoolPolicy::_narrow (policy.in () - ); + RTCORBA::ThreadpoolPolicy::_narrow (policy.in ()); if (CORBA::is_nil (thread_pool_policy.in ())) return 0; - RTCORBA::ThreadpoolId thread_pool_id = - thread_pool_policy->threadpool (); + RTCORBA::ThreadpoolId thread_pool_id = thread_pool_policy->threadpool (); // Get the RTORB. - CORBA::Object_var object = - orb_core.resolve_rt_orb (); + CORBA::Object_var object = orb_core.resolve_rt_orb (); - RTCORBA::RTORB_var rt_orb = - RTCORBA::RTORB::_narrow (object.in () - ); + RTCORBA::RTORB_var rt_orb = RTCORBA::RTORB::_narrow (object.in ()); - TAO_RT_ORB *tao_rt_orb = - dynamic_cast <TAO_RT_ORB *> (rt_orb.in ()); + TAO_RT_ORB *tao_rt_orb = dynamic_cast <TAO_RT_ORB *> (rt_orb.in ()); - TAO_Thread_Pool_Manager &tp_manager = - tao_rt_orb->tp_manager (); + TAO_Thread_Pool_Manager &tp_manager = tao_rt_orb->tp_manager (); - TAO_Thread_Pool *thread_pool = - tp_manager.get_threadpool (thread_pool_id); + TAO_Thread_Pool *thread_pool = tp_manager.get_threadpool (thread_pool_id); if (thread_pool == 0) throw PortableServer::POA::InvalidPolicy (); diff --git a/TAO/tao/RTPortableServer/RT_Policy_Validator.h b/TAO/tao/RTPortableServer/RT_Policy_Validator.h index 4dd3bfd3460..baecf424454 100644 --- a/TAO/tao/RTPortableServer/RT_Policy_Validator.h +++ b/TAO/tao/RTPortableServer/RT_Policy_Validator.h @@ -54,8 +54,7 @@ public: TAO_ORB_Core &orb_core); static TAO_Thread_Pool *extract_thread_pool (TAO_ORB_Core &orb_core, - TAO_Policy_Set &policies - ); + TAO_Policy_Set &policies); protected: @@ -64,12 +63,10 @@ protected: * are consistent and legal. Throw an appropriate exception * if that is not the case. */ - void validate_impl (TAO_Policy_Set &policies - ); + void validate_impl (TAO_Policy_Set &policies); /// Add/merge policies. - void merge_policies_impl (TAO_Policy_Set &policies - ); + void merge_policies_impl (TAO_Policy_Set &policies); /** * Return whether the specified policy type is legal for the @@ -80,17 +77,13 @@ protected: virtual CORBA::Boolean legal_policy_impl (CORBA::PolicyType type); private: - void validate_server_protocol (TAO_Policy_Set &policies - ); + void validate_server_protocol (TAO_Policy_Set &policies); - void validate_priorities (TAO_Policy_Set &policies - ); + void validate_priorities (TAO_Policy_Set &policies); - void validate_thread_pool (TAO_Policy_Set &policies - ); + void validate_thread_pool (TAO_Policy_Set &policies); TAO_Thread_Pool *thread_pool_; - }; TAO_END_VERSIONED_NAMESPACE_DECL |