diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2022-12-12 22:54:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-12 22:54:26 +0100 |
commit | 92150c5f6e7cceae2f07bfc7b9e5bd4bfaeec186 (patch) | |
tree | 051efc2973b8fc51dc2a77af3467e64d1e80a4da | |
parent | cfebb9c5c616716f6fbde437c00c8e3655caa696 (diff) | |
parent | 96ed7f47169fa450fd2f1ec0ff701aa5df41e47d (diff) | |
download | ATCD-92150c5f6e7cceae2f07bfc7b9e5bd4bfaeec186.tar.gz |
Merge pull request #1994 from jwillemsen/jwi-portablegroupcleanup
Cleanup and modernize portablegroup code
40 files changed, 59 insertions, 227 deletions
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.cpp index ebc331319c6..20b70b75e17 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.cpp @@ -69,14 +69,9 @@ namespace namespace TAO_PG { - Fragments_Cleanup_Strategy::~Fragments_Cleanup_Strategy () - { - } - void Time_Bound_Fragments_Cleanup_Strategy::cleanup ( - TAO_UIPMC_Mcast_Transport::Packets_Map &packets - ) + TAO_UIPMC_Mcast_Transport::Packets_Map &packets) { // bound_ is in milliseconds. ACE_Time_Value const delay (0, 1000 * this->bound_); @@ -114,8 +109,7 @@ namespace TAO_PG void Number_Bound_Fragments_Cleanup_Strategy::cleanup ( - TAO_UIPMC_Mcast_Transport::Packets_Map &packets - ) + TAO_UIPMC_Mcast_Transport::Packets_Map &packets) { int const current_size = static_cast<int> (packets.current_size ()); @@ -165,8 +159,7 @@ namespace TAO_PG void Memory_Bound_Fragments_Cleanup_Strategy::cleanup ( - TAO_UIPMC_Mcast_Transport::Packets_Map &packets - ) + TAO_UIPMC_Mcast_Transport::Packets_Map &packets) { // First we need to calculate the size of packets. Since we anyway run // this loop we can also cleanup broken packets. diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.h b/TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.h index 2299c2da705..5f085240713 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/Fragments_Cleanup_Strategy.h @@ -44,7 +44,7 @@ namespace TAO_PG Fragments_Cleanup_Strategy (int bound); /// The destructor - virtual ~Fragments_Cleanup_Strategy (); + virtual ~Fragments_Cleanup_Strategy () = default; /// Sub-classes must implement these methods virtual void cleanup (TAO_UIPMC_Mcast_Transport::Packets_Map &) = 0; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h b/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h index b921a67b2ec..3f4bf31e76a 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/GOA.h @@ -54,7 +54,6 @@ public: virtual PortableServer::ObjectId * create_id_for_reference ( CORBA::Object_ptr the_ref); - virtual PortableGroup::IDs * reference_to_ids ( CORBA::Object_ptr the_ref); diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/MIOP.h b/TAO/orbsvcs/orbsvcs/PortableGroup/MIOP.h index 3c44029c881..609aa9b90a0 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/MIOP.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/MIOP.h @@ -25,7 +25,7 @@ namespace TAO { class TAO_PortableGroup_Export MIOP_Loader { - public: + public: /// Used to force the insertion of UIPMC_Factory in the service /// configurator. static int Initializer (); diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp index 92743a6b5b8..76c647eaeba 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.cpp @@ -14,10 +14,6 @@ TAO_PG_Default_Property_Validator::TAO_PG_Default_Property_Validator () this->factories_[0].id = CORBA::string_dup ("org.omg.PortableGroup.Factories"); } -TAO_PG_Default_Property_Validator::~TAO_PG_Default_Property_Validator () -{ -} - void TAO_PG_Default_Property_Validator::validate_property ( const PortableGroup::Properties & props) diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.h index 25f10cc839f..7c2681d0d16 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Default_Property_Validator.h @@ -38,7 +38,7 @@ public: TAO_PG_Default_Property_Validator (); /// Destructor - virtual ~TAO_PG_Default_Property_Validator (); + virtual ~TAO_PG_Default_Property_Validator () = default; /// Validate the given properties. Throw an exception when the /// first invalid property is encountered. The remaining properties diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp index f7eb0d328f4..dfe9833f702 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.cpp @@ -241,9 +241,7 @@ int TAO::PG_Group_Factory::find_group_with_name (const char* target_group_name, // If the group has the group name in the property // const char* a_group_name = a_group->get_name (); - if (a_group_name != 0 && - ACE_OS::strcmp (target_group_name, - a_group_name) == 0) + if (a_group_name != 0 && ACE_OS::strcmp (target_group_name, a_group_name) == 0) { // This is the group we were looking for group_target = a_group; result = 1; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h index 52fe32a4306..7b628e5da0b 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Group_Factory.h @@ -84,16 +84,13 @@ namespace TAO PortableServer::POA_ptr poa, PortableGroup::FactoryRegistry_ptr factory_registry); - TAO::PG_Object_Group * create_group ( const char * type_id, const PortableGroup::Criteria & the_criteria, const TAO::PG_Property_Set_var & typeid_properties); - void delete_group (PortableGroup::ObjectGroup_ptr object_group); - void delete_group (PortableGroup::ObjectGroupId group_id); PortableGroup::ObjectGroups * @@ -106,7 +103,6 @@ namespace TAO PortableGroup::ObjectGroups * all_groups (); - /** * insert existing group. Take ownership * note: uses group id extracted from group object diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Manipulator.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Manipulator.cpp index c8b22ae18cc..88a6fb0b363 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Manipulator.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Manipulator.cpp @@ -25,10 +25,6 @@ TAO::PG_Object_Group_Manipulator::PG_Object_Group_Manipulator () { } -TAO::PG_Object_Group_Manipulator::~PG_Object_Group_Manipulator () -{ -} - void TAO::PG_Object_Group_Manipulator::allocate_ogid (PortableGroup::ObjectGroupId & ogid) { ACE_GUARD (TAO_SYNCH_MUTEX, guard, this->lock_ogid_); diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Manipulator.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Manipulator.h index 8ac98a4ba32..e5cb7fe7f68 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Manipulator.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Manipulator.h @@ -43,7 +43,7 @@ namespace TAO PG_Object_Group_Manipulator (); /// Destructor. - ~PG_Object_Group_Manipulator (); + ~PG_Object_Group_Manipulator () = default; /** * Initializes the group creator. diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.h index a1826ebc40b..0aa09da87eb 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Object_Group_Storable.h @@ -46,8 +46,6 @@ namespace TAO class TAO_PortableGroup_Export PG_Object_Group_Storable : public PG_Object_Group { - ///////////////////// - // Construct/Destruct public: /** * This constructor is suitable for creating an object group from @@ -78,8 +76,6 @@ namespace TAO /// Destructor ~PG_Object_Group_Storable (); - ///////////////// - // public methods public: /** * Indicate that this object group is to be permanently diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp index 590c5faa2d7..67beddbbae5 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.cpp @@ -10,24 +10,12 @@ //============================================================================= #include "orbsvcs/PortableGroup/PG_Properties_Encoder.h" - #if ! defined (__ACE_INLINE__) #include "orbsvcs/PortableGroup/PG_Properties_Encoder.inl" #endif /* ! __ACE_INLINE__ */ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -////////// -// Properties_Encoder -TAO_PG::Properties_Encoder::Properties_Encoder () -{ -} - -TAO_PG::Properties_Encoder::~Properties_Encoder () -{ -} - - void TAO_PG::Properties_Encoder::add ( const char * name, const PortableGroup::Value & value) diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h index e40ce9263d4..b141599f443 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Encoder.h @@ -61,10 +61,10 @@ namespace TAO_PG /** * Construct an empty set of properties. */ - Properties_Encoder (); + Properties_Encoder () = default; /// standard destructor - ~Properties_Encoder (); + ~Properties_Encoder () = default; /** * add a name/value property to the Properties_Encoder. @@ -78,8 +78,8 @@ namespace TAO_PG void encode (PortableGroup::Properties * property_set) const; private: - Properties_Encoder (const Properties_Encoder & rhs); - Properties_Encoder & operator = (const Properties_Encoder & rhs); + Properties_Encoder (const Properties_Encoder & rhs) = delete; + Properties_Encoder & operator = (const Properties_Encoder & rhs) = delete; private: NamedValueVec values_; }; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Support.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Support.cpp index 1239590d611..701dceeb1ee 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Support.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Properties_Support.cpp @@ -16,7 +16,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO::PG_Properties_Support::PG_Properties_Support () { - TAO::PG_Property_Set *props; + TAO::PG_Property_Set *props = nullptr; ACE_NEW_THROW_EX (props, TAO::PG_Property_Set (), CORBA::NO_MEMORY()); diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.h index acb8c6cfa95..4d51d5451a1 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set.h @@ -147,8 +147,8 @@ namespace TAO //////////////////// // Forbidden methods private: - PG_Property_Set(const PG_Property_Set & rhs); - PG_Property_Set & operator = (const PG_Property_Set & rhs); + PG_Property_Set(const PG_Property_Set & rhs) = delete; + PG_Property_Set & operator = (const PG_Property_Set & rhs) = delete; /////////////// // Data Members diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h index 728addb72e7..c7d4c69625f 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Property_Set_Find.h @@ -37,8 +37,8 @@ namespace TAO int find (const PG_Property_Set & decoder, const ACE_CString & key, TYPE & value) { int result = 0; - const PortableGroup::Value * any = 0; - if ( decoder.find (key, any)) + const PortableGroup::Value * any = nullptr; + if (decoder.find (key, any)) { result = ((*any) >>= value); } diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.cpp index 80a0e8106a7..a30099fa6c7 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.cpp @@ -3,10 +3,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_PG_Servant_Dispatcher::~TAO_PG_Servant_Dispatcher () -{ -} - TAO_Root_POA * TAO_PG_Servant_Dispatcher::create_Root_POA (const ACE_CString &name, PortableServer::POAManager_ptr poa_manager, diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.h index 84cb3013f4b..01b36d080af 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Servant_Dispatcher.h @@ -33,7 +33,7 @@ class TAO_PortableGroup_Export TAO_PG_Servant_Dispatcher : public TAO_Servant_Dispatcher { public: - virtual ~TAO_PG_Servant_Dispatcher (); + virtual ~TAO_PG_Servant_Dispatcher () = default; /// Pre_invoke remote request. void pre_invoke_remote_request (TAO_Root_POA &poa, diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Utils.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Utils.h index 654de5311de..2bcd35e02b8 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Utils.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Utils.h @@ -32,7 +32,7 @@ namespace TAO */ class TAO_PortableGroup_Export PG_Utils { - public: + public: /// Set tagged component for the object group static CORBA::Boolean set_tagged_component ( PortableGroup::ObjectGroup *ior, diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Acceptor_Registry.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Acceptor_Registry.cpp index 8b73a3b75d4..0fd9d95ce5d 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Acceptor_Registry.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Acceptor_Registry.cpp @@ -12,14 +12,10 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -TAO_PortableGroup_Acceptor_Registry::TAO_PortableGroup_Acceptor_Registry () -{ -} - TAO_PortableGroup_Acceptor_Registry::~TAO_PortableGroup_Acceptor_Registry () { // Free the memory for the endpoints. - Entry *entry; + Entry *entry = nullptr; Acceptor_Registry_Iterator iter (this->registry_); while (iter.next (entry)) @@ -30,12 +26,11 @@ TAO_PortableGroup_Acceptor_Registry::~TAO_PortableGroup_Acceptor_Registry () } } - void TAO_PortableGroup_Acceptor_Registry::open (const TAO_Profile* profile, TAO_ORB_Core &orb_core) { - Entry *entry; + Entry *entry = nullptr; if (this->find (profile, entry) == 1) { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Acceptor_Registry.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Acceptor_Registry.h index 82934b24c9e..481d154b353 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Acceptor_Registry.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Acceptor_Registry.h @@ -63,7 +63,7 @@ public: }; /// Default constructor. - TAO_PortableGroup_Acceptor_Registry (); + TAO_PortableGroup_Acceptor_Registry () = default; /// Default destructor. ~TAO_PortableGroup_Acceptor_Registry (); diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_ORBInitializer.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_ORBInitializer.h index 0ac17fb12cb..996bb70da88 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_ORBInitializer.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_ORBInitializer.h @@ -38,9 +38,9 @@ class TAO_PortableGroup_Export TAO_PortableGroup_ORBInitializer : public virtual ::CORBA::LocalObject { public: - virtual void pre_init (PortableInterceptor::ORBInitInfo_ptr info); + void pre_init (PortableInterceptor::ORBInitInfo_ptr info) override; - virtual void post_init (PortableInterceptor::ORBInitInfo_ptr info); + void post_init (PortableInterceptor::ORBInitInfo_ptr info) override; }; TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.cpp index 4e2c4c5dfe6..fe0b73857d3 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.cpp @@ -7,10 +7,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -PortableGroup_Request_Dispatcher::~PortableGroup_Request_Dispatcher () -{ -} - void PortableGroup_Request_Dispatcher::dispatch (TAO_ORB_Core *orb_core, TAO_ServerRequest &request, diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.h b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.h index ba9fb25eecd..4b1c3ad9cec 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PortableGroup_Request_Dispatcher.h @@ -39,14 +39,14 @@ class TAO_PortableGroup_Export PortableGroup_Request_Dispatcher public: /// Destructor. - virtual ~PortableGroup_Request_Dispatcher (); + ~PortableGroup_Request_Dispatcher () override = default; /** * Dispatch a request. */ - virtual void dispatch (TAO_ORB_Core *orb_core, - TAO_ServerRequest &request, - CORBA::Object_out forward_to); + void dispatch (TAO_ORB_Core *orb_core, + TAO_ServerRequest &request, + CORBA::Object_out forward_to) override; private: /// Hash map containing the GroupId->ObjectKey mappings. diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/Portable_Group_Map.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/Portable_Group_Map.cpp index 8d40234ec16..3aaf3069295 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/Portable_Group_Map.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/Portable_Group_Map.cpp @@ -5,11 +5,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL -/// Constructor. -TAO_Portable_Group_Map::TAO_Portable_Group_Map () -{ -} - /// Destructor. TAO_Portable_Group_Map::~TAO_Portable_Group_Map () { @@ -36,8 +31,7 @@ TAO_Portable_Group_Map::~TAO_Portable_Group_Map () void TAO_Portable_Group_Map::add_groupid_objectkey_pair ( PortableGroup::TagGroupTaggedComponent *group_id, - const TAO::ObjectKey &key - ) + const TAO::ObjectKey &key) { ACE_WRITE_GUARD (TAO_SYNCH_RW_MUTEX, guard, diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/Portable_Group_Map.h b/TAO/orbsvcs/orbsvcs/PortableGroup/Portable_Group_Map.h index a3cb206cd03..7831a49f79f 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/Portable_Group_Map.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/Portable_Group_Map.h @@ -82,7 +82,7 @@ public: }; /// Constructor. - TAO_Portable_Group_Map (); + TAO_Portable_Group_Map () = default; /// Destructor. ~TAO_Portable_Group_Map (); diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/README b/TAO/orbsvcs/orbsvcs/PortableGroup/README index df4f8896fc3..652fdc2efd8 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/README +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/README @@ -1,11 +1,9 @@ - - This directory contains an implementation of the MIOP specification for TAO. This currently includes: - . The UIPMC (Unreliable IP multicast) Pluggable Protocol - . The PortableGroup extensions to the POA - . Request dispatch hooks to TAO to dispatch based on GroupID +. The UIPMC (Unreliable IP multicast) Pluggable Protocol +. The PortableGroup extensions to the POA +. Request dispatch hooks to TAO to dispatch based on GroupID For examples on how to use MIOP, see $TAO_ROOT/orbsvcs/tests/Miop. diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connector.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connector.cpp index 7dfe87e1e95..4190aed9010 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connector.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connector.cpp @@ -21,10 +21,6 @@ TAO_UIPMC_Connector::TAO_UIPMC_Connector () { } -TAO_UIPMC_Connector::~TAO_UIPMC_Connector () -{ -} - int TAO_UIPMC_Connector::open (TAO_ORB_Core *orb_core) { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connector.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connector.h index d19bc1c9f22..d3cb4947983 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connector.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Connector.h @@ -43,7 +43,7 @@ public: TAO_UIPMC_Connector (); /// Destructor. - ~TAO_UIPMC_Connector (); + ~TAO_UIPMC_Connector () = default; // = The TAO_Connector methods, please check the documentation on // Transport_Connector.h diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.cpp index 24d0573bb7d..be41a609280 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.cpp @@ -9,6 +9,7 @@ #include "ace/OS_NS_stdio.h" #include "ace/OS_NS_string.h" #include "ace/OS_Memory.h" +#include <cstring> #if !defined (__ACE_INLINE__) # include "orbsvcs/PortableGroup/UIPMC_Endpoint.inl" @@ -25,7 +26,6 @@ TAO_UIPMC_Endpoint::TAO_UIPMC_Endpoint () next_ (0), preferred_if_() { - this->uint_ip_addr (0u); } TAO_UIPMC_Endpoint::TAO_UIPMC_Endpoint (const ACE_INET_Addr &addr) @@ -40,21 +40,6 @@ TAO_UIPMC_Endpoint::TAO_UIPMC_Endpoint (const ACE_INET_Addr &addr) this->object_addr (addr); } -// Use of this ctr must be avoided -TAO_UIPMC_Endpoint::TAO_UIPMC_Endpoint (const CORBA::Octet class_d_address[4], - CORBA::UShort port) - : TAO_Endpoint (IOP::TAG_UIPMC), - port_ (port), - preferred_path_ (), - next_ (0), - preferred_if_() -{ - for (int i = 0; i<4; i++) - this->class_d_address_[i] = class_d_address[i]; - - this->update_object_addr (); -} - TAO_UIPMC_Endpoint::~TAO_UIPMC_Endpoint () { delete this->next_; @@ -68,7 +53,6 @@ TAO_UIPMC_Endpoint::object_addr (const ACE_INET_Addr &addr) addr.get_host_addr (tmp, sizeof tmp); this->host_ = CORBA::string_dup (tmp); this->object_addr_.set (addr); - this->uint_ip_addr (addr.get_ip_address ()); } const char * @@ -120,11 +104,11 @@ TAO_UIPMC_Endpoint::next () TAO_Endpoint * TAO_UIPMC_Endpoint::duplicate () { - TAO_UIPMC_Endpoint *endpoint = 0; + TAO_UIPMC_Endpoint *endpoint = nullptr; ACE_NEW_RETURN (endpoint, TAO_UIPMC_Endpoint (this->object_addr_), - 0); + nullptr); return endpoint; } @@ -135,12 +119,12 @@ TAO_UIPMC_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint) const TAO_UIPMC_Endpoint *endpoint = dynamic_cast<const TAO_UIPMC_Endpoint *> (other_endpoint); - if (endpoint == 0) - return 0; + if (endpoint == nullptr) + return false; return (this->port_ == endpoint->port_ - && ACE_OS::strcmp (this->host (), endpoint->host ()) == 0); + && std::strcmp (this->host (), endpoint->host ()) == 0); } CORBA::ULong @@ -183,31 +167,29 @@ TAO_UIPMC_Endpoint::preferred_interfaces (TAO_ORB_Core *oc) && this->object_addr_.get_type () == AF_INET6) { latest->preferred_if_ = CORBA::string_dup (preferred[i].c_str() + 3); - latest->preferred_path_.host = (const char *) 0; + latest->preferred_path_.host = static_cast<const char *> (0); if (TAO_debug_level > 3) ORBSVCS_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - TAO_UIPMC_Endpoint::preferred_interfaces, setting network interface name <%s>" - " as preferred path for [%s] \n", + "TAO (%P|%t) - TAO_UIPMC_Endpoint::preferred_interfaces, setting network interface name <%C>" + " as preferred path for [%C] \n", latest->preferred_if_.in(), this->host_.in ())); } else #endif /* ACE_HAS_IPV6 */ { - latest->preferred_path_.host = - CORBA::string_dup (preferred[i].c_str()); + latest->preferred_path_.host = CORBA::string_dup (preferred[i].c_str()); if (TAO_debug_level > 3) ORBSVCS_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - TAO_UIPMC_Endpoint::preferred_interfaces, adding path [%s]" - " as preferred local address for [%s] \n", + "TAO (%P|%t) - TAO_UIPMC_Endpoint::preferred_interfaces, adding path [%C]" + " as preferred local address for [%C] \n", latest->preferred_path_.host.in(), this->host_.in ())); } ++i; if (i < count) { - TAO_Endpoint *tmp_ep = - latest->duplicate (); + TAO_Endpoint *tmp_ep = latest->duplicate (); latest->next_ = dynamic_cast<TAO_UIPMC_Endpoint *> (tmp_ep); if (!latest->next_) { @@ -223,8 +205,7 @@ TAO_UIPMC_Endpoint::preferred_interfaces (TAO_ORB_Core *oc) !oc->orb_params ()->enforce_pref_interfaces ()) { TAO_Endpoint *tmp_ep = latest->duplicate (); - latest->next_ = - dynamic_cast<TAO_UIPMC_Endpoint *> (tmp_ep); + latest->next_ = dynamic_cast<TAO_UIPMC_Endpoint *> (tmp_ep); if (!latest->next_) { delete tmp_ep; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h index 9be6f5e6a1b..81e57b96ceb 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.h @@ -45,10 +45,6 @@ public: /// Constructor. TAO_UIPMC_Endpoint (const ACE_INET_Addr &addr); - /// Constructor. @@ Frank - deprecate this. - TAO_UIPMC_Endpoint (const CORBA::Octet class_d_address[4], - CORBA::UShort port); - /// Destructor. ~TAO_UIPMC_Endpoint (); @@ -105,16 +101,6 @@ public: const char *preferred_if () const; private: - /// Helper methods for getting and setting the IP address. @@ Vadym - deprecate these. - ACE_UINT32 uint_ip_addr () const; - void uint_ip_addr (ACE_UINT32 ip_addr); - - /// Helper method to update the cached object address. @@ Vadym - deprecate this. - void update_object_addr (); - - /// IP Multicast address. @@ Frank - deprecate this. - CORBA::Octet class_d_address_[4]; - /// String representing the host address. CORBA::String_var host_; diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.inl b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.inl index d773b8acef0..e931de0314c 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.inl +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Endpoint.inl @@ -7,7 +7,6 @@ TAO_UIPMC_Endpoint::object_addr () const return this->object_addr_; } - ACE_INLINE CORBA::UShort TAO_UIPMC_Endpoint::port () const { @@ -20,33 +19,6 @@ TAO_UIPMC_Endpoint::port (CORBA::UShort p) return this->port_ = p; } - -ACE_INLINE ACE_UINT32 -TAO_UIPMC_Endpoint::uint_ip_addr () const -{ - return (((ACE_UINT32)this->class_d_address_[0] << 24) | - ((ACE_UINT32)this->class_d_address_[1] << 16) | - ((ACE_UINT32)this->class_d_address_[2] << 8) | - ((ACE_UINT32)this->class_d_address_[3])); -} - -ACE_INLINE void -TAO_UIPMC_Endpoint::uint_ip_addr (ACE_UINT32 ip_addr) -{ - this->class_d_address_[0] = (CORBA::Char)(ip_addr >> 24); - this->class_d_address_[1] = (CORBA::Char)((ip_addr >> 16) & 0xff); - this->class_d_address_[2] = (CORBA::Char)((ip_addr >> 8) & 0xff); - this->class_d_address_[3] = (CORBA::Char)(ip_addr & 0xff); -} - -ACE_INLINE void -TAO_UIPMC_Endpoint::update_object_addr () -{ - this->object_addr_.set (this->port_, - this->uint_ip_addr ()); -} - - ACE_INLINE const char* TAO_UIPMC_Endpoint::preferred_if () const { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Factory.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Factory.cpp index a520483be08..4b257e56751 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Factory.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Factory.cpp @@ -21,10 +21,6 @@ TAO_UIPMC_Protocol_Factory::TAO_UIPMC_Protocol_Factory () { } -TAO_UIPMC_Protocol_Factory::~TAO_UIPMC_Protocol_Factory () -{ -} - int TAO_UIPMC_Protocol_Factory::match_prefix (const ACE_CString &prefix) { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Factory.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Factory.h index 15e98f38630..56e62305d6c 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Factory.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Factory.h @@ -32,7 +32,7 @@ class TAO_PortableGroup_Export TAO_UIPMC_Protocol_Factory : public TAO_Protocol_ { public: TAO_UIPMC_Protocol_Factory (); - virtual ~TAO_UIPMC_Protocol_Factory (); + virtual ~TAO_UIPMC_Protocol_Factory () = default; // = Service Configurator hooks. /// Dynamic linking hook diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp index 3724b0ab006..1f6b612aaeb 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.cpp @@ -65,30 +65,6 @@ TAO_UIPMC_Profile::TAO_UIPMC_Profile (const ACE_INET_Addr &addr, this->addressing_mode_ = default_addressing_mode_; } -TAO_UIPMC_Profile::TAO_UIPMC_Profile (const CORBA::Octet class_d_address[4], - CORBA::UShort port, - TAO_ORB_Core *orb_core) - : TAO_Profile (IOP::TAG_UIPMC, - orb_core, - TAO_GIOP_Message_Version (TAO_DEF_GIOP_MAJOR, - TAO_DEF_GIOP_MINOR)) - , endpoint_ (class_d_address, port) - , tagged_profile_ () - , group_id_ (0) - , ref_version_ (0) - , has_ref_version_ (false) -{ - // The default for component version is 1.0. - this->component_version_.major = 1; - this->component_version_.minor = 0; - - this->addressing_mode_ = default_addressing_mode_; -} - -TAO_UIPMC_Profile::~TAO_UIPMC_Profile () -{ -} - int TAO_UIPMC_Profile::decode (TAO_InputCDR& cdr) { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.h index 5a5589dcba4..5556e6073b2 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Profile.h @@ -65,13 +65,8 @@ public: TAO_UIPMC_Profile (const ACE_INET_Addr &addr, TAO_ORB_Core *orb_core); - /// Profile constructor. @@ Vadym - deprecate this. - TAO_UIPMC_Profile (const CORBA::Octet class_d_address[4], - CORBA::UShort port, - TAO_ORB_Core *orb_core); - /// Destructor is to be called only through _decr_refcnt. - ~TAO_UIPMC_Profile (); + ~TAO_UIPMC_Profile () = default; /// Template methods. Please see tao/Profile.h for documentation. diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp index d7a8006d3df..6f226adc68c 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp @@ -35,10 +35,6 @@ TAO_UIPMC_Transport::TAO_UIPMC_Transport ( this->uuid_hash_ = uuid.to_string ()->hash (); } -TAO_UIPMC_Transport::~TAO_UIPMC_Transport () -{ -} - ACE_Event_Handler * TAO_UIPMC_Transport::event_handler_i () { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h index 000dc9cdc7c..04d2ca03092 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h @@ -44,7 +44,7 @@ public: TAO_ORB_Core *orb_core); /// Default destructor. - ~TAO_UIPMC_Transport (); + ~TAO_UIPMC_Transport () = default; protected: /** @name Overridden Template Methods diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Wait_Never.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Wait_Never.cpp index 1c6f19f8f98..6fd7e787584 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Wait_Never.cpp +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Wait_Never.cpp @@ -10,10 +10,6 @@ TAO_UIPMC_Wait_Never::TAO_UIPMC_Wait_Never (TAO_Transport *transport) { } -TAO_UIPMC_Wait_Never::~TAO_UIPMC_Wait_Never () -{ -} - int TAO_UIPMC_Wait_Never::register_handler () { diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Wait_Never.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Wait_Never.h index cf9e22a29f3..df8a1b39bd5 100644 --- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Wait_Never.h +++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Wait_Never.h @@ -32,20 +32,17 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL class TAO_PortableGroup_Export TAO_UIPMC_Wait_Never : public TAO_Wait_Strategy { public: - /// Constructor. TAO_UIPMC_Wait_Never (TAO_Transport *transport); - - /// Destructor. - virtual ~TAO_UIPMC_Wait_Never (); + ~TAO_UIPMC_Wait_Never () override = default; // = Documented in TAO_Wait_Strategy. - virtual int sending_request (TAO_ORB_Core *orb_core, - TAO_Message_Semantics msg_semantics); - virtual int wait (ACE_Time_Value *max_wait_time, - TAO_Synch_Reply_Dispatcher &rd); - virtual int register_handler (); - virtual bool non_blocking () const; - virtual bool can_process_upcalls () const; + int sending_request (TAO_ORB_Core *orb_core, + TAO_Message_Semantics msg_semantics) override; + int wait (ACE_Time_Value *max_wait_time, + TAO_Synch_Reply_Dispatcher &rd) override; + int register_handler () override; + bool non_blocking () const override; + bool can_process_upcalls () const override; }; TAO_END_VERSIONED_NAMESPACE_DECL |