Skip to content

Commit

Permalink
Add missing operators to TypeSupport (#1912)
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany authored Apr 13, 2021
1 parent bb500a5 commit d05d0cf
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions include/fastdds/dds/topic/TypeSupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,39 @@ class TypeSupport : public std::shared_ptr<fastdds::dds::TopicDataType>
using Base::operator ->;
using Base::operator *;
using Base::operator bool;
using Base::operator =;

/**
* @brief Constructor
*/
RTPS_DllAPI TypeSupport()
: std::shared_ptr<fastdds::dds::TopicDataType>(nullptr)
{
}
RTPS_DllAPI TypeSupport() noexcept = default;

/**
* @brief Copy Constructor
* @param type Another instance of TypeSupport
*/
RTPS_DllAPI TypeSupport(
const TypeSupport& type)
: std::shared_ptr<fastdds::dds::TopicDataType>(type)
{
}
const TypeSupport& type) noexcept = default;

/**
* @brief Move Constructor
* @param type Another instance of TypeSupport
*/
RTPS_DllAPI TypeSupport(
TypeSupport&& type) noexcept = default;

/**
* @brief Copy Assignment
* @param type Another instance of TypeSupport
*/
RTPS_DllAPI TypeSupport& operator = (
const TypeSupport& type) noexcept = default;

/**
* @brief Move Assignment
* @param type Another instance of TypeSupport
*/
RTPS_DllAPI TypeSupport& operator = (
TypeSupport&& type) noexcept = default;

/*!
* \brief TypeSupport constructor that receives a TopicDataType pointer.
Expand Down

0 comments on commit d05d0cf

Please sign in to comment.