-
Key: DDSPSMC11_-59
-
Legacy Issue Number: 18628
-
Status: open
-
Source: Leonardo S.p.A ( Simon McQueen)
-
Summary:
Vestigial implementation code (and comments) need removing for consistency and to fix compilation.
Header include missing.
Required inline operation missing.
Windows export macros required.
Suggested resolution:
diff --git a/src/hpp/dds/core/status/State.hpp b/src/hpp/dds/core/status/State.hpp index 8ac4475..ab8d1cf 100644 --- a/src/hpp/dds/core/status/State.hpp +++ b/src/hpp/dds/core/status/State.hpp @@ -21,19 +21,20 @@ #include <bitset> #include <dds/core/macros.hpp> +#include <dds/core/types.hpp> namespace dds { namespace core { namespace status { - class SampleRejectedState : public std::bitset<OMG_DDS_STATE_BIT_COUNT> { + class OMG_DDS_API SampleRejectedState : public std::bitset<OMG_DDS_STATE_BIT_COUNT> { public: typedef std::bitset<OMG_DDS_STATE_BIT_COUNT> MaskType; public: - SampleRejectedState() : MaskType() { } - SampleRejectedState(const SampleRejectedState& src) : MaskType(static_cast<int>(src.to_ulong())) { } - SampleRejectedState(const MaskType& src) : MaskType(static_cast<int>(src.to_ulong())) { } + SampleRejectedState(); + SampleRejectedState(const SampleRejectedState& src); + SampleRejectedState(const MaskType& src); public: inline static const SampleRejectedState not_rejected() { @@ -50,29 +51,29 @@ namespace dds { namespace core { namespace status { } private: - // @TODO - // -- This Ctor should be fixed as currently there is this - // -- cast only to avoid an error when compiling with the MS vC++ compiler - SampleRejectedState(uint32_t s) - : MaskType((uint64_t)s) - { } - + SampleRejectedState(uint32_t s); }; // StatusMask create_status_mask(uint64_t); - class StatusMask : public std::bitset<OMG_DDS_STATUS_COUNT> { + class OMG_DDS_API StatusMask : public std::bitset<OMG_DDS_STATUS_COUNT> { public: typedef std::bitset<OMG_DDS_STATUS_COUNT> MaskType; public: - StatusMask() { } - explicit StatusMask(uint64_t mask) : std::bitset<OMG_DDS_STATUS_COUNT>(mask) { } - StatusMask(const StatusMask& other) : MaskType(static_cast<int>(other.to_ulong())) { } - ~StatusMask() { } + StatusMask(); + explicit StatusMask(uint32_t mask); + StatusMask(const StatusMask& other); + ~StatusMask(); public: + inline StatusMask& operator << (const dds::core::status::StatusMask& mask) + { + *this |= mask; + return *this; + } + inline static const StatusMask all() { return StatusMask(0x7fe7u); }
-
Reported: DDS-PSM-Cxx 1.0b2 — Tue, 9 Apr 2013 04:00 GMT
-
Updated: Sun, 30 Sep 2018 23:30 GMT
DDSPSMC11_ — API correction required to src/hpp/dds/core/status/State.hpp
- Key: DDSPSMC11_-59
- OMG Task Force: DDS-PSM-Cxx v1.1 RTF