Skip to content

Commit 2de726b

Browse files
authored
Migrate DLL API exporter and auto linkage to fastdds (#4500)
* Refs #20569: Rename RTPS_DllAPI to FASTDDS_EXPORTED_API Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20569: Move fastrtps/fastrtps_dll.h to fastdds/fastdds_dll.hpp Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20569: Move fastrtps/eProsima_auto_link.h to fastdds/fastdds_auto_link.hpp Signed-off-by: EduPonz <eduardoponz@eprosima.com> * Refs #20569: Uncrustify Signed-off-by: EduPonz <eduardoponz@eprosima.com> --------- Signed-off-by: EduPonz <eduardoponz@eprosima.com>
1 parent a9f0e11 commit 2de726b

170 files changed

Lines changed: 8118 additions & 7767 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

include/fastdds/dds/builtin/common/ReplyHeader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct ReplyHeader
3939

4040
RemoteExceptionCode_t remoteEx;
4141

42-
RTPS_DllAPI static bool isKeyDefined()
42+
FASTDDS_EXPORTED_API static bool isKeyDefined()
4343
{
4444
return false;
4545
}

include/fastdds/dds/builtin/common/RequestHeader.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct RequestHeader
3939

4040
InstanceName instanceName;
4141

42-
RTPS_DllAPI static bool isKeyDefined()
42+
FASTDDS_EXPORTED_API static bool isKeyDefined()
4343
{
4444
return false;
4545
}

include/fastdds/dds/builtin/typelookup/common/TypeLookupTypes.hpp

Lines changed: 120 additions & 115 deletions
Large diffs are not rendered by default.

include/fastdds/dds/common/InstanceHandle.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define _FASTDDS_DDS_COMMON_INSTANCEHANDLE_HPP_
2222

2323
#include <fastdds/rtps/common/InstanceHandle.h>
24-
#include <fastrtps/fastrtps_dll.h>
24+
#include <fastdds/fastdds_dll.hpp>
2525

2626

2727
namespace eprosima {
@@ -30,7 +30,7 @@ namespace dds {
3030

3131
using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t;
3232

33-
extern RTPS_DllAPI const InstanceHandle_t HANDLE_NIL;
33+
extern FASTDDS_EXPORTED_API const InstanceHandle_t HANDLE_NIL;
3434

3535
} // namespace dds
3636
} // namespace fastdds

include/fastdds/dds/core/Entity.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Entity
4343
*
4444
* @param mask StatusMask (default: all)
4545
*/
46-
RTPS_DllAPI Entity(
46+
FASTDDS_EXPORTED_API Entity(
4747
const StatusMask& mask = StatusMask::all())
4848
: status_mask_(mask)
4949
, status_condition_(this)
@@ -75,7 +75,7 @@ class Entity
7575
*
7676
* @return Reference to the StatusMask with the relevant statuses set to 1
7777
*/
78-
RTPS_DllAPI const StatusMask& get_status_mask() const
78+
FASTDDS_EXPORTED_API const StatusMask& get_status_mask() const
7979
{
8080
return status_mask_;
8181
}
@@ -94,7 +94,7 @@ class Entity
9494
*
9595
* @return const reference to the StatusMask with the triggered statuses set to 1
9696
*/
97-
RTPS_DllAPI const StatusMask& get_status_changes() const;
97+
FASTDDS_EXPORTED_API const StatusMask& get_status_changes() const;
9898

9999
/**
100100
* @brief Retrieves the instance handler that represents the Entity
@@ -111,12 +111,12 @@ class Entity
111111
*
112112
* @return true if enabled, false if not
113113
*/
114-
RTPS_DllAPI bool is_enabled() const
114+
FASTDDS_EXPORTED_API bool is_enabled() const
115115
{
116116
return enable_;
117117
}
118118

119-
RTPS_DllAPI bool operator ==(
119+
FASTDDS_EXPORTED_API bool operator ==(
120120
const Entity& other) const
121121
{
122122
return (this->instance_handle_ == other.instance_handle_);
@@ -127,7 +127,7 @@ class Entity
127127
*
128128
* @return Reference to StatusCondition object
129129
*/
130-
RTPS_DllAPI StatusCondition& get_statuscondition()
130+
FASTDDS_EXPORTED_API StatusCondition& get_statuscondition()
131131
{
132132
return status_condition_;
133133
}
@@ -139,7 +139,7 @@ class Entity
139139
*
140140
* @param handle Instance Handle
141141
*/
142-
RTPS_DllAPI void set_instance_handle(
142+
FASTDDS_EXPORTED_API void set_instance_handle(
143143
const InstanceHandle_t& handle)
144144
{
145145
instance_handle_ = handle;

include/fastdds/dds/core/condition/Condition.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <vector>
2525

2626
#include <fastdds/dds/log/Log.hpp>
27-
#include <fastrtps/fastrtps_dll.h>
27+
#include <fastdds/fastdds_dll.hpp>
2828

2929
namespace eprosima {
3030
namespace fastdds {
@@ -46,7 +46,7 @@ class Condition
4646
* @brief Retrieves the trigger_value of the Condition
4747
* @return true if trigger_value is set to 'true', 'false' otherwise
4848
*/
49-
RTPS_DllAPI virtual bool get_trigger_value() const
49+
FASTDDS_EXPORTED_API virtual bool get_trigger_value() const
5050
{
5151
EPROSIMA_LOG_WARNING(CONDITION, "get_trigger_value public member function not implemented");
5252
return false; // TODO return trigger value

include/fastdds/dds/core/condition/GuardCondition.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <atomic>
2424

2525
#include <fastdds/dds/core/condition/Condition.hpp>
26-
#include <fastrtps/fastrtps_dll.h>
26+
#include <fastdds/fastdds_dll.hpp>
2727
#include <fastrtps/types/TypesBase.h>
2828

2929
using eprosima::fastrtps::types::ReturnCode_t;
@@ -45,18 +45,18 @@ class GuardCondition : public Condition
4545
{
4646
public:
4747

48-
RTPS_DllAPI GuardCondition();
48+
FASTDDS_EXPORTED_API GuardCondition();
4949

50-
RTPS_DllAPI ~GuardCondition();
50+
FASTDDS_EXPORTED_API ~GuardCondition();
5151

52-
RTPS_DllAPI bool get_trigger_value() const override;
52+
FASTDDS_EXPORTED_API bool get_trigger_value() const override;
5353

5454
/**
5555
* @brief Set the trigger_value
5656
* @param value new value for trigger
5757
* @return RETURN_OK
5858
*/
59-
RTPS_DllAPI ReturnCode_t set_trigger_value(
59+
FASTDDS_EXPORTED_API ReturnCode_t set_trigger_value(
6060
bool value);
6161

6262
private:

include/fastdds/dds/core/condition/StatusCondition.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include <fastdds/dds/core/condition/Condition.hpp>
2424
#include <fastdds/dds/core/status/StatusMask.hpp>
25-
#include <fastrtps/fastrtps_dll.h>
25+
#include <fastdds/fastdds_dll.hpp>
2626
#include <fastrtps/types/TypesBase.h>
2727

2828
using eprosima::fastrtps::types::ReturnCode_t;
@@ -68,27 +68,27 @@ class StatusCondition final : public Condition
6868
* @brief Retrieves the trigger_value of the Condition
6969
* @return true if trigger_value is set to 'true', 'false' otherwise
7070
*/
71-
RTPS_DllAPI bool get_trigger_value() const override;
71+
FASTDDS_EXPORTED_API bool get_trigger_value() const override;
7272

7373
/**
7474
* @brief Defines the list of communication statuses that are taken into account to determine the trigger_value
7575
* @param mask defines the mask for the status
7676
* @return RETCODE_OK with everything ok, error code otherwise
7777
*/
78-
RTPS_DllAPI ReturnCode_t set_enabled_statuses(
78+
FASTDDS_EXPORTED_API ReturnCode_t set_enabled_statuses(
7979
const StatusMask& mask);
8080

8181
/**
8282
* @brief Retrieves the list of communication statuses that are taken into account to determine the trigger_value
8383
* @return Status set or default status if it has not been set
8484
*/
85-
RTPS_DllAPI const StatusMask& get_enabled_statuses() const;
85+
FASTDDS_EXPORTED_API const StatusMask& get_enabled_statuses() const;
8686

8787
/**
8888
* @brief Returns the Entity associated
8989
* @return Entity
9090
*/
91-
RTPS_DllAPI Entity* get_entity() const;
91+
FASTDDS_EXPORTED_API Entity* get_entity() const;
9292

9393
detail::StatusConditionImpl* get_impl() const
9494
{

include/fastdds/dds/core/condition/WaitSet.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include <fastdds/dds/core/condition/Condition.hpp>
2626
#include <fastdds/rtps/common/Time_t.h>
27-
#include <fastrtps/fastrtps_dll.h>
27+
#include <fastdds/fastdds_dll.hpp>
2828
#include <fastrtps/types/TypesBase.h>
2929

3030
using eprosima::fastrtps::types::ReturnCode_t;
@@ -47,9 +47,9 @@ class WaitSet
4747
{
4848
public:
4949

50-
RTPS_DllAPI WaitSet();
50+
FASTDDS_EXPORTED_API WaitSet();
5151

52-
RTPS_DllAPI ~WaitSet();
52+
FASTDDS_EXPORTED_API ~WaitSet();
5353

5454
WaitSet(
5555
const WaitSet&) = delete;
@@ -65,7 +65,7 @@ class WaitSet
6565
* @param cond Condition
6666
* @return RETCODE_OK if attached correctly, error code otherwise
6767
*/
68-
RTPS_DllAPI ReturnCode_t attach_condition(
68+
FASTDDS_EXPORTED_API ReturnCode_t attach_condition(
6969
const Condition& cond);
7070

7171

@@ -74,7 +74,7 @@ class WaitSet
7474
* @param cond Condition
7575
* @return RETCODE_OK if detached correctly, PRECONDITION_NOT_MET if condition was not attached
7676
*/
77-
RTPS_DllAPI ReturnCode_t detach_condition(
77+
FASTDDS_EXPORTED_API ReturnCode_t detach_condition(
7878
const Condition& cond);
7979

8080
/**
@@ -86,7 +86,7 @@ class WaitSet
8686
* @return RETCODE_OK if everything correct, PRECONDITION_NOT_MET if WaitSet already waiting, TIMEOUT if maximum
8787
* time expired, error code otherwise
8888
*/
89-
RTPS_DllAPI ReturnCode_t wait(
89+
FASTDDS_EXPORTED_API ReturnCode_t wait(
9090
ConditionSeq& active_conditions,
9191
const fastrtps::Duration_t timeout) const;
9292

@@ -95,7 +95,7 @@ class WaitSet
9595
* @param attached_conditions Reference to the collection of attached conditions
9696
* @return RETCODE_OK if everything correct, error code otherwise
9797
*/
98-
RTPS_DllAPI ReturnCode_t get_conditions(
98+
FASTDDS_EXPORTED_API ReturnCode_t get_conditions(
9999
ConditionSeq& attached_conditions) const;
100100

101101
private:

include/fastdds/dds/core/policy/ParameterTypes.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class Parameter_t
174174
/**
175175
* @brief Constructor without parameters
176176
*/
177-
RTPS_DllAPI Parameter_t()
177+
FASTDDS_EXPORTED_API Parameter_t()
178178
: Pid(PID_PAD)
179179
, length(0)
180180
{
@@ -186,7 +186,7 @@ class Parameter_t
186186
* @param pid Pid of the parameter
187187
* @param length Its associated length
188188
*/
189-
RTPS_DllAPI Parameter_t(
189+
FASTDDS_EXPORTED_API Parameter_t(
190190
ParameterId_t pid,
191191
uint16_t length)
192192
: Pid(pid)
@@ -197,7 +197,7 @@ class Parameter_t
197197
/**
198198
* @brief Destructor
199199
*/
200-
virtual RTPS_DllAPI ~Parameter_t()
200+
virtual FASTDDS_EXPORTED_API ~Parameter_t()
201201
{
202202
}
203203

0 commit comments

Comments
 (0)