Skip to content

Commit

Permalink
Migrate DLL API exporter and auto linkage to fastdds (#4500)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
EduPonz committed Mar 27, 2024
1 parent 3a84de4 commit e307ed6
Show file tree
Hide file tree
Showing 175 changed files with 8,155 additions and 7,805 deletions.
2 changes: 1 addition & 1 deletion include/fastdds/dds/builtin/common/ReplyHeader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct ReplyHeader

RemoteExceptionCode_t remoteEx;

RTPS_DllAPI static bool isKeyDefined()
FASTDDS_EXPORTED_API static bool isKeyDefined()
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion include/fastdds/dds/builtin/common/RequestHeader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct RequestHeader

InstanceName instanceName;

RTPS_DllAPI static bool isKeyDefined()
FASTDDS_EXPORTED_API static bool isKeyDefined()
{
return false;
}
Expand Down
235 changes: 120 additions & 115 deletions include/fastdds/dds/builtin/typelookup/common/TypeLookupTypes.hpp

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions include/fastdds/dds/common/InstanceHandle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define _FASTDDS_DDS_COMMON_INSTANCEHANDLE_HPP_

#include <fastdds/rtps/common/InstanceHandle.h>
#include <fastrtps/fastrtps_dll.h>
#include <fastdds/fastdds_dll.hpp>


namespace eprosima {
Expand All @@ -30,7 +30,7 @@ namespace dds {

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

extern RTPS_DllAPI const InstanceHandle_t HANDLE_NIL;
extern FASTDDS_EXPORTED_API const InstanceHandle_t HANDLE_NIL;

} // namespace dds
} // namespace fastdds
Expand Down
14 changes: 7 additions & 7 deletions include/fastdds/dds/core/Entity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Entity
*
* @param mask StatusMask (default: all)
*/
RTPS_DllAPI Entity(
FASTDDS_EXPORTED_API Entity(
const StatusMask& mask = StatusMask::all())
: status_mask_(mask)
, status_condition_(this)
Expand Down Expand Up @@ -75,7 +75,7 @@ class Entity
*
* @return Reference to the StatusMask with the relevant statuses set to 1
*/
RTPS_DllAPI const StatusMask& get_status_mask() const
FASTDDS_EXPORTED_API const StatusMask& get_status_mask() const
{
return status_mask_;
}
Expand All @@ -94,7 +94,7 @@ class Entity
*
* @return const reference to the StatusMask with the triggered statuses set to 1
*/
RTPS_DllAPI const StatusMask& get_status_changes() const;
FASTDDS_EXPORTED_API const StatusMask& get_status_changes() const;

/**
* @brief Retrieves the instance handler that represents the Entity
Expand All @@ -111,12 +111,12 @@ class Entity
*
* @return true if enabled, false if not
*/
RTPS_DllAPI bool is_enabled() const
FASTDDS_EXPORTED_API bool is_enabled() const
{
return enable_;
}

RTPS_DllAPI bool operator ==(
FASTDDS_EXPORTED_API bool operator ==(
const Entity& other) const
{
return (this->instance_handle_ == other.instance_handle_);
Expand All @@ -127,7 +127,7 @@ class Entity
*
* @return Reference to StatusCondition object
*/
RTPS_DllAPI StatusCondition& get_statuscondition()
FASTDDS_EXPORTED_API StatusCondition& get_statuscondition()
{
return status_condition_;
}
Expand All @@ -139,7 +139,7 @@ class Entity
*
* @param handle Instance Handle
*/
RTPS_DllAPI void set_instance_handle(
FASTDDS_EXPORTED_API void set_instance_handle(
const InstanceHandle_t& handle)
{
instance_handle_ = handle;
Expand Down
4 changes: 2 additions & 2 deletions include/fastdds/dds/core/condition/Condition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <vector>

#include <fastdds/dds/log/Log.hpp>
#include <fastrtps/fastrtps_dll.h>
#include <fastdds/fastdds_dll.hpp>

namespace eprosima {
namespace fastdds {
Expand All @@ -46,7 +46,7 @@ class Condition
* @brief Retrieves the trigger_value of the Condition
* @return true if trigger_value is set to 'true', 'false' otherwise
*/
RTPS_DllAPI virtual bool get_trigger_value() const
FASTDDS_EXPORTED_API virtual bool get_trigger_value() const
{
EPROSIMA_LOG_WARNING(CONDITION, "get_trigger_value public member function not implemented");
return false; // TODO return trigger value
Expand Down
10 changes: 5 additions & 5 deletions include/fastdds/dds/core/condition/GuardCondition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <atomic>

#include <fastdds/dds/core/condition/Condition.hpp>
#include <fastrtps/fastrtps_dll.h>
#include <fastdds/fastdds_dll.hpp>
#include <fastrtps/types/TypesBase.h>

using eprosima::fastrtps::types::ReturnCode_t;
Expand All @@ -45,18 +45,18 @@ class GuardCondition : public Condition
{
public:

RTPS_DllAPI GuardCondition();
FASTDDS_EXPORTED_API GuardCondition();

RTPS_DllAPI ~GuardCondition();
FASTDDS_EXPORTED_API ~GuardCondition();

RTPS_DllAPI bool get_trigger_value() const override;
FASTDDS_EXPORTED_API bool get_trigger_value() const override;

/**
* @brief Set the trigger_value
* @param value new value for trigger
* @return RETURN_OK
*/
RTPS_DllAPI ReturnCode_t set_trigger_value(
FASTDDS_EXPORTED_API ReturnCode_t set_trigger_value(
bool value);

private:
Expand Down
10 changes: 5 additions & 5 deletions include/fastdds/dds/core/condition/StatusCondition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include <fastdds/dds/core/condition/Condition.hpp>
#include <fastdds/dds/core/status/StatusMask.hpp>
#include <fastrtps/fastrtps_dll.h>
#include <fastdds/fastdds_dll.hpp>
#include <fastrtps/types/TypesBase.h>

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

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

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

/**
* @brief Returns the Entity associated
* @return Entity
*/
RTPS_DllAPI Entity* get_entity() const;
FASTDDS_EXPORTED_API Entity* get_entity() const;

detail::StatusConditionImpl* get_impl() const
{
Expand Down
14 changes: 7 additions & 7 deletions include/fastdds/dds/core/condition/WaitSet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <fastdds/dds/core/condition/Condition.hpp>
#include <fastdds/rtps/common/Time_t.h>
#include <fastrtps/fastrtps_dll.h>
#include <fastdds/fastdds_dll.hpp>
#include <fastrtps/types/TypesBase.h>

using eprosima::fastrtps::types::ReturnCode_t;
Expand All @@ -47,9 +47,9 @@ class WaitSet
{
public:

RTPS_DllAPI WaitSet();
FASTDDS_EXPORTED_API WaitSet();

RTPS_DllAPI ~WaitSet();
FASTDDS_EXPORTED_API ~WaitSet();

WaitSet(
const WaitSet&) = delete;
Expand All @@ -65,7 +65,7 @@ class WaitSet
* @param cond Condition
* @return RETCODE_OK if attached correctly, error code otherwise
*/
RTPS_DllAPI ReturnCode_t attach_condition(
FASTDDS_EXPORTED_API ReturnCode_t attach_condition(
const Condition& cond);


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

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

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

private:
Expand Down
6 changes: 3 additions & 3 deletions include/fastdds/dds/core/policy/ParameterTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class Parameter_t
/**
* @brief Constructor without parameters
*/
RTPS_DllAPI Parameter_t()
FASTDDS_EXPORTED_API Parameter_t()
: Pid(PID_PAD)
, length(0)
{
Expand All @@ -186,7 +186,7 @@ class Parameter_t
* @param pid Pid of the parameter
* @param length Its associated length
*/
RTPS_DllAPI Parameter_t(
FASTDDS_EXPORTED_API Parameter_t(
ParameterId_t pid,
uint16_t length)
: Pid(pid)
Expand All @@ -197,7 +197,7 @@ class Parameter_t
/**
* @brief Destructor
*/
virtual RTPS_DllAPI ~Parameter_t()
virtual FASTDDS_EXPORTED_API ~Parameter_t()
{
}

Expand Down
Loading

0 comments on commit e307ed6

Please sign in to comment.