From 859b93d81fd90ac787f42d9eec522cf2b8ac0165 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 16 Aug 2023 11:39:55 +0200 Subject: [PATCH 1/5] Removed redundant typedefs, using std::pair{} insert * ciaox11/deployment/handlers/ciaox11_state.cpp: * ciaox11/deployment/handlers/ciaox11_state.h: * connectors/dds4ccm/impl/dds4ccm_base_connector_t.cpp: * exf/deployment/scheduler/ciaox11_exf_dispatcher.cpp: * exf/deployment/scheduler/ciaox11_exf_dispatcher.h: --- ciaox11/deployment/handlers/ciaox11_state.cpp | 8 ++++---- ciaox11/deployment/handlers/ciaox11_state.h | 2 -- connectors/dds4ccm/impl/dds4ccm_base_connector_t.cpp | 6 ++---- exf/deployment/scheduler/ciaox11_exf_dispatcher.cpp | 2 +- exf/deployment/scheduler/ciaox11_exf_dispatcher.h | 1 - 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ciaox11/deployment/handlers/ciaox11_state.cpp b/ciaox11/deployment/handlers/ciaox11_state.cpp index 0c20f4fde..18794876b 100644 --- a/ciaox11/deployment/handlers/ciaox11_state.cpp +++ b/ciaox11/deployment/handlers/ciaox11_state.cpp @@ -40,9 +40,9 @@ namespace CIAOX11 "attempting to add duplicate container reference"); } - this->containers_.insert (CONTAINERS_PAIR (id, container)); + this->containers_.insert (std::pair{id, container}); - this->container_config_.insert (CONFIG_PAIR (id, std::move (config))); + this->container_config_.insert (std::pair{id, std::move (config)}); } void @@ -94,9 +94,9 @@ namespace CIAOX11 { std::lock_guard lock (this->state_mutex_); - this->instance_container_.insert (INSTANCE_PAIR (id, cont_id)); + this->instance_container_.insert (std::pair{id, cont_id}); - this->instance_config_.insert (CONFIG_PAIR (id, std::move (config))); + this->instance_config_.insert (std::pair{id, std::move (config)}); } void diff --git a/ciaox11/deployment/handlers/ciaox11_state.h b/ciaox11/deployment/handlers/ciaox11_state.h index b3f15a350..ca61561ae 100644 --- a/ciaox11/deployment/handlers/ciaox11_state.h +++ b/ciaox11/deployment/handlers/ciaox11_state.h @@ -86,14 +86,12 @@ namespace CIAOX11 CONTAINERS containers_; /// Administration which components are instantiated in which container - using INSTANCE_PAIR = std::pair ; using INSTANCE_CONTAINER = std::map ; /// maps instance ids to containers. INSTANCE_CONTAINER instance_container_; /// Administers configuration of instances - using CONFIG_PAIR = std::pair ; using INSTANCE_CONFIG = std::map ; /// maps container ids to configuration. diff --git a/connectors/dds4ccm/impl/dds4ccm_base_connector_t.cpp b/connectors/dds4ccm/impl/dds4ccm_base_connector_t.cpp index dda96ab9a..fd928e811 100644 --- a/connectors/dds4ccm/impl/dds4ccm_base_connector_t.cpp +++ b/connectors/dds4ccm/impl/dds4ccm_base_connector_t.cpp @@ -485,11 +485,9 @@ DDS_Base_Connector_T::activate_topic ( if (mask != ::DDS::STATUS_MASK_NONE) { topic_listener = - DDS::make_reference( - event_strategy_type (this->context_)); + DDS::make_reference(event_strategy_type (this->context_)); - ::DDS::ReturnCode_t const retcode = topic->set_listener ( - topic_listener, mask); + ::DDS::ReturnCode_t const retcode = topic->set_listener (topic_listener, mask); if (retcode != DDS::RETCODE_OK) { diff --git a/exf/deployment/scheduler/ciaox11_exf_dispatcher.cpp b/exf/deployment/scheduler/ciaox11_exf_dispatcher.cpp index 0e2a6116f..17603e7f9 100644 --- a/exf/deployment/scheduler/ciaox11_exf_dispatcher.cpp +++ b/exf/deployment/scheduler/ciaox11_exf_dispatcher.cpp @@ -806,7 +806,7 @@ namespace CIAOX11 else { inst = std::make_shared (instance_id, concurrent); - this->instance_map_.insert (INSTANCE_PAIR (instance_id, inst)); + this->instance_map_.insert (std::pair{instance_id, inst}); } Dispatcher::ref_type self_ref = this->self_.lock (); diff --git a/exf/deployment/scheduler/ciaox11_exf_dispatcher.h b/exf/deployment/scheduler/ciaox11_exf_dispatcher.h index cc8fd0271..7a5c8e7ad 100644 --- a/exf/deployment/scheduler/ciaox11_exf_dispatcher.h +++ b/exf/deployment/scheduler/ciaox11_exf_dispatcher.h @@ -398,7 +398,6 @@ namespace CIAOX11 std::vector threads_ {}; std::atomic thread_num_ {}; - using INSTANCE_PAIR = std::pair; using INSTANCE_MAP = std::map; INSTANCE_MAP instance_map_ {}; From 4561d5ee8a7aba290dce4042927c8b46ca7dea98 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 16 Aug 2023 11:41:41 +0200 Subject: [PATCH 2/5] Removed redundant typedef * ciaox11/deployment/handlers/ciaox11_state.h: --- ciaox11/deployment/handlers/ciaox11_state.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ciaox11/deployment/handlers/ciaox11_state.h b/ciaox11/deployment/handlers/ciaox11_state.h index ca61561ae..ba491305e 100644 --- a/ciaox11/deployment/handlers/ciaox11_state.h +++ b/ciaox11/deployment/handlers/ciaox11_state.h @@ -80,7 +80,6 @@ namespace CIAOX11 std::mutex state_mutex_; /// Container administration - using CONTAINERS_PAIR = std::pair >; using CONTAINERS = std::map >; CONTAINERS containers_; @@ -88,16 +87,16 @@ namespace CIAOX11 /// Administration which components are instantiated in which container using INSTANCE_CONTAINER = std::map ; - /// maps instance ids to containers. + /// Maps instance ids to containers. INSTANCE_CONTAINER instance_container_; /// Administers configuration of instances using INSTANCE_CONFIG = std::map ; - /// maps container ids to configuration. + /// Maps container ids to configuration. INSTANCE_CONFIG container_config_; - /// maps instance ids to configuration. + /// Maps instance ids to configuration. INSTANCE_CONFIG instance_config_; }; From fc03f738863c7a60eeb66e5ac5f676cd2a356674 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 16 Aug 2023 11:45:04 +0200 Subject: [PATCH 3/5] Removed more redundant std::pair typedefs * connectors/psdd4ccm/impl/psdd4ccm_config_util.h: * exf/deployment/scheduler/ciaox11_exf_scheduler_i.cpp: * exf/deployment/scheduler/ciaox11_exf_scheduler_i.h: --- connectors/psdd4ccm/impl/psdd4ccm_config_util.h | 6 ++---- exf/deployment/scheduler/ciaox11_exf_scheduler_i.cpp | 4 ++-- exf/deployment/scheduler/ciaox11_exf_scheduler_i.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/connectors/psdd4ccm/impl/psdd4ccm_config_util.h b/connectors/psdd4ccm/impl/psdd4ccm_config_util.h index c46fce2f7..fb9dd0c6a 100644 --- a/connectors/psdd4ccm/impl/psdd4ccm_config_util.h +++ b/connectors/psdd4ccm/impl/psdd4ccm_config_util.h @@ -16,14 +16,12 @@ namespace PSDD { namespace Util { - typedef std::pair property_pair_t; typedef std::map property_map_t; - inline void build_property_map (const ::Components::ConfigValues &values, - property_map_t& map) + inline void build_property_map (const ::Components::ConfigValues &values, property_map_t& map) { for (const ::Components::ConfigValue& v : values) - map.insert (property_pair_t (v.name (), v.value ())); + map.insert (std::pair{v.name (), v.value ()}); } } diff --git a/exf/deployment/scheduler/ciaox11_exf_scheduler_i.cpp b/exf/deployment/scheduler/ciaox11_exf_scheduler_i.cpp index ae980eb57..bb77ae134 100644 --- a/exf/deployment/scheduler/ciaox11_exf_scheduler_i.cpp +++ b/exf/deployment/scheduler/ciaox11_exf_scheduler_i.cpp @@ -426,7 +426,7 @@ namespace CIAOX11 } // register group dispatcher - this->groups_.insert (GROUP_PAIR (lane_group, GROUP_ENTRY {dispatcher})); + this->groups_.insert (std::pair{lane_group, GROUP_ENTRY {dispatcher}}); CIAOX11_EXF_LOG_DEBUG ("ExF::Impl::Scheduler::open_scheduling_lane - "\ "opening dispatch gate for " << instance_id << @@ -517,7 +517,7 @@ namespace CIAOX11 CIAOX11_EXF_LOG_DEBUG ("ExF::Impl::Scheduler::open_scheduling_lane - "\ "registering scheduling lane for " << instance_id); // register lane - this->lanes_.insert (LANE_PAIR (instance_id, lane_entry)); + this->lanes_.insert (std::pair{instance_id, lane_entry}); std::swap (lane, lane_entry.lane_); } } // leave lock scope diff --git a/exf/deployment/scheduler/ciaox11_exf_scheduler_i.h b/exf/deployment/scheduler/ciaox11_exf_scheduler_i.h index a70b920b4..9d024f5c7 100644 --- a/exf/deployment/scheduler/ciaox11_exf_scheduler_i.h +++ b/exf/deployment/scheduler/ciaox11_exf_scheduler_i.h @@ -94,7 +94,6 @@ namespace CIAOX11 std::string group_ {}; }; - using LANE_PAIR = std::pair; using LANE_MAP = std::map; struct GROUP_ENTRY @@ -108,7 +107,6 @@ namespace CIAOX11 uint32_t lane_count_ {}; }; - using GROUP_PAIR = std::pair; using GROUP_MAP = std::map; LANE_MAP lanes_ {}; From ebc69b9720b3e923e825667c0649d90dfc10e79a Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 16 Aug 2023 12:09:27 +0200 Subject: [PATCH 4/5] Layout changes * ciaox11/deployment/handlers/ciaox11_component_handler.cpp: * exf/deployment/handlers/ciaox11_exf_component_handler.cpp: --- ciaox11/deployment/handlers/ciaox11_component_handler.cpp | 6 ++---- exf/deployment/handlers/ciaox11_exf_component_handler.cpp | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ciaox11/deployment/handlers/ciaox11_component_handler.cpp b/ciaox11/deployment/handlers/ciaox11_component_handler.cpp index 84bd58749..a1bae3c79 100644 --- a/ciaox11/deployment/handlers/ciaox11_component_handler.cpp +++ b/ciaox11/deployment/handlers/ciaox11_component_handler.cpp @@ -375,10 +375,8 @@ namespace CIAOX11 CIAOX11_LOG_DEBUG ("Component_Handler::install_instance - " << "Starting installation for <" << idd.name () << ">"); - DAnCEX11::Utility::build_property_map (info.pmap, - mdd.execParameter ()); - DAnCEX11::Utility::build_property_map (info.pmap, - idd.configProperty ()); + DAnCEX11::Utility::build_property_map (info.pmap, mdd.execParameter ()); + DAnCEX11::Utility::build_property_map (info.pmap, idd.configProperty ()); std::string exec_art, exec_entry, svnt_art, svnt_entry, cont_id, tmp, error_string; diff --git a/exf/deployment/handlers/ciaox11_exf_component_handler.cpp b/exf/deployment/handlers/ciaox11_exf_component_handler.cpp index 9659f0f18..081104a57 100644 --- a/exf/deployment/handlers/ciaox11_exf_component_handler.cpp +++ b/exf/deployment/handlers/ciaox11_exf_component_handler.cpp @@ -30,10 +30,8 @@ namespace CIAOX11 CIAOX11_LOG_DEBUG ("ExF::Component_Handler::install_instance - " << "Starting installation for <" << idd.name () << ">"); - DAnCEX11::Utility::build_property_map (info.pmap, - mdd.execParameter ()); - DAnCEX11::Utility::build_property_map (info.pmap, - idd.configProperty ()); + DAnCEX11::Utility::build_property_map (info.pmap, mdd.execParameter ()); + DAnCEX11::Utility::build_property_map (info.pmap, idd.configProperty ()); std::string exec_art, exec_entry, svnt_art, svnt_entry, cont_id, tmp, error_string; From 2476b725d8bb73efa74addda927a334d8b45bd0e Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Tue, 22 Aug 2023 14:25:21 +0200 Subject: [PATCH 5/5] Minor layout change * exf/connectors/tt4ccm/impl/exf/ciaox11_timed_trigger_exf_exec.cpp: * exf/ridlbe/ccmx11/facets/exf4ami/templates/acon/hdr/exf/facet_exec.erb: --- .../tt4ccm/impl/exf/ciaox11_timed_trigger_exf_exec.cpp | 1 - .../facets/exf4ami/templates/acon/hdr/exf/facet_exec.erb | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/exf/connectors/tt4ccm/impl/exf/ciaox11_timed_trigger_exf_exec.cpp b/exf/connectors/tt4ccm/impl/exf/ciaox11_timed_trigger_exf_exec.cpp index bd2246972..4501315a9 100644 --- a/exf/connectors/tt4ccm/impl/exf/ciaox11_timed_trigger_exf_exec.cpp +++ b/exf/connectors/tt4ccm/impl/exf/ciaox11_timed_trigger_exf_exec.cpp @@ -84,7 +84,6 @@ namespace CIAOX11_TT_TimedTrigger_Impl return {}; } - // generated from ccmx11/exf4cc/comp_exec/src/corba/exf/component_extra_impl.erb void tt_scheduler_exec_i::set_config ( const ::Components::ConfigValues& config) { diff --git a/exf/ridlbe/ccmx11/facets/exf4ami/templates/acon/hdr/exf/facet_exec.erb b/exf/ridlbe/ccmx11/facets/exf4ami/templates/acon/hdr/exf/facet_exec.erb index ea102a454..11c255570 100644 --- a/exf/ridlbe/ccmx11/facets/exf4ami/templates/acon/hdr/exf/facet_exec.erb +++ b/exf/ridlbe/ccmx11/facets/exf4ami/templates/acon/hdr/exf/facet_exec.erb @@ -31,8 +31,7 @@ public: //@} %end - void - set_config(const ::Components::ConfigValues& config); + void set_config(const ::Components::ConfigValues& config); private: /// Context for component instance. Used for all middleware communication.