Skip to content

Commit

Permalink
Make rtps writer impl private (#4869)
Browse files Browse the repository at this point in the history
* Refs #20821: Make StatefulPersistentWriter private

Signed-off-by: elianalf <[email protected]>

* Refs #20821: Make StatelessPersistentWriter private

Signed-off-by: elianalf <[email protected]>

* Refs #20821: Make StatefulWriter private

Signed-off-by: elianalf <[email protected]>

* Refs #20821: Make StatelessWriter private

Signed-off-by: elianalf <[email protected]>

* Refs #20821: Apply suggestions: Make persistenteWriter private

Signed-off-by: elianalf <[email protected]>

* Refs #20821. Avoid min / max macros on ReaderProxyTests.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: elianalf <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
  • Loading branch information
elianalf and MiguelCompany authored May 30, 2024
1 parent b225800 commit 1925a6b
Show file tree
Hide file tree
Showing 39 changed files with 90 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/reader/RTPSReader.h>
#include <fastdds/rtps/writer/RTPSWriter.h>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <rtps/builtin/BuiltinProtocols.h>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/RTPSDomainImpl.hpp>
#include <rtps/writer/StatefulWriter.hpp>

namespace eprosima {

Expand Down
2 changes: 1 addition & 1 deletion src/cpp/fastdds/publisher/DataWriterImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include <fastdds/rtps/participant/RTPSParticipant.h>
#include <fastdds/rtps/RTPSDomain.h>
#include <fastdds/rtps/writer/RTPSWriter.h>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <rtps/builtin/liveliness/WLP.h>
#include <rtps/DataSharing/DataSharingPayloadPool.hpp>
Expand All @@ -49,6 +48,7 @@
#include <rtps/resources/ResourceEvent.h>
#include <rtps/RTPSDomainImpl.hpp>
#include <rtps/resources/TimedEvent.h>
#include <rtps/writer/StatefulWriter.hpp>
#include <utils/TimeConversion.hpp>
#ifdef FASTDDS_STATISTICS
#include <statistics/fastdds/domain/DomainParticipantImpl.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/builtin/discovery/endpoint/EDPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
#include <fastdds/rtps/builtin/data/WriterProxyData.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/reader/RTPSReader.h>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <rtps/builtin/discovery/participant/PDP.h>
#if HAVE_SECURITY
#include <rtps/security/accesscontrol/ParticipantSecurityAttributes.h>
#endif // if HAVE_SECURITY
#include <rtps/writer/StatefulWriter.hpp>

namespace eprosima {
namespace fastdds {
Expand Down
3 changes: 2 additions & 1 deletion src/cpp/rtps/builtin/discovery/endpoint/EDPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
#include <fastdds/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/ReaderAttributes.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <rtps/reader/StatefulReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>

using namespace ::eprosima::fastrtps::rtps;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
*
*/
#include <rtps/builtin/discovery/endpoint/EDPServerListeners.hpp>
#include <rtps/builtin/discovery/endpoint/EDPServer.hpp>
#include <rtps/builtin/discovery/participant/PDPServer.hpp>

#include <fastdds/rtps/writer/StatefulWriter.h>
#include <fastdds/dds/log/Log.hpp>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/reader/RTPSReader.h>

#include <fastdds/dds/log/Log.hpp>
#include <rtps/builtin/discovery/endpoint/EDPServer.hpp>
#include <rtps/builtin/discovery/participant/PDPServer.hpp>
#include <rtps/writer/StatefulWriter.hpp>

namespace eprosima {
namespace fastdds {
namespace rtps {
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/builtin/discovery/endpoint/EDPSimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <fastdds/rtps/builtin/data/WriterProxyData.h>
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <rtps/builtin/BuiltinProtocols.h>
#include <rtps/builtin/discovery/endpoint/EDPSimpleListeners.h>
Expand All @@ -42,6 +41,7 @@
#include <rtps/history/TopicPayloadPoolRegistry.hpp>
#include <rtps/history/TopicPayloadPoolRegistry.hpp>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>
#ifdef FASTDDS_STATISTICS
#include <statistics/rtps/monitor-service/interfaces/IProxyObserver.hpp>
#endif //FASTDDS_STATISTICS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
#include <fastdds/rtps/common/InstanceHandle.h>
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <fastdds/builtin/type_lookup_service/TypeLookupManager.hpp>
#include <rtps/builtin/discovery/endpoint/EDPSimple.h>
#include <rtps/builtin/discovery/participant/PDPSimple.h>
#include <rtps/network/NetworkFactory.h>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>

using ParameterList = eprosima::fastdds::dds::ParameterList;

Expand Down
7 changes: 4 additions & 3 deletions src/cpp/rtps/builtin/discovery/endpoint/EDPUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@
#ifndef _RTPS_BUILTIN_DISCOVERY_ENDPOINT_EDPUTILS_HPP_
#define _RTPS_BUILTIN_DISCOVERY_ENDPOINT_EDPUTILS_HPP_

#include <memory>
#include <string>

#include <fastdds/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/ReaderAttributes.h>
#include <fastdds/rtps/attributes/WriterAttributes.h>
#include <fastdds/rtps/common/EntityId_t.hpp>
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <rtps/history/ITopicPayloadPool.h>
#include <rtps/history/PoolConfig.h>
#include <rtps/history/TopicPayloadPoolRegistry.hpp>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>

#include <memory>
#include <string>

namespace eprosima {
namespace fastrtps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include <memory>

#include <fastdds/rtps/builtin/data/BuiltinEndpoints.hpp>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <rtps/builtin/BuiltinReader.hpp>
#include <rtps/builtin/BuiltinWriter.hpp>
#include <rtps/builtin/discovery/participant/PDPEndpoints.hpp>
#include <rtps/history/ITopicPayloadPool.h>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>

namespace eprosima {
namespace fastdds {
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/builtin/discovery/participant/PDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/participant/RTPSParticipantListener.h>
#include <fastdds/rtps/writer/StatelessWriter.h>

#include <fastdds/builtin/type_lookup_service/TypeLookupManager.hpp>
#include <fastdds/utils/IPLocator.h>
Expand All @@ -49,6 +48,7 @@
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/reader/StatelessReader.hpp>
#include <rtps/writer/StatelessWriter.hpp>
#include <rtps/resources/TimedEvent.h>
#if HAVE_SECURITY
#include <rtps/security/accesscontrol/ParticipantSecurityAttributes.h>
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/builtin/discovery/participant/PDPClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/participant/RTPSParticipantListener.h>
#include <fastdds/rtps/writer/ReaderProxy.h>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <fastdds/builtin/type_lookup_service/TypeLookupManager.hpp>
#include <rtps/builtin/BuiltinProtocols.h>
Expand All @@ -46,6 +45,7 @@
#include <rtps/builtin/liveliness/WLP.h>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>
#include <utils/shared_mutex.hpp>
#include <utils/SystemInfo.hpp>
#include <utils/TimeConversion.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/builtin/discovery/participant/PDPServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/participant/RTPSParticipantListener.h>
#include <fastdds/rtps/writer/StatefulWriter.h>
#include <fastdds/utils/TimedMutex.hpp>

#include <fastdds/builtin/type_lookup_service/TypeLookupManager.hpp>
Expand All @@ -47,6 +46,7 @@
#include <rtps/builtin/liveliness/WLP.h>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>
#include <utils/TimeConversion.hpp>

namespace eprosima {
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/builtin/discovery/participant/PDPSimple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/participant/RTPSParticipantListener.h>
#include <fastdds/rtps/writer/StatelessWriter.h>

#include <fastdds/builtin/type_lookup_service/TypeLookupManager.hpp>
#include <fastdds/utils/IPLocator.h>
Expand All @@ -45,6 +44,7 @@
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/reader/StatelessReader.hpp>
#include <rtps/resources/TimedEvent.h>
#include <rtps/writer/StatelessWriter.hpp>

namespace eprosima {
namespace fastrtps {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
#include <memory>

#include <fastdds/rtps/builtin/data/BuiltinEndpoints.hpp>
#include <fastdds/rtps/writer/StatelessWriter.h>

#include <rtps/builtin/BuiltinReader.hpp>
#include <rtps/builtin/BuiltinWriter.hpp>
#include <rtps/builtin/discovery/participant/PDPEndpoints.hpp>
#include <rtps/history/ITopicPayloadPool.h>
#include <rtps/reader/StatelessReader.hpp>
#include <rtps/writer/StatelessWriter.hpp>

namespace eprosima {
namespace fastdds {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#include <memory>

#include <fastdds/rtps/builtin/data/BuiltinEndpoints.hpp>
#include <fastdds/rtps/writer/StatefulWriter.h>

#include <rtps/builtin/BuiltinReader.hpp>
#include <rtps/builtin/BuiltinWriter.hpp>
#include <rtps/builtin/discovery/participant/simple/SimplePDPEndpoints.hpp>
#include <rtps/history/ITopicPayloadPool.h>
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>

namespace eprosima {
namespace fastdds {
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/builtin/liveliness/WLP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <fastdds/rtps/builtin/data/WriterProxyData.h>
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/writer/StatefulWriter.h>
#include <fastdds/rtps/writer/WriterListener.h>

#include <rtps/builtin/BuiltinProtocols.h>
Expand All @@ -39,6 +38,7 @@
#include <rtps/resources/TimedEvent.h>
#include <rtps/resources/ResourceEvent.h>
#include <rtps/writer/LivelinessManager.hpp>
#include <rtps/writer/StatefulWriter.hpp>
#include <utils/TimeConversion.hpp>

namespace eprosima {
Expand Down
8 changes: 4 additions & 4 deletions src/cpp/rtps/participant/RTPSParticipantImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
#include <fastdds/rtps/transport/TCPv4TransportDescriptor.h>
#include <fastdds/rtps/transport/TCPv6TransportDescriptor.h>
#include <fastdds/rtps/transport/UDPv4TransportDescriptor.h>
#include <fastdds/rtps/writer/StatefulPersistentWriter.h>
#include <fastdds/rtps/writer/StatefulWriter.h>
#include <fastdds/rtps/writer/StatelessPersistentWriter.h>
#include <fastdds/rtps/writer/StatelessWriter.h>
#include <fastdds/utils/IPFinder.h>

#include <rtps/builtin/BuiltinProtocols.h>
Expand All @@ -64,6 +60,10 @@
#include <rtps/reader/StatefulReader.hpp>
#include <rtps/reader/StatelessPersistentReader.hpp>
#include <rtps/reader/StatelessReader.hpp>
#include <rtps/writer/StatefulWriter.hpp>
#include <rtps/writer/StatefulPersistentWriter.hpp>
#include <rtps/writer/StatelessPersistentWriter.hpp>
#include <rtps/writer/StatelessWriter.hpp>
#include <statistics/rtps/GuidUtils.hpp>
#include <utils/Semaphore.hpp>
#include <utils/string_utilities.hpp>
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/rtps/security/SecurityManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/participant/RTPSParticipantListener.h>
#include <fastdds/rtps/writer/StatefulWriter.h>
#include <fastdds/rtps/writer/StatelessWriter.h>

#include <rtps/builtin/discovery/endpoint/EDP.h>
#include <rtps/builtin/discovery/participant/PDP.h>
Expand All @@ -48,6 +46,8 @@
#include <rtps/security/accesscontrol/SecurityMaskUtilities.h>
#include <rtps/security/authentication/Authentication.h>
#include <rtps/security/exceptions/SecurityException.h>
#include <rtps/writer/StatefulWriter.hpp>
#include <rtps/writer/StatelessWriter.hpp>
#include <security/OpenSSLInit.hpp>

#define BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_SECURE_WRITER (1 << 20)
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/rtps/transport/tcp/RTCPMessageManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#include <memory>
#include <atomic>

#include <fastdds/rtps/writer/StatelessWriter.h>
#include <fastdds/rtps/writer/StatefulWriter.h>
#include <rtps/transport/tcp/TCPControlMessage.h>
#include <rtps/transport/tcp/RTCPHeader.h>
#include <rtps/writer/StatefulWriter.hpp>
#include <rtps/writer/StatelessWriter.hpp>

namespace eprosima {
namespace fastdds {
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/writer/PersistentWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

#include <fastdds/rtps/writer/PersistentWriter.h>
#include <rtps/writer/PersistentWriter.hpp>

#include <fastdds/rtps/history/WriterHistory.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
// limitations under the License.

/**
* @file PersistentWriter.h
* @file PersistentWriter.hpp
*/
#ifndef _FASTDDS_RTPS_PERSISTENTWRITER_H_
#define _FASTDDS_RTPS_PERSISTENTWRITER_H_

#include <fastdds/rtps/writer/RTPSWriter.h>
#ifndef RTPS_WRITER__PERSISTENTWRITER_HPP
#define RTPS_WRITER__PERSISTENTWRITER_HPP

#include <string>

#include <fastdds/rtps/writer/RTPSWriter.h>

#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC

namespace eprosima {
Expand Down Expand Up @@ -77,4 +79,4 @@ class PersistentWriter
} // namespace eprosima

#endif // ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
#endif /* _FASTDDS_RTPS_PERSISTENTWRITER_H_ */
#endif /* RTPS_WRITER__PERSISTENTWRITER_HPP */
7 changes: 4 additions & 3 deletions src/cpp/rtps/writer/ReaderProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@

#include <fastdds/dds/log/Log.hpp>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/writer/StatefulWriter.h>
#include <fastdds/rtps/common/LocatorListComparisons.hpp>
#include <rtps/participant/RTPSParticipantImpl.h>

#include <rtps/DataSharing/DataSharingNotifier.hpp>
#include <rtps/history/HistoryAttributesExtension.hpp>
#include "rtps/messages/RTPSGapBuilder.hpp"
#include <rtps/DataSharing/DataSharingNotifier.hpp>
#include <rtps/participant/RTPSParticipantImpl.h>
#include <rtps/resources/TimedEvent.h>
#include <rtps/writer/StatefulWriter.hpp>
#include <utils/TimeConversion.hpp>


Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/writer/StatefulPersistentWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

#include <fastdds/rtps/writer/StatefulPersistentWriter.h>
#include "StatefulPersistentWriter.hpp"

#include <fastdds/rtps/history/WriterHistory.h>

Expand Down
Loading

0 comments on commit 1925a6b

Please sign in to comment.