From c27e570409026134c3c128194e86008e0b82fbe8 Mon Sep 17 00:00:00 2001 From: EduPonz Date: Tue, 26 Mar 2024 10:59:19 +0100 Subject: [PATCH] Refs #20592: Fix hidden overloaded virtual methods Signed-off-by: EduPonz --- .github/workflows/reusable-ubuntu-ci.yml | 2 +- examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h | 6 ++++++ examples/cpp/rtps/Persistent/TestReaderPersistent.h | 4 ++++ examples/cpp/rtps/Persistent/TestWriterPersistent.h | 4 ++++ examples/cpp/rtps/Registered/TestReaderRegistered.h | 4 ++++ examples/cpp/rtps/Registered/TestWriterRegistered.h | 4 ++++ include/fastrtps/subscriber/SubscriberHistory.h | 3 +++ src/cpp/fastdds/domain/DomainParticipantImpl.hpp | 5 +++++ src/cpp/fastdds/publisher/DataWriterImpl.hpp | 4 ++++ src/cpp/fastdds/subscriber/DataReaderImpl.hpp | 4 ++++ .../fastrtps_deprecated/participant/ParticipantImpl.h | 6 ++++++ src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h | 4 ++++ src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h | 4 ++++ src/cpp/rtps/DataSharing/ReaderPool.hpp | 2 ++ src/cpp/rtps/DataSharing/WriterPool.hpp | 2 ++ src/cpp/rtps/builtin/discovery/participant/PDPClient.h | 4 ++-- .../discovery/participant/timedevent/DSClientEvent.cpp | 3 ++- src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp | 2 ++ .../BasicPayloadPool_impl/PreallocatedWithRealloc.hpp | 2 ++ src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp | 4 ++++ .../history/TopicPayloadPool_impl/DynamicReusable.hpp | 4 ++++ .../rtps/history/TopicPayloadPool_impl/Preallocated.hpp | 2 ++ .../TopicPayloadPool_impl/PreallocatedWithRealloc.hpp | 2 ++ test/blackbox/api/dds-pim/PubSubParticipant.hpp | 2 ++ test/blackbox/api/dds-pim/PubSubReader.hpp | 3 +++ test/blackbox/api/dds-pim/PubSubWriter.hpp | 4 ++++ test/blackbox/api/dds-pim/PubSubWriterReader.hpp | 4 ++++ test/blackbox/common/DDSBlackboxTestsBasic.cpp | 7 ++++++- test/blackbox/common/DDSBlackboxTestsDiscovery.cpp | 9 +++++++++ test/blackbox/common/DDSBlackboxTestsFindTopic.cpp | 8 +++++++- test/blackbox/common/RTPSWithRegistrationReader.hpp | 2 ++ test/blackbox/common/RTPSWithRegistrationWriter.hpp | 2 ++ test/dds/communication/PublisherDynamic.cpp | 2 ++ test/dds/communication/PublisherModule.hpp | 2 ++ test/dds/communication/SubscriberDynamic.cpp | 2 ++ test/dds/communication/SubscriberModule.hpp | 2 ++ test/dds/discovery/ParticipantModule.hpp | 2 ++ .../rtps/participant/RTPSParticipantImpl.h | 4 ++++ test/performance/latency/LatencyTestTypes.hpp | 4 ++++ test/performance/throughput/ThroughputTypes.hpp | 4 ++++ test/unittest/dds/participant/ParticipantTests.cpp | 5 +++++ test/unittest/dds/publisher/DataWriterTests.cpp | 7 +++++++ test/unittest/dds/publisher/PublisherTests.cpp | 3 +++ test/unittest/dds/status/ListenerTests.cpp | 4 ++++ test/unittest/dds/subscriber/DataReaderHistoryTests.cpp | 9 ++++++++- test/unittest/dds/subscriber/DataReaderTests.cpp | 4 ++++ test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp | 3 +++ test/unittest/dds/subscriber/FooTypeSupport.hpp | 3 +++ test/unittest/dds/topic/TopicTests.cpp | 4 ++++ .../statistics/dds/StatisticsDomainParticipantTests.cpp | 4 ++++ 50 files changed, 183 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 6414e02194f..a2341d240af 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -97,7 +97,7 @@ jobs: colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta colcon_build_args: ${{ inputs.colcon-args }} cmake_args: ${{ inputs.cmake-args }} - cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall" + cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wpedantic -Wunused-value -Woverloaded-virtual" -DFASTDDS_EXAMPLE_TESTS=ON cmake_build_type: ${{ matrix.cmake-build-type }} workspace: ${{ github.workspace }} diff --git a/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h b/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h index 2dc110e0fe9..154decdf689 100644 --- a/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h +++ b/examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h @@ -101,9 +101,15 @@ class LivelinessSubscriber class PartListener : public eprosima::fastdds::dds::DomainParticipantListener { + public: + virtual void on_participant_discovery( eprosima::fastdds::dds::DomainParticipant* participant, eprosima::fastrtps::rtps::ParticipantDiscoveryInfo&& info) override; + + private: + + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; }; PartListener part_listener_; diff --git a/examples/cpp/rtps/Persistent/TestReaderPersistent.h b/examples/cpp/rtps/Persistent/TestReaderPersistent.h index b23b1e49399..b55f4aa9cdc 100644 --- a/examples/cpp/rtps/Persistent/TestReaderPersistent.h +++ b/examples/cpp/rtps/Persistent/TestReaderPersistent.h @@ -66,6 +66,10 @@ class TestReaderPersistent uint32_t n_received; uint32_t n_matched; + + private: + + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; } m_listener; }; diff --git a/examples/cpp/rtps/Persistent/TestWriterPersistent.h b/examples/cpp/rtps/Persistent/TestWriterPersistent.h index 41b00ef7c6c..6ea3716369f 100644 --- a/examples/cpp/rtps/Persistent/TestWriterPersistent.h +++ b/examples/cpp/rtps/Persistent/TestWriterPersistent.h @@ -62,6 +62,10 @@ class TestWriterPersistent } int n_matched; + + private: + + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; } m_listener; }; diff --git a/examples/cpp/rtps/Registered/TestReaderRegistered.h b/examples/cpp/rtps/Registered/TestReaderRegistered.h index 207b54254da..3c1799b7654 100644 --- a/examples/cpp/rtps/Registered/TestReaderRegistered.h +++ b/examples/cpp/rtps/Registered/TestReaderRegistered.h @@ -66,6 +66,10 @@ class TestReaderRegistered uint32_t n_received; uint32_t n_matched; + + private: + + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; } m_listener; }; diff --git a/examples/cpp/rtps/Registered/TestWriterRegistered.h b/examples/cpp/rtps/Registered/TestWriterRegistered.h index 7263ee013c1..110d176e4a4 100644 --- a/examples/cpp/rtps/Registered/TestWriterRegistered.h +++ b/examples/cpp/rtps/Registered/TestWriterRegistered.h @@ -62,6 +62,10 @@ class TestWriterRegistered } int n_matched; + + private: + + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; } m_listener; }; diff --git a/include/fastrtps/subscriber/SubscriberHistory.h b/include/fastrtps/subscriber/SubscriberHistory.h index be94ed6a291..21839649b12 100644 --- a/include/fastrtps/subscriber/SubscriberHistory.h +++ b/include/fastrtps/subscriber/SubscriberHistory.h @@ -179,6 +179,9 @@ class SubscriberHistory : public rtps::ReaderHistory private: + using rtps::ReaderHistory::completed_change; + using rtps::ReaderHistory::received_change; + using t_m_Inst_Caches = std::map; //!Map where keys are instance handles and values vectors of cache changes diff --git a/src/cpp/fastdds/domain/DomainParticipantImpl.hpp b/src/cpp/fastdds/domain/DomainParticipantImpl.hpp index ae11876d443..d9c5df6e5cb 100644 --- a/src/cpp/fastdds/domain/DomainParticipantImpl.hpp +++ b/src/cpp/fastdds/domain/DomainParticipantImpl.hpp @@ -717,6 +717,11 @@ class DomainParticipantImpl DomainParticipantImpl* participant_; int callback_counter_ = 0; + private: + + using fastrtps::rtps::RTPSParticipantListener::onParticipantDiscovery; + using fastrtps::rtps::RTPSParticipantListener::onReaderDiscovery; + using fastrtps::rtps::RTPSParticipantListener::onWriterDiscovery; } rtps_listener_; diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.hpp b/src/cpp/fastdds/publisher/DataWriterImpl.hpp index 6b421ec7b2f..760b039c8aa 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.hpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.hpp @@ -454,6 +454,10 @@ class DataWriterImpl : protected rtps::IReaderDataFilter const fastrtps::rtps::ReaderProxyData* reader_info) override; DataWriterImpl* data_writer_; + + private: + + using fastrtps::rtps::WriterListener::onWriterMatched; } writer_listener_; diff --git a/src/cpp/fastdds/subscriber/DataReaderImpl.hpp b/src/cpp/fastdds/subscriber/DataReaderImpl.hpp index faed35ec4e0..04c4d51b6f4 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl.hpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl.hpp @@ -446,6 +446,10 @@ class DataReaderImpl const fastrtps::rtps::CacheChange_t* const change) override; DataReaderImpl* data_reader_; + + private: + + using fastrtps::rtps::ReaderListener::onReaderMatched; } reader_listener_; diff --git a/src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h b/src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h index 37ba3eabf96..a0165ac0c75 100644 --- a/src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h +++ b/src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h @@ -233,6 +233,12 @@ class ParticipantImpl ParticipantImpl* mp_participantimpl; + private: + + using rtps::RTPSParticipantListener::onParticipantDiscovery; + using rtps::RTPSParticipantListener::onReaderDiscovery; + using rtps::RTPSParticipantListener::onWriterDiscovery; + } m_rtps_listener; diff --git a/src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h b/src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h index b86a83fea6c..ca0db2822b0 100644 --- a/src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h +++ b/src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h @@ -243,6 +243,10 @@ class PublisherImpl const LivelinessLostStatus& status) override; PublisherImpl* mp_publisherImpl; + + private: + + using rtps::WriterListener::onWriterMatched; } m_writerListener; diff --git a/src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h b/src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h index 18ed81d8f99..49429570bfd 100644 --- a/src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h +++ b/src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h @@ -221,6 +221,10 @@ class SubscriberImpl rtps::RTPSReader* reader, const LivelinessChangedStatus& status) override; SubscriberImpl* mp_subscriberImpl; + + private: + + using rtps::ReaderListener::onReaderMatched; } m_readerListener; diff --git a/src/cpp/rtps/DataSharing/ReaderPool.hpp b/src/cpp/rtps/DataSharing/ReaderPool.hpp index 788c49cdbf6..136276a30ec 100644 --- a/src/cpp/rtps/DataSharing/ReaderPool.hpp +++ b/src/cpp/rtps/DataSharing/ReaderPool.hpp @@ -284,6 +284,8 @@ class ReaderPool : public DataSharingPayloadPool private: + using DataSharingPayloadPool::init_shared_memory; + bool is_volatile_; //< Whether the reader is volatile or not uint64_t next_payload_; //< Index of the next history position to read SequenceNumber_t last_sn_; //< Sequence number of the last read payload diff --git a/src/cpp/rtps/DataSharing/WriterPool.hpp b/src/cpp/rtps/DataSharing/WriterPool.hpp index 270d09c2c9e..c37b83975c9 100644 --- a/src/cpp/rtps/DataSharing/WriterPool.hpp +++ b/src/cpp/rtps/DataSharing/WriterPool.hpp @@ -353,6 +353,8 @@ class WriterPool : public DataSharingPayloadPool private: + using DataSharingPayloadPool::init_shared_memory; + octet* payloads_pool_; //< Shared pool of payloads uint32_t max_data_size_; //< Maximum size of the serialized payload data diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h index e7053c3f1e4..6baae742c8d 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPClient.h +++ b/src/cpp/rtps/builtin/discovery/participant/PDPClient.h @@ -109,8 +109,8 @@ class PDPClient : public PDP */ void announceParticipantState( bool new_change, - bool dispose = false, - WriteParams& wparams = WriteParams::WRITE_PARAM_DEFAULT) override; + bool dispose, + WriteParams& wparams) override; /** * These methods wouldn't be needed under perfect server operation diff --git a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp index 4621a6adaf4..5563d42d4e7 100644 --- a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp @@ -90,7 +90,8 @@ bool DSClientEvent::event() // This marks to announceParticipantState that the announcement is only meant for missing servers, // so it is not a periodic announcement mp_PDP->_serverPing = true; - mp_PDP->announceParticipantState(false); + WriteParams __wp = WriteParams(); + mp_PDP->announceParticipantState(false, false, __wp); EPROSIMA_LOG_INFO(CLIENT_PDP_THREAD, "Client " << mp_PDP->getRTPSParticipant()->getGuid() << " PDP announcement"); } diff --git a/src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp b/src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp index 76fa7e42f14..b483b3b548d 100644 --- a/src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp +++ b/src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp @@ -18,6 +18,8 @@ class BaseImpl : public IPayloadPool { +public: + bool get_payload( uint32_t size, CacheChange_t& cache_change) override diff --git a/src/cpp/rtps/history/BasicPayloadPool_impl/PreallocatedWithRealloc.hpp b/src/cpp/rtps/history/BasicPayloadPool_impl/PreallocatedWithRealloc.hpp index e54c2a3ca2f..730d06f3933 100644 --- a/src/cpp/rtps/history/BasicPayloadPool_impl/PreallocatedWithRealloc.hpp +++ b/src/cpp/rtps/history/BasicPayloadPool_impl/PreallocatedWithRealloc.hpp @@ -39,5 +39,7 @@ class Impl : public BaseImpl private: + using BaseImpl::get_payload; + uint32_t min_payload_size_; }; diff --git a/src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp b/src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp index 889dd3b12ae..258a9baa685 100644 --- a/src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp +++ b/src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp @@ -86,6 +86,10 @@ class DynamicTopicPayloadPool : public TopicPayloadPool return DYNAMIC_RESERVE_MEMORY_MODE; } +private: + + using TopicPayloadPool::get_payload; + }; } // namespace rtps diff --git a/src/cpp/rtps/history/TopicPayloadPool_impl/DynamicReusable.hpp b/src/cpp/rtps/history/TopicPayloadPool_impl/DynamicReusable.hpp index 3cc7b54f789..3d04330c0f6 100644 --- a/src/cpp/rtps/history/TopicPayloadPool_impl/DynamicReusable.hpp +++ b/src/cpp/rtps/history/TopicPayloadPool_impl/DynamicReusable.hpp @@ -41,6 +41,10 @@ class DynamicReusableTopicPayloadPool : public TopicPayloadPool return DYNAMIC_REUSABLE_MEMORY_MODE; } +private: + + using TopicPayloadPool::get_payload; + }; } // namespace rtps diff --git a/src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp b/src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp index aa4bc67fff1..99ed905664c 100644 --- a/src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp +++ b/src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp @@ -80,6 +80,8 @@ class PreallocatedTopicPayloadPool : public TopicPayloadPool private: + using TopicPayloadPool::get_payload; + uint32_t payload_size_; uint32_t minimum_pool_size_; //< Minimum initial pool size (sum of all histories) }; diff --git a/src/cpp/rtps/history/TopicPayloadPool_impl/PreallocatedWithRealloc.hpp b/src/cpp/rtps/history/TopicPayloadPool_impl/PreallocatedWithRealloc.hpp index 75e0cf1c68d..d8ed34b41e2 100644 --- a/src/cpp/rtps/history/TopicPayloadPool_impl/PreallocatedWithRealloc.hpp +++ b/src/cpp/rtps/history/TopicPayloadPool_impl/PreallocatedWithRealloc.hpp @@ -80,6 +80,8 @@ class PreallocatedReallocTopicPayloadPool : public TopicPayloadPool private: + using TopicPayloadPool::get_payload; + uint32_t min_payload_size_; uint32_t minimum_pool_size_; //< Minimum initial pool size (sum of all histories) }; diff --git a/test/blackbox/api/dds-pim/PubSubParticipant.hpp b/test/blackbox/api/dds-pim/PubSubParticipant.hpp index 2ff2b5aaeff..ceee9578df4 100644 --- a/test/blackbox/api/dds-pim/PubSubParticipant.hpp +++ b/test/blackbox/api/dds-pim/PubSubParticipant.hpp @@ -192,6 +192,8 @@ class PubSubParticipant private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + ParticipantListener& operator =( const ParticipantListener&) = delete; PubSubParticipant* participant_; diff --git a/test/blackbox/api/dds-pim/PubSubReader.hpp b/test/blackbox/api/dds-pim/PubSubReader.hpp index 977714c09f3..e89d8479ff4 100644 --- a/test/blackbox/api/dds-pim/PubSubReader.hpp +++ b/test/blackbox/api/dds-pim/PubSubReader.hpp @@ -142,6 +142,9 @@ class PubSubReader private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery; + ParticipantListener& operator =( const ParticipantListener&) = delete; PubSubReader& reader_; diff --git a/test/blackbox/api/dds-pim/PubSubWriter.hpp b/test/blackbox/api/dds-pim/PubSubWriter.hpp index 4f1eab7bdd9..26b3552cbf1 100644 --- a/test/blackbox/api/dds-pim/PubSubWriter.hpp +++ b/test/blackbox/api/dds-pim/PubSubWriter.hpp @@ -156,6 +156,10 @@ class PubSubWriter private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_subscriber_discovery; + ParticipantListener& operator =( const ParticipantListener&) = delete; diff --git a/test/blackbox/api/dds-pim/PubSubWriterReader.hpp b/test/blackbox/api/dds-pim/PubSubWriterReader.hpp index ab9b4a80d5e..c81ba1a0701 100644 --- a/test/blackbox/api/dds-pim/PubSubWriterReader.hpp +++ b/test/blackbox/api/dds-pim/PubSubWriterReader.hpp @@ -168,6 +168,10 @@ class PubSubWriterReader private: + using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery; + using eprosima::fastdds::dds::DomainParticipantListener::on_subscriber_discovery; + //! Mutex guarding all info collections mutable std::mutex info_mutex_; //! The discovered participants excluding the participant this listener is listening to diff --git a/test/blackbox/common/DDSBlackboxTestsBasic.cpp b/test/blackbox/common/DDSBlackboxTestsBasic.cpp index 1510051e447..32ebb797d19 100644 --- a/test/blackbox/common/DDSBlackboxTestsBasic.cpp +++ b/test/blackbox/common/DDSBlackboxTestsBasic.cpp @@ -477,8 +477,10 @@ TEST(DDSBasic, PidRelatedSampleIdentity) TEST(DDSBasic, IgnoreParticipant) { - struct IgnoringDomainParticipantListener : public DomainParticipantListener + class IgnoringDomainParticipantListener : public DomainParticipantListener { + public: + std::atomic_int num_matched{0}; std::atomic_int num_ignored{0}; @@ -505,6 +507,9 @@ TEST(DDSBasic, IgnoreParticipant) } } + private: + + using DomainParticipantListener::on_participant_discovery; }; // Set DomainParticipantFactory to create disabled entities DomainParticipantFactoryQos factory_qos; diff --git a/test/blackbox/common/DDSBlackboxTestsDiscovery.cpp b/test/blackbox/common/DDSBlackboxTestsDiscovery.cpp index dbac548bfed..03f88fdcf60 100644 --- a/test/blackbox/common/DDSBlackboxTestsDiscovery.cpp +++ b/test/blackbox/common/DDSBlackboxTestsDiscovery.cpp @@ -451,6 +451,8 @@ TEST(DDSDiscovery, ParticipantProxyPhysicalData) private: + using DomainParticipantListener::on_participant_discovery; + std::condition_variable* cv_; std::mutex* mtx_; @@ -616,6 +618,9 @@ TEST(DDSDiscovery, DDSDiscoveryDoesNotDropUDPLocator) } } + private: + + using DomainParticipantListener::on_participant_discovery; }; DomainParticipantFactory* factory = DomainParticipantFactory::get_instance(); @@ -1664,6 +1669,10 @@ TEST(DDSDiscovery, DataracePDP) std::promise undiscovery_promise; std::future undiscovery_future; + + private: + + using DomainParticipantListener::on_participant_discovery; }; // Disable intraprocess diff --git a/test/blackbox/common/DDSBlackboxTestsFindTopic.cpp b/test/blackbox/common/DDSBlackboxTestsFindTopic.cpp index eb207896720..ce274a7aab7 100644 --- a/test/blackbox/common/DDSBlackboxTestsFindTopic.cpp +++ b/test/blackbox/common/DDSBlackboxTestsFindTopic.cpp @@ -49,8 +49,10 @@ class DDSFindTopicTest : public testing::Test /** * A dummy type support class. */ - struct TestType : public TopicDataType + class TestType : public TopicDataType { + public: + TestType() : TopicDataType() { @@ -96,6 +98,10 @@ class DDSFindTopicTest : public testing::Test return false; } + private: + + using TopicDataType::getSerializedSizeProvider; + using TopicDataType::serialize; }; public: diff --git a/test/blackbox/common/RTPSWithRegistrationReader.hpp b/test/blackbox/common/RTPSWithRegistrationReader.hpp index dc12c4c9b04..08ce30251a8 100644 --- a/test/blackbox/common/RTPSWithRegistrationReader.hpp +++ b/test/blackbox/common/RTPSWithRegistrationReader.hpp @@ -110,6 +110,8 @@ class RTPSWithRegistrationReader private: + using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched; + Listener& operator =( const Listener&) = delete; diff --git a/test/blackbox/common/RTPSWithRegistrationWriter.hpp b/test/blackbox/common/RTPSWithRegistrationWriter.hpp index c24c2ca322b..358813f1116 100644 --- a/test/blackbox/common/RTPSWithRegistrationWriter.hpp +++ b/test/blackbox/common/RTPSWithRegistrationWriter.hpp @@ -97,6 +97,8 @@ class RTPSWithRegistrationWriter private: + using eprosima::fastrtps::rtps::WriterListener::onWriterMatched; + Listener& operator =( const Listener&) = delete; diff --git a/test/dds/communication/PublisherDynamic.cpp b/test/dds/communication/PublisherDynamic.cpp index b58edf411ec..a9585151827 100644 --- a/test/dds/communication/PublisherDynamic.cpp +++ b/test/dds/communication/PublisherDynamic.cpp @@ -114,6 +114,8 @@ class ParListener : public DomainParticipantListener private: + using DomainParticipantListener::on_participant_discovery; + bool exit_on_lost_liveliness_; }; diff --git a/test/dds/communication/PublisherModule.hpp b/test/dds/communication/PublisherModule.hpp index 91b04db5e54..fb144821a0a 100644 --- a/test/dds/communication/PublisherModule.hpp +++ b/test/dds/communication/PublisherModule.hpp @@ -85,6 +85,8 @@ class PublisherModule private: + using DomainParticipantListener::on_participant_discovery; + std::mutex mutex_; std::condition_variable cv_; unsigned int matched_ = 0; diff --git a/test/dds/communication/SubscriberDynamic.cpp b/test/dds/communication/SubscriberDynamic.cpp index f3276601d90..dae0f6cd866 100644 --- a/test/dds/communication/SubscriberDynamic.cpp +++ b/test/dds/communication/SubscriberDynamic.cpp @@ -150,6 +150,8 @@ class ParListener : public DomainParticipantListener private: + using DomainParticipantListener::on_participant_discovery; + std::promise is_worth_a_type_; }; diff --git a/test/dds/communication/SubscriberModule.hpp b/test/dds/communication/SubscriberModule.hpp index 9b7751452e1..e8559128440 100644 --- a/test/dds/communication/SubscriberModule.hpp +++ b/test/dds/communication/SubscriberModule.hpp @@ -92,6 +92,8 @@ class SubscriberModule private: + using DomainParticipantListener::on_participant_discovery; + std::mutex mutex_; std::condition_variable cv_; const uint32_t publishers_ = 0; diff --git a/test/dds/discovery/ParticipantModule.hpp b/test/dds/discovery/ParticipantModule.hpp index dc7d190bef3..53073911104 100644 --- a/test/dds/discovery/ParticipantModule.hpp +++ b/test/dds/discovery/ParticipantModule.hpp @@ -52,6 +52,8 @@ class ParticipantModule : public DomainParticipantListener private: + using DomainParticipantListener::on_participant_discovery; + unsigned int matched_ = 0; DomainParticipant* participant_ = nullptr; DiscoveryProtocol_t discovery_protocol_; diff --git a/test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h b/test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h index 2812fbabc54..72cb3e89ac3 100644 --- a/test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h +++ b/test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h @@ -85,6 +85,10 @@ class MockParticipantListener : public RTPSParticipantListener MOCK_METHOD2(onParticipantAuthentication, void (RTPSParticipant*, const ParticipantAuthenticationInfo&)); #endif // if HAVE_SECURITY + +private: + + using RTPSParticipantListener::onParticipantDiscovery; }; class RTPSParticipantImpl diff --git a/test/performance/latency/LatencyTestTypes.hpp b/test/performance/latency/LatencyTestTypes.hpp index b288cd8b6fa..a675110fcbf 100644 --- a/test/performance/latency/LatencyTestTypes.hpp +++ b/test/performance/latency/LatencyTestTypes.hpp @@ -142,6 +142,10 @@ class LatencyDataType : public eprosima::fastdds::dds::TopicDataType // Name static const std::string type_name_; + +private: + + using eprosima::fastrtps::TopicDataType::is_plain; }; enum TESTCOMMAND : uint32_t diff --git a/test/performance/throughput/ThroughputTypes.hpp b/test/performance/throughput/ThroughputTypes.hpp index d62abd894ae..1ff9f06a2ac 100644 --- a/test/performance/throughput/ThroughputTypes.hpp +++ b/test/performance/throughput/ThroughputTypes.hpp @@ -179,6 +179,10 @@ class ThroughputDataType : public eprosima::fastrtps::TopicDataType // Name static const std::string type_name_; + +private: + + using eprosima::fastrtps::TopicDataType::is_plain; }; enum e_Command : uint32_t diff --git a/test/unittest/dds/participant/ParticipantTests.cpp b/test/unittest/dds/participant/ParticipantTests.cpp index e5077ffbb4e..c3741815c60 100644 --- a/test/unittest/dds/participant/ParticipantTests.cpp +++ b/test/unittest/dds/participant/ParticipantTests.cpp @@ -219,6 +219,9 @@ class LoanableTopicDataTypeMock : public TopicDataType return true; } +private: + + using TopicDataType::is_plain; }; class BarType @@ -2403,6 +2406,8 @@ class CustomListener2 : public DomainParticipantListener { public: + using DomainParticipantListener::on_participant_discovery; + CustomListener2() : future_(promise_.get_future()) { diff --git a/test/unittest/dds/publisher/DataWriterTests.cpp b/test/unittest/dds/publisher/DataWriterTests.cpp index 6d49620d227..224c09be10b 100644 --- a/test/unittest/dds/publisher/DataWriterTests.cpp +++ b/test/unittest/dds/publisher/DataWriterTests.cpp @@ -346,6 +346,10 @@ TEST(DataWriterTests, get_guid) fastrtps::rtps::GUID_t guid; std::mutex mutex; std::condition_variable cv; + + private: + + using DomainParticipantListener::on_publisher_discovery; } discovery_listener; @@ -1276,6 +1280,7 @@ class LoanableTypeSupport : public TopicDataType public: typedef LoanableType type; + using TopicDataType::is_plain; LoanableTypeSupport() : TopicDataType() @@ -1432,6 +1437,8 @@ class LoanableTypeSupportTesting : public LoanableTypeSupport { public: + using LoanableTypeSupport::is_plain; + bool is_plain_result = true; bool construct_sample_result = true; diff --git a/test/unittest/dds/publisher/PublisherTests.cpp b/test/unittest/dds/publisher/PublisherTests.cpp index d1671125c29..253a41e3780 100644 --- a/test/unittest/dds/publisher/PublisherTests.cpp +++ b/test/unittest/dds/publisher/PublisherTests.cpp @@ -161,6 +161,9 @@ class LoanableTopicDataTypeMock : public TopicDataType return true; } +private: + + using TopicDataType::is_plain; }; diff --git a/test/unittest/dds/status/ListenerTests.cpp b/test/unittest/dds/status/ListenerTests.cpp index ed4c3e962b1..61afbb40dcf 100644 --- a/test/unittest/dds/status/ListenerTests.cpp +++ b/test/unittest/dds/status/ListenerTests.cpp @@ -535,6 +535,10 @@ class TopicDataTypeMock : public TopicDataType return true; } +private: + + using TopicDataType::getSerializedSizeProvider; + using TopicDataType::serialize; }; class UserListeners : public ::testing::Test diff --git a/test/unittest/dds/subscriber/DataReaderHistoryTests.cpp b/test/unittest/dds/subscriber/DataReaderHistoryTests.cpp index fdc09b2f87d..5efd99bf2b6 100644 --- a/test/unittest/dds/subscriber/DataReaderHistoryTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderHistoryTests.cpp @@ -21,14 +21,21 @@ class TestType : public TopicDataType void* data, eprosima::fastrtps::rtps::SerializedPayload_t* payload)); + MOCK_METHOD3(serialize, bool( + void* data, + eprosima::fastrtps::rtps::SerializedPayload_t* payload, + DataRepresentationId_t data_representation)); + MOCK_METHOD2(deserialize, bool( eprosima::fastrtps::rtps::SerializedPayload_t* payload, void* data)); + MOCK_METHOD2(getSerializedSizeProvider, std::function ( + void* data, DataRepresentationId_t data_representation)); + MOCK_METHOD1(getSerializedSizeProvider, std::function ( void* data)); - MOCK_METHOD0(createData, void* ()); MOCK_METHOD1(deleteData, void( diff --git a/test/unittest/dds/subscriber/DataReaderTests.cpp b/test/unittest/dds/subscriber/DataReaderTests.cpp index abbc7a82762..fc397cce942 100644 --- a/test/unittest/dds/subscriber/DataReaderTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderTests.cpp @@ -588,6 +588,10 @@ TEST_F(DataReaderTests, get_guid) GUID_t guid; std::mutex mutex; std::condition_variable cv; + + private: + + using DomainParticipantListener::on_subscriber_discovery; } discovery_listener; diff --git a/test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp b/test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp index ec83066fa40..3f3cdb4a113 100644 --- a/test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp +++ b/test/unittest/dds/subscriber/FooBoundedTypeSupport.hpp @@ -144,6 +144,9 @@ class FooBoundedTypeSupport : public TopicDataType return false; } +private: + + using TopicDataType::is_plain; }; } // namespace dds diff --git a/test/unittest/dds/subscriber/FooTypeSupport.hpp b/test/unittest/dds/subscriber/FooTypeSupport.hpp index c85faf50c98..bcf70414eb7 100644 --- a/test/unittest/dds/subscriber/FooTypeSupport.hpp +++ b/test/unittest/dds/subscriber/FooTypeSupport.hpp @@ -169,6 +169,9 @@ class FooTypeSupport : public TopicDataType return true; } +private: + + using TopicDataType::is_plain; }; } // namespace dds diff --git a/test/unittest/dds/topic/TopicTests.cpp b/test/unittest/dds/topic/TopicTests.cpp index a5bb4c4aa9f..7f004619090 100644 --- a/test/unittest/dds/topic/TopicTests.cpp +++ b/test/unittest/dds/topic/TopicTests.cpp @@ -124,6 +124,10 @@ class TopicDataTypeMock : public TopicDataType return true; } +private: + + using TopicDataType::getSerializedSizeProvider; + using TopicDataType::serialize; }; TEST(TopicTests, ChangeTopicQos) diff --git a/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp b/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp index 50fc6ef1239..aaa34188199 100644 --- a/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp +++ b/test/unittest/statistics/dds/StatisticsDomainParticipantTests.cpp @@ -130,6 +130,10 @@ class TopicDataTypeMock : public eprosima::fastdds::dds::TopicDataType return true; } +private: + + using eprosima::fastdds::dds::TopicDataType::getSerializedSizeProvider; + using eprosima::fastdds::dds::TopicDataType::serialize; }; class StatisticsDomainParticipantTests : public ::testing::Test