From 368d1caa47ae60ba1a5cebedb089c056b9887c4d Mon Sep 17 00:00:00 2001 From: elianalf <62831776+elianalf@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:09:53 +0200 Subject: [PATCH] Refs #20818: Make ResourceEvent private Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com> --- .../fastrtps/rtps/resources/ResourceEvent.h | 25 ------------------- src/cpp/fastdds/publisher/DataWriterImpl.cpp | 3 ++- src/cpp/fastdds/subscriber/DataReaderImpl.cpp | 2 +- .../discovery/participant/PDPServer.hpp | 3 +-- .../participant/timedevent/DSClientEvent.cpp | 3 +-- .../participant/timedevent/DServerEvent.cpp | 3 +-- src/cpp/rtps/builtin/liveliness/WLP.cpp | 2 +- .../rtps/participant/RTPSParticipantImpl.h | 2 +- src/cpp/rtps/reader/RTPSReader.cpp | 19 +++++--------- src/cpp/rtps/resources/ResourceEvent.cpp | 3 ++- .../cpp}/rtps/resources/ResourceEvent.h | 0 src/cpp/rtps/resources/TimedEvent.cpp | 2 +- src/cpp/rtps/writer/StatefulWriter.cpp | 2 +- .../fastdds/domain/DomainParticipantImpl.hpp | 2 +- .../rtps/participant/RTPSParticipant.h | 2 +- .../rtps/participant/RTPSParticipantImpl.h | 2 +- .../rtps/resources/ResourceEvent.h | 0 .../fastdds/rtps/reader/StatefulReader.h | 2 +- .../rtps/reader/WriterProxyStopTest.cpp | 4 +-- .../resources/timedevent/TimedEventTests.cpp | 2 +- .../rtps/writer/LivelinessManagerTests.cpp | 3 +-- .../statistics/rtps/MonitorServiceTests.cpp | 2 +- 22 files changed, 27 insertions(+), 61 deletions(-) delete mode 100644 include/fastrtps/rtps/resources/ResourceEvent.h rename {include/fastdds => src/cpp}/rtps/resources/ResourceEvent.h (100%) rename test/mock/rtps/ResourceEvent/{fastdds => }/rtps/resources/ResourceEvent.h (100%) diff --git a/include/fastrtps/rtps/resources/ResourceEvent.h b/include/fastrtps/rtps/resources/ResourceEvent.h deleted file mode 100644 index 70b2020eda..0000000000 --- a/include/fastrtps/rtps/resources/ResourceEvent.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima). -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @file ResourceEvent.h - * - */ - -#ifndef _RTPS_RESOURCES_RESOURCEEVENT_H_ -#define _RTPS_RESOURCES_RESOURCEEVENT_H_ - -#include - -#endif //_RTPS_RESOURCES_RESOURCEEVENT_H_ diff --git a/src/cpp/fastdds/publisher/DataWriterImpl.cpp b/src/cpp/fastdds/publisher/DataWriterImpl.cpp index 85000195b4..c28cc148f2 100644 --- a/src/cpp/fastdds/publisher/DataWriterImpl.cpp +++ b/src/cpp/fastdds/publisher/DataWriterImpl.cpp @@ -38,7 +38,7 @@ #include #include #include -#include + #include #include #include @@ -49,6 +49,7 @@ #include #include #include +#include #include #include diff --git a/src/cpp/fastdds/subscriber/DataReaderImpl.cpp b/src/cpp/fastdds/subscriber/DataReaderImpl.cpp index c059bf9845..31c7c09395 100644 --- a/src/cpp/fastdds/subscriber/DataReaderImpl.cpp +++ b/src/cpp/fastdds/subscriber/DataReaderImpl.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -50,6 +49,7 @@ #include #include +#include #include #ifdef FASTDDS_STATISTICS diff --git a/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp b/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp index 3d54c147ef..39536cf4c5 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDPServer.hpp @@ -30,12 +30,11 @@ #include #include -#include - #include #include #include #include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp index 007289a0bb..f52d6d8d5b 100644 --- a/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/timedevent/DSClientEvent.cpp @@ -19,8 +19,6 @@ #include -#include - #include #include @@ -29,6 +27,7 @@ #include #include #include +#include #include namespace eprosima { diff --git a/src/cpp/rtps/builtin/discovery/participant/timedevent/DServerEvent.cpp b/src/cpp/rtps/builtin/discovery/participant/timedevent/DServerEvent.cpp index c0c7700007..284b2efad0 100644 --- a/src/cpp/rtps/builtin/discovery/participant/timedevent/DServerEvent.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/timedevent/DServerEvent.cpp @@ -19,14 +19,13 @@ #include -#include - #include #include #include #include +#include namespace eprosima { namespace fastdds { diff --git a/src/cpp/rtps/builtin/liveliness/WLP.cpp b/src/cpp/rtps/builtin/liveliness/WLP.cpp index 123aa2f4dd..a3e09f06aa 100644 --- a/src/cpp/rtps/builtin/liveliness/WLP.cpp +++ b/src/cpp/rtps/builtin/liveliness/WLP.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include @@ -39,6 +38,7 @@ #include #include #include +#include #include #include diff --git a/src/cpp/rtps/participant/RTPSParticipantImpl.h b/src/cpp/rtps/participant/RTPSParticipantImpl.h index b87ea3368e..954561c42e 100644 --- a/src/cpp/rtps/participant/RTPSParticipantImpl.h +++ b/src/cpp/rtps/participant/RTPSParticipantImpl.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include "../flowcontrol/FlowControllerFactory.hpp" @@ -52,6 +51,7 @@ #include #include #include +#include #include #include #include diff --git a/src/cpp/rtps/reader/RTPSReader.cpp b/src/cpp/rtps/reader/RTPSReader.cpp index 297feee6ef..deb713a4a8 100644 --- a/src/cpp/rtps/reader/RTPSReader.cpp +++ b/src/cpp/rtps/reader/RTPSReader.cpp @@ -16,29 +16,22 @@ * RTPSReader.cpp * */ +#include #include #include #include +#include +#include +#include +#include +#include #include #include - #include - #include - #include - -#include - -#include -#include -#include -#include - -#include - #include diff --git a/src/cpp/rtps/resources/ResourceEvent.cpp b/src/cpp/rtps/resources/ResourceEvent.cpp index 6957c2c123..fe2aa99f63 100644 --- a/src/cpp/rtps/resources/ResourceEvent.cpp +++ b/src/cpp/rtps/resources/ResourceEvent.cpp @@ -16,9 +16,10 @@ * @file ResourceEvent.cpp */ +#include + #include -#include #include #include "TimedEventImpl.h" diff --git a/include/fastdds/rtps/resources/ResourceEvent.h b/src/cpp/rtps/resources/ResourceEvent.h similarity index 100% rename from include/fastdds/rtps/resources/ResourceEvent.h rename to src/cpp/rtps/resources/ResourceEvent.h diff --git a/src/cpp/rtps/resources/TimedEvent.cpp b/src/cpp/rtps/resources/TimedEvent.cpp index 5b83b1640c..15e9f243cd 100644 --- a/src/cpp/rtps/resources/TimedEvent.cpp +++ b/src/cpp/rtps/resources/TimedEvent.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include "TimedEventImpl.h" diff --git a/src/cpp/rtps/writer/StatefulWriter.cpp b/src/cpp/rtps/writer/StatefulWriter.cpp index ec2b10342d..81b6205707 100644 --- a/src/cpp/rtps/writer/StatefulWriter.cpp +++ b/src/cpp/rtps/writer/StatefulWriter.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -47,6 +46,7 @@ #include #include #include +#include #include #ifdef FASTDDS_STATISTICS diff --git a/test/mock/dds/DomainParticipantImpl/fastdds/domain/DomainParticipantImpl.hpp b/test/mock/dds/DomainParticipantImpl/fastdds/domain/DomainParticipantImpl.hpp index 0a8053e1a9..888748df13 100644 --- a/test/mock/dds/DomainParticipantImpl/fastdds/domain/DomainParticipantImpl.hpp +++ b/test/mock/dds/DomainParticipantImpl/fastdds/domain/DomainParticipantImpl.hpp @@ -42,13 +42,13 @@ #include #include #include -#include #include #include #include #include #include +#include #include namespace eprosima { diff --git a/test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.h b/test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.h index 0ea712ba9c..e5583cf6e5 100644 --- a/test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.h +++ b/test/mock/rtps/RTPSParticipant/fastdds/rtps/participant/RTPSParticipant.h @@ -27,9 +27,9 @@ #include #include #include -#include #include +#include #include namespace eprosima { diff --git a/test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h b/test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h index f9ec06ee23..ec5933e2d4 100644 --- a/test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h +++ b/test/mock/rtps/RTPSParticipantImpl/rtps/participant/RTPSParticipantImpl.h @@ -31,10 +31,10 @@ #include #include #include -#include #include #include +#include #if HAVE_SECURITY #include #endif // if HAVE_SECURITY diff --git a/test/mock/rtps/ResourceEvent/fastdds/rtps/resources/ResourceEvent.h b/test/mock/rtps/ResourceEvent/rtps/resources/ResourceEvent.h similarity index 100% rename from test/mock/rtps/ResourceEvent/fastdds/rtps/resources/ResourceEvent.h rename to test/mock/rtps/ResourceEvent/rtps/resources/ResourceEvent.h diff --git a/test/mock/rtps/StatefulReader/fastdds/rtps/reader/StatefulReader.h b/test/mock/rtps/StatefulReader/fastdds/rtps/reader/StatefulReader.h index 20e92cdb03..2ff5f346e4 100644 --- a/test/mock/rtps/StatefulReader/fastdds/rtps/reader/StatefulReader.h +++ b/test/mock/rtps/StatefulReader/fastdds/rtps/reader/StatefulReader.h @@ -18,7 +18,7 @@ #include #include #include -#include +#include namespace eprosima { namespace fastrtps { diff --git a/test/unittest/rtps/reader/WriterProxyStopTest.cpp b/test/unittest/rtps/reader/WriterProxyStopTest.cpp index 038382f089..d7c5b35a09 100644 --- a/test/unittest/rtps/reader/WriterProxyStopTest.cpp +++ b/test/unittest/rtps/reader/WriterProxyStopTest.cpp @@ -20,13 +20,13 @@ #include #include #include -#include #include #include #include - #include +#include + namespace testing { namespace internal { diff --git a/test/unittest/rtps/resources/timedevent/TimedEventTests.cpp b/test/unittest/rtps/resources/timedevent/TimedEventTests.cpp index 62e11d2899..6c4c62506b 100644 --- a/test/unittest/rtps/resources/timedevent/TimedEventTests.cpp +++ b/test/unittest/rtps/resources/timedevent/TimedEventTests.cpp @@ -17,7 +17,7 @@ #include -#include +#include #include "mock/MockEvent.h" diff --git a/test/unittest/rtps/writer/LivelinessManagerTests.cpp b/test/unittest/rtps/writer/LivelinessManagerTests.cpp index 05d2829fd1..442ed485e5 100644 --- a/test/unittest/rtps/writer/LivelinessManagerTests.cpp +++ b/test/unittest/rtps/writer/LivelinessManagerTests.cpp @@ -21,8 +21,7 @@ #include #include -#include - +#include #include class LivelinessManagerTests : public ::testing::Test diff --git a/test/unittest/statistics/rtps/MonitorServiceTests.cpp b/test/unittest/statistics/rtps/MonitorServiceTests.cpp index bb35df7257..06b895ed3e 100644 --- a/test/unittest/statistics/rtps/MonitorServiceTests.cpp +++ b/test/unittest/statistics/rtps/MonitorServiceTests.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include