From b232a8170b677b2a961070f8e4023e3a08915b5a Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Wed, 3 Jul 2024 13:16:53 +0200 Subject: [PATCH] Refs #21082. Snake case on public methods. Signed-off-by: Miguel Company --- include/fastdds/rtps/writer/RTPSWriter.hpp | 6 +-- src/cpp/fastdds/publisher/DataWriterImpl.cpp | 2 +- .../rtps/builtin/discovery/endpoint/EDP.cpp | 38 +++++++++---------- src/cpp/rtps/writer/BaseWriter.hpp | 4 +- src/cpp/rtps/writer/StatefulWriter.cpp | 2 +- src/cpp/rtps/writer/StatefulWriter.hpp | 2 +- src/cpp/rtps/writer/StatelessWriter.hpp | 2 +- test/blackbox/common/RTPSAsSocketWriter.hpp | 4 +- .../common/RTPSBlackboxTestsPositiveAck.cpp | 4 +- .../fastdds/rtps/writer/RTPSWriter.hpp | 4 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/include/fastdds/rtps/writer/RTPSWriter.hpp b/include/fastdds/rtps/writer/RTPSWriter.hpp index 09edd05f226..7cda37830d7 100644 --- a/include/fastdds/rtps/writer/RTPSWriter.hpp +++ b/include/fastdds/rtps/writer/RTPSWriter.hpp @@ -148,14 +148,14 @@ class RTPSWriter : public Endpoint * Update the Attributes of the Writer. * @param att New attributes */ - FASTDDS_EXPORTED_API virtual void updateAttributes( + FASTDDS_EXPORTED_API virtual void update_attributes( const WriterAttributes& att) = 0; /** * Get listener * @return Listener */ - FASTDDS_EXPORTED_API virtual WriterListener* getListener() const = 0; + FASTDDS_EXPORTED_API virtual WriterListener* get_listener() const = 0; /** * Set the listener. @@ -170,7 +170,7 @@ class RTPSWriter : public Endpoint * Get the publication mode * @return publication mode */ - FASTDDS_EXPORTED_API virtual bool isAsync() const = 0; + FASTDDS_EXPORTED_API virtual bool is_async() const = 0; /** * @brief Returns if disable positive ACKs QoS is enabled. diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.cpp b/src/cpp/fastdds/publisher/DataWriterImpl.cpp index 7600eec8699..2f64abf260b 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.cpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.cpp @@ -1218,7 +1218,7 @@ ReturnCode_t DataWriterImpl::set_qos( w_att.times = qos_.reliable_writer_qos().times; w_att.disable_positive_acks = qos_.reliable_writer_qos().disable_positive_acks.enabled; w_att.keep_duration = qos_.reliable_writer_qos().disable_positive_acks.duration; - writer_->updateAttributes(w_att); + writer_->update_attributes(w_att); } //Notify the participant that a Writer has changed its QOS diff --git a/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp b/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp index 1e77b9fc54b..44adc338911 100644 --- a/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp +++ b/src/cpp/rtps/builtin/discovery/endpoint/EDP.cpp @@ -464,7 +464,7 @@ bool EDP::unpairReaderProxy( #endif // if HAVE_SECURITY //MATCHED AND ADDED CORRECTLY: WriterListener* listener = nullptr; - if (nullptr != (listener = w.getListener())) + if (nullptr != (listener = w.get_listener())) { MatchingInfo info; info.status = REMOVED_MATCHING; @@ -877,21 +877,21 @@ bool EDP::pairingWriter( "RP:" << rdatait->guid() << " match W:" << W->getGuid() << ". WLoc:" << rdatait->remote_locators()); //MATCHED AND ADDED CORRECTLY: - if (W->getListener() != nullptr) + if (W->get_listener() != nullptr) { MatchingInfo info; info.status = MATCHED_MATCHING; info.remoteEndpointGuid = reader_guid; - W->getListener()->on_writer_matched(W, info); + W->get_listener()->on_writer_matched(W, info); } } #endif // if HAVE_SECURITY } else { - if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && W->getListener() != nullptr) + if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && W->get_listener() != nullptr) { - W->getListener()->on_offered_incompatible_qos(W, incompatible_qos); + W->get_listener()->on_offered_incompatible_qos(W, incompatible_qos); } //EPROSIMA_LOG_INFO(RTPS_EDP,RTPS_CYAN<<"Valid Matching to writerProxy: "<m_guid<security_manager().remove_reader(W->getGuid(), participant_guid, reader_guid); #endif // if HAVE_SECURITY //MATCHED AND ADDED CORRECTLY: - if (W->getListener() != nullptr) + if (W->get_listener() != nullptr) { MatchingInfo info; info.status = REMOVED_MATCHING; info.remoteEndpointGuid = reader_guid; - W->getListener()->on_writer_matched(W, info); + W->get_listener()->on_writer_matched(W, info); } } } @@ -952,21 +952,21 @@ bool EDP::pairing_reader_proxy_with_any_local_writer( "RP:" << rdata->guid() << " match W:" << w.getGuid() << ". RLoc:" << rdata->remote_locators()); //MATCHED AND ADDED CORRECTLY: - if (w.getListener() != nullptr) + if (w.get_listener() != nullptr) { MatchingInfo info; info.status = MATCHED_MATCHING; info.remoteEndpointGuid = reader_guid; - w.getListener()->on_writer_matched(&w, info); + w.get_listener()->on_writer_matched(&w, info); } } #endif // if HAVE_SECURITY } else { - if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && w.getListener() != nullptr) + if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && w.get_listener() != nullptr) { - w.getListener()->on_offered_incompatible_qos(&w, incompatible_qos); + w.get_listener()->on_offered_incompatible_qos(&w, incompatible_qos); } if (w.matched_reader_is_matched(reader_guid) @@ -977,12 +977,12 @@ bool EDP::pairing_reader_proxy_with_any_local_writer( w.getGuid(), participant_guid, reader_guid); #endif // if HAVE_SECURITY //MATCHED AND ADDED CORRECTLY: - if (w.getListener() != nullptr) + if (w.get_listener() != nullptr) { MatchingInfo info; info.status = REMOVED_MATCHING; info.remoteEndpointGuid = reader_guid; - w.getListener()->on_writer_matched(&w, info); + w.get_listener()->on_writer_matched(&w, info); } } } @@ -1032,9 +1032,9 @@ bool EDP::pairing_reader_proxy_with_local_writer( else { if (no_match_reason.test(MatchingFailureMask::incompatible_qos) && - w.getListener() != nullptr) + w.get_listener() != nullptr) { - w.getListener()->on_offered_incompatible_qos(&w, incompatible_qos); + w.get_listener()->on_offered_incompatible_qos(&w, incompatible_qos); } if (w.matched_reader_is_matched(reader_guid) @@ -1043,12 +1043,12 @@ bool EDP::pairing_reader_proxy_with_local_writer( mp_RTPSParticipant->security_manager().remove_reader(w.getGuid(), remote_participant_guid, reader_guid); //MATCHED AND ADDED CORRECTLY: - if (w.getListener() != nullptr) + if (w.get_listener() != nullptr) { MatchingInfo info; info.status = REMOVED_MATCHING; info.remoteEndpointGuid = reader_guid; - w.getListener()->on_writer_matched(&w, info); + w.get_listener()->on_writer_matched(&w, info); } } } @@ -1085,12 +1085,12 @@ bool EDP::pairing_remote_reader_with_local_writer_after_security( matched = true; //MATCHED AND ADDED CORRECTLY: - if (w.getListener() != nullptr) + if (w.get_listener() != nullptr) { MatchingInfo info; info.status = MATCHED_MATCHING; info.remoteEndpointGuid = reader_guid; - w.getListener()->on_writer_matched(&w, info); + w.get_listener()->on_writer_matched(&w, info); } } // don't look anymore diff --git a/src/cpp/rtps/writer/BaseWriter.hpp b/src/cpp/rtps/writer/BaseWriter.hpp index c879bbb7def..6d302c31e27 100644 --- a/src/cpp/rtps/writer/BaseWriter.hpp +++ b/src/cpp/rtps/writer/BaseWriter.hpp @@ -88,7 +88,7 @@ class BaseWriter return true; } - FASTDDS_EXPORTED_API WriterListener* getListener() const override + FASTDDS_EXPORTED_API WriterListener* get_listener() const override { return listener_; } @@ -100,7 +100,7 @@ class BaseWriter return true; } - FASTDDS_EXPORTED_API bool isAsync() const override + FASTDDS_EXPORTED_API bool is_async() const override { return is_async_; } diff --git a/src/cpp/rtps/writer/StatefulWriter.cpp b/src/cpp/rtps/writer/StatefulWriter.cpp index 1a394928497..a5679b998fe 100644 --- a/src/cpp/rtps/writer/StatefulWriter.cpp +++ b/src/cpp/rtps/writer/StatefulWriter.cpp @@ -1586,7 +1586,7 @@ bool StatefulWriter::wait_for_acknowledgement( /* * PARAMETER_RELATED METHODS */ -void StatefulWriter::updateAttributes( +void StatefulWriter::update_attributes( const WriterAttributes& att) { this->updateTimes(att.times); diff --git a/src/cpp/rtps/writer/StatefulWriter.hpp b/src/cpp/rtps/writer/StatefulWriter.hpp index cce26c4c84c..541490feb42 100644 --- a/src/cpp/rtps/writer/StatefulWriter.hpp +++ b/src/cpp/rtps/writer/StatefulWriter.hpp @@ -247,7 +247,7 @@ class StatefulWriter : public fastdds::rtps::BaseWriter * Update the Attributes of the Writer. * @param att New attributes */ - void updateAttributes( + void update_attributes( const WriterAttributes& att) override; /** diff --git a/src/cpp/rtps/writer/StatelessWriter.hpp b/src/cpp/rtps/writer/StatelessWriter.hpp index e056cef90af..b9dfbe82014 100644 --- a/src/cpp/rtps/writer/StatelessWriter.hpp +++ b/src/cpp/rtps/writer/StatelessWriter.hpp @@ -137,7 +137,7 @@ class StatelessWriter : public fastdds::rtps::BaseWriter * Update the Attributes of the Writer. * @param att New attributes */ - void updateAttributes( + void update_attributes( const WriterAttributes& att) override { (void)att; diff --git a/test/blackbox/common/RTPSAsSocketWriter.hpp b/test/blackbox/common/RTPSAsSocketWriter.hpp index 55baad09b80..498478cc9e1 100644 --- a/test/blackbox/common/RTPSAsSocketWriter.hpp +++ b/test/blackbox/common/RTPSAsSocketWriter.hpp @@ -308,10 +308,10 @@ class RTPSAsSocketWriter : public eprosima::fastdds::rtps::WriterListener } /*** Access RTPSWriter functions ***/ - void updateAttributes( + void update_attributes( const eprosima::fastdds::rtps::WriterAttributes& att) { - writer_->updateAttributes(att); + writer_->update_attributes(att); return; } diff --git a/test/blackbox/common/RTPSBlackboxTestsPositiveAck.cpp b/test/blackbox/common/RTPSBlackboxTestsPositiveAck.cpp index 57fda058004..27e28f59b26 100644 --- a/test/blackbox/common/RTPSBlackboxTestsPositiveAck.cpp +++ b/test/blackbox/common/RTPSBlackboxTestsPositiveAck.cpp @@ -72,7 +72,7 @@ TEST(RTPSAck, EnableUpdatabilityOfPositiveAcksPeriodRTPSLayer) w_att.disable_positive_acks = true; w_att.keep_duration = eprosima::fastdds::Duration_t(2, 0); - writer.updateAttributes(w_att); + writer.update_attributes(w_att); data = default_helloworld_data_generator(); @@ -97,7 +97,7 @@ TEST(RTPSAck, EnableUpdatabilityOfPositiveAcksPeriodRTPSLayer) // Update attributes at RTPS layer w_att.disable_positive_acks = false; - writer.updateAttributes(w_att); + writer.update_attributes(w_att); // Check that positive_acks feature is not changed at runtime EXPECT_TRUE(writer.get_disable_positive_acks()); diff --git a/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.hpp b/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.hpp index 2498e48bcb8..1b04901d2b8 100644 --- a/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.hpp +++ b/test/mock/rtps/RTPSWriter/fastdds/rtps/writer/RTPSWriter.hpp @@ -70,7 +70,7 @@ class RTPSWriter : public Endpoint return false; } - WriterListener* getListener() const + WriterListener* get_listener() const { return listener_; } @@ -129,7 +129,7 @@ class RTPSWriter : public Endpoint return m_att.endpoint; } - virtual void updateAttributes( + virtual void update_attributes( const WriterAttributes&) { }