From c35277837fe52adb19a22a9d18931b3e804b8358 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Mon, 13 Feb 2023 12:43:48 +0100 Subject: Use override/default for RTPortableServer * TAO/NEWS: * TAO/tao/RTPortableServer/RT_Acceptor_Filters.h: * TAO/tao/RTPortableServer/RT_Collocation_Resolver.h: * TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.h: * TAO/tao/RTPortableServer/RT_POA.cpp: * TAO/tao/RTPortableServer/RT_POA.h: * TAO/tao/RTPortableServer/RT_Policy_Validator.h: * TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp: * TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h: --- TAO/NEWS | 3 + TAO/tao/RTPortableServer/RT_Acceptor_Filters.h | 4 +- TAO/tao/RTPortableServer/RT_Collocation_Resolver.h | 2 +- .../RTPortableServer/RT_Object_Adapter_Factory.h | 2 +- TAO/tao/RTPortableServer/RT_POA.cpp | 7 +- TAO/tao/RTPortableServer/RT_POA.h | 102 ++++++++++----------- TAO/tao/RTPortableServer/RT_Policy_Validator.h | 4 +- TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp | 4 - TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h | 10 +- 9 files changed, 66 insertions(+), 72 deletions(-) diff --git a/TAO/NEWS b/TAO/NEWS index a65cd83348f..23f0ed8a665 100644 --- a/TAO/NEWS +++ b/TAO/NEWS @@ -1,6 +1,9 @@ USER VISIBLE CHANGES BETWEEN TAO-3.0.11 and TAO-3.1.0 ===================================================== +. Removed usage of ACE service configurator for all + POA internal strategy classes + USER VISIBLE CHANGES BETWEEN TAO-3.0.10 and TAO-3.0.11 ====================================================== diff --git a/TAO/tao/RTPortableServer/RT_Acceptor_Filters.h b/TAO/tao/RTPortableServer/RT_Acceptor_Filters.h index 5a90d176b41..bb87e9dad19 100644 --- a/TAO/tao/RTPortableServer/RT_Acceptor_Filters.h +++ b/TAO/tao/RTPortableServer/RT_Acceptor_Filters.h @@ -52,11 +52,11 @@ public: TAO_MProfile &mprofile, TAO_Acceptor **acceptors_begin, TAO_Acceptor **acceptors_end, - CORBA::Short priority); + CORBA::Short priority) override; /// Encodes the endpoints in the profiles into the TAO_TAG_ENDPOINTS /// tag component of profiles. - int encode_endpoints (TAO_MProfile &mprofile); + int encode_endpoints (TAO_MProfile &mprofile) override; private: /// Value of the ServerProtocolPolicy used for endpoint diff --git a/TAO/tao/RTPortableServer/RT_Collocation_Resolver.h b/TAO/tao/RTPortableServer/RT_Collocation_Resolver.h index bf32bc4fccc..457615bfdaf 100644 --- a/TAO/tao/RTPortableServer/RT_Collocation_Resolver.h +++ b/TAO/tao/RTPortableServer/RT_Collocation_Resolver.h @@ -41,7 +41,7 @@ class TAO_RTPortableServer_Export TAO_RT_Collocation_Resolver : { public: /// Is @a object collocated? - virtual CORBA::Boolean is_collocated (CORBA::Object_ptr object) const; + CORBA::Boolean is_collocated (CORBA::Object_ptr object) const override; }; diff --git a/TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.h b/TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.h index 2709e4d3ec6..6e1ac24df2a 100644 --- a/TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.h +++ b/TAO/tao/RTPortableServer/RT_Object_Adapter_Factory.h @@ -32,7 +32,7 @@ class TAO_RTPortableServer_Export TAO_RT_Object_Adapter_Factory { public: /// Create adapter. - virtual TAO_Adapter *create (TAO_ORB_Core *orb_core); + TAO_Adapter *create (TAO_ORB_Core *orb_core) override; }; diff --git a/TAO/tao/RTPortableServer/RT_POA.cpp b/TAO/tao/RTPortableServer/RT_POA.cpp index 0ead61fa6d7..93b27235ac6 100644 --- a/TAO/tao/RTPortableServer/RT_POA.cpp +++ b/TAO/tao/RTPortableServer/RT_POA.cpp @@ -45,17 +45,12 @@ TAO_RT_POA::TAO_RT_POA (const TAO_Root_POA::String &name, lock, thread_lock, orb_core, - object_adapter), - thread_pool_ (0) + object_adapter) { // Parse the RT policies and update our policy cache. this->parse_rt_policies (this->policies ()); } -TAO_RT_POA::~TAO_RT_POA () -{ -} - TAO_Root_POA * TAO_RT_POA::new_POA (const String &name, PortableServer::POAManager_ptr poa_manager, diff --git a/TAO/tao/RTPortableServer/RT_POA.h b/TAO/tao/RTPortableServer/RT_POA.h index 4c510007cb3..62420daa053 100644 --- a/TAO/tao/RTPortableServer/RT_POA.h +++ b/TAO/tao/RTPortableServer/RT_POA.h @@ -50,129 +50,129 @@ class TAO_RTPortableServer_Export TAO_RT_POA public: // RTCORBA specific methods CORBA::Object_ptr create_reference_with_priority (const char * intf, - RTCORBA::Priority priority); + RTCORBA::Priority priority) override; #if !defined (CORBA_E_MICRO) CORBA::Object_ptr create_reference_with_id_and_priority (const PortableServer::ObjectId & oid, const char * intf, - RTCORBA::Priority priority); + RTCORBA::Priority priority) override; #endif PortableServer::ObjectId * activate_object_with_priority (PortableServer::Servant p_servant, - RTCORBA::Priority priority); + RTCORBA::Priority priority) override; #if !defined (CORBA_E_MICRO) void activate_object_with_id_and_priority (const PortableServer::ObjectId & oid, PortableServer::Servant p_servant, - RTCORBA::Priority priority); + RTCORBA::Priority priority) override; #endif // End RTCORBA specific methods // Standard POA interface methods PortableServer::POA_ptr create_POA (const char *adapter_name, PortableServer::POAManager_ptr poa_manager, - const CORBA::PolicyList &policies); + const CORBA::PolicyList &policies) override; PortableServer::POA_ptr find_POA (const char *adapter_name, - CORBA::Boolean activate_it); + CORBA::Boolean activate_it) override; void destroy (CORBA::Boolean etherealize_objects, - CORBA::Boolean wait_for_completion); + CORBA::Boolean wait_for_completion) override; #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) PortableServer::ThreadPolicy_ptr create_thread_policy ( - PortableServer::ThreadPolicyValue value); + PortableServer::ThreadPolicyValue value) override; #endif /* TAO_HAS_MINIMUM_POA == 0 */ #if !defined (CORBA_E_MICRO) PortableServer::LifespanPolicy_ptr create_lifespan_policy ( - PortableServer::LifespanPolicyValue value); + PortableServer::LifespanPolicyValue value) override; #endif #if !defined (CORBA_E_MICRO) PortableServer::IdUniquenessPolicy_ptr create_id_uniqueness_policy ( - PortableServer::IdUniquenessPolicyValue value); + PortableServer::IdUniquenessPolicyValue value) override; #endif #if !defined (CORBA_E_MICRO) PortableServer::IdAssignmentPolicy_ptr create_id_assignment_policy ( - PortableServer::IdAssignmentPolicyValue value); + PortableServer::IdAssignmentPolicyValue value) override; #endif #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) PortableServer::ImplicitActivationPolicy_ptr create_implicit_activation_policy ( - PortableServer::ImplicitActivationPolicyValue value); + PortableServer::ImplicitActivationPolicyValue value) override; PortableServer::ServantRetentionPolicy_ptr create_servant_retention_policy ( - PortableServer::ServantRetentionPolicyValue value); + PortableServer::ServantRetentionPolicyValue value) override; PortableServer::RequestProcessingPolicy_ptr create_request_processing_policy ( - PortableServer::RequestProcessingPolicyValue value); + PortableServer::RequestProcessingPolicyValue value) override; #endif /* TAO_HAS_MINIMUM_POA == 0 && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) */ - char * the_name (); + char * the_name () override; - PortableServer::POA_ptr the_parent (); + PortableServer::POA_ptr the_parent () override; - PortableServer::POAList *the_children (); + PortableServer::POAList *the_children () override; - PortableServer::POAManager_ptr the_POAManager (); + PortableServer::POAManager_ptr the_POAManager () override; #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO) - PortableServer::AdapterActivator_ptr the_activator (); + PortableServer::AdapterActivator_ptr the_activator () override; - void the_activator (PortableServer::AdapterActivator_ptr adapter_activator); + void the_activator (PortableServer::AdapterActivator_ptr adapter_activator) override; - PortableServer::ServantManager_ptr get_servant_manager (); + PortableServer::ServantManager_ptr get_servant_manager () override; - void set_servant_manager (PortableServer::ServantManager_ptr imgr); + void set_servant_manager (PortableServer::ServantManager_ptr imgr) override; - PortableServer::Servant get_servant (); + PortableServer::Servant get_servant () override; - void set_servant (PortableServer::Servant servant); + void set_servant (PortableServer::Servant servant) override; #endif /* TAO_HAS_MINIMUM_POA == 0 */ - PortableServer::ObjectId *activate_object (PortableServer::Servant p_servant); + PortableServer::ObjectId *activate_object (PortableServer::Servant p_servant) override; #if !defined (CORBA_E_MICRO) void activate_object_with_id (const PortableServer::ObjectId &id, - PortableServer::Servant p_servant); + PortableServer::Servant p_servant) override; #endif - void deactivate_object (const PortableServer::ObjectId &oid); + void deactivate_object (const PortableServer::ObjectId &oid) override; - CORBA::Object_ptr create_reference (const char *intf); + CORBA::Object_ptr create_reference (const char *intf) override; #if !defined (CORBA_E_MICRO) CORBA::Object_ptr create_reference_with_id (const PortableServer::ObjectId &oid, - const char *intf); + const char *intf) override; #endif - PortableServer::ObjectId *servant_to_id (PortableServer::Servant p_servant); + PortableServer::ObjectId *servant_to_id (PortableServer::Servant p_servant) override; - CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant); + CORBA::Object_ptr servant_to_reference (PortableServer::Servant p_servant) override; - PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference); + PortableServer::Servant reference_to_servant (CORBA::Object_ptr reference) override; - PortableServer::ObjectId *reference_to_id (CORBA::Object_ptr reference); + PortableServer::ObjectId *reference_to_id (CORBA::Object_ptr reference) override; - PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid); + PortableServer::Servant id_to_servant (const PortableServer::ObjectId &oid) override; - CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid); + CORBA::Object_ptr id_to_reference (const PortableServer::ObjectId &oid) override; - CORBA::OctetSeq *id (); + CORBA::OctetSeq *id () override; // End standard POA interface methods. - virtual CORBA::PolicyList *client_exposed_policies (CORBA::Short object_priority); + CORBA::PolicyList *client_exposed_policies (CORBA::Short object_priority) override; TAO_RT_POA (const String &name, PortableServer::POAManager_ptr poa_manager, @@ -183,24 +183,24 @@ public: TAO_ORB_Core &orb_core, TAO_Object_Adapter *object_adapter); - virtual ~TAO_RT_POA (); + ~TAO_RT_POA () override = default; void *thread_pool () const; protected: /// Template method for creating new POA's of this type. - virtual TAO_Root_POA *new_POA (const String &name, - PortableServer::POAManager_ptr poa_manager, - const TAO_POA_Policy_Set &policies, - TAO_Root_POA *parent, - ACE_Lock &lock, - TAO_SYNCH_MUTEX &thread_lock, - TAO_ORB_Core &orb_core, - TAO_Object_Adapter *object_adapter); - - virtual TAO_Stub *key_to_stub_i (const TAO::ObjectKey &key, - const char *type_id, - CORBA::Short priority); + TAO_Root_POA *new_POA (const String &name, + PortableServer::POAManager_ptr poa_manager, + const TAO_POA_Policy_Set &policies, + TAO_Root_POA *parent, + ACE_Lock &lock, + TAO_SYNCH_MUTEX &thread_lock, + TAO_ORB_Core &orb_core, + TAO_Object_Adapter *object_adapter) override; + + TAO_Stub *key_to_stub_i (const TAO::ObjectKey &key, + const char *type_id, + CORBA::Short priority) override; void validate_priority (RTCORBA::Priority priority); @@ -221,7 +221,7 @@ protected: int lane_required (TAO_Thread_Lane *lane, TAO_PriorityBandedConnectionPolicy *priority_bands); - TAO_Thread_Pool *thread_pool_; + TAO_Thread_Pool *thread_pool_ {}; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/RTPortableServer/RT_Policy_Validator.h b/TAO/tao/RTPortableServer/RT_Policy_Validator.h index 49e445e4dca..2fcf68be954 100644 --- a/TAO/tao/RTPortableServer/RT_Policy_Validator.h +++ b/TAO/tao/RTPortableServer/RT_Policy_Validator.h @@ -42,7 +42,7 @@ public: TAO_POA_RT_Policy_Validator (TAO_ORB_Core &orb_core); /// Destructor. - ~TAO_POA_RT_Policy_Validator () = default; + ~TAO_POA_RT_Policy_Validator () override = default; static RTCORBA::ServerProtocolPolicy_ptr server_protocol_policy_from_thread_pool (TAO_Thread_Pool *thread_pool, TAO_ORB_Core &orb_core); @@ -71,7 +71,7 @@ protected: * potentially specify policies that are unknown to an * validate () routine, and these need to be caught. */ - virtual CORBA::Boolean legal_policy_impl (CORBA::PolicyType type); + CORBA::Boolean legal_policy_impl (CORBA::PolicyType type) override; private: void validate_server_protocol (TAO_Policy_Set &policies); diff --git a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp index c49c6019527..e3faefbd69d 100644 --- a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp +++ b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.cpp @@ -24,10 +24,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_RT_Servant_Dispatcher::~TAO_RT_Servant_Dispatcher () -{ -} - void TAO_RT_Servant_Dispatcher::pre_invoke_remote_request ( TAO_Root_POA &poa, diff --git a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h index dd7df712e50..4806ddf6609 100644 --- a/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h +++ b/TAO/tao/RTPortableServer/RT_Servant_Dispatcher.h @@ -39,22 +39,22 @@ class TAO_RTPortableServer_Export TAO_RT_Servant_Dispatcher : public TAO_Servant_Dispatcher { public: - virtual ~TAO_RT_Servant_Dispatcher (); + ~TAO_RT_Servant_Dispatcher () override = default; /// Pre_invoke remote request. void pre_invoke_remote_request (TAO_Root_POA &poa, CORBA::Short servant_priority, TAO_ServerRequest &req, - TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state); + TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state) override; /// Pre_invoke collocated request. void pre_invoke_collocated_request (TAO_Root_POA &poa, CORBA::Short servant_priority, - TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state); + TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state) override; /// Post_invoke request. void post_invoke (TAO_Root_POA &poa, - TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state); + TAO::Portable_Server::Servant_Upcall::Pre_Invoke_State &pre_invoke_state) override; /// Factory method for creating new POA's. TAO_Root_POA *create_Root_POA (const ACE_CString &name, @@ -63,7 +63,7 @@ public: ACE_Lock &lock, TAO_SYNCH_MUTEX &thread_lock, TAO_ORB_Core &orb_core, - TAO_Object_Adapter *object_adapter); + TAO_Object_Adapter *object_adapter) override; }; TAO_END_VERSIONED_NAMESPACE_DECL -- cgit v1.2.1