123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- #ifndef _FASTDDS_RTPS_COMMON_WRITEPARAMS_H_
- #define _FASTDDS_RTPS_COMMON_WRITEPARAMS_H_
- #include <fastdds/rtps/common/SampleIdentity.h>
- #include <chrono>
- namespace eprosima
- {
- namespace fastrtps
- {
- namespace rtps
- {
-
- class RTPS_DllAPI WriteParams
- {
- public:
-
- WriteParams() = default;
-
- WriteParams(const WriteParams &wparam)
- : sample_identity_(wparam.sample_identity_)
- , related_sample_identity_(wparam.related_sample_identity_)
- {
- }
-
- WriteParams(WriteParams &&wparam)
- : sample_identity_(std::move(wparam.sample_identity_))
- , related_sample_identity_(std::move(wparam.related_sample_identity_))
- {
- }
-
- WriteParams& operator=(const WriteParams &wparam)
- {
- sample_identity_ = wparam.sample_identity_;
- related_sample_identity_ = wparam.related_sample_identity_;
- return *this;
- }
-
- WriteParams& operator=(WriteParams &&wparam)
- {
- sample_identity_ = std::move(wparam.sample_identity_);
- related_sample_identity_ = std::move(wparam.related_sample_identity_);
- return *this;
- }
- WriteParams& sample_identity(const SampleIdentity &sample_id)
- {
- sample_identity_ = sample_id;
- return *this;
- }
- WriteParams& sample_identity(SampleIdentity &&sample_id)
- {
- sample_identity_ = std::move(sample_id);
- return *this;
- }
- const SampleIdentity& sample_identity() const
- {
- return sample_identity_;
- }
- SampleIdentity& sample_identity()
- {
- return sample_identity_;
- }
- WriteParams& related_sample_identity(const SampleIdentity &sample_id)
- {
- related_sample_identity_ = sample_id;
- return *this;
- }
- WriteParams& related_sample_identity(SampleIdentity &&sample_id)
- {
- related_sample_identity_ = std::move(sample_id);
- return *this;
- }
- const SampleIdentity& related_sample_identity() const
- {
- return related_sample_identity_;
- }
- SampleIdentity& related_sample_identity()
- {
- return related_sample_identity_;
- }
- static WriteParams WRITE_PARAM_DEFAULT;
- private:
- SampleIdentity sample_identity_;
- SampleIdentity related_sample_identity_;
- };
- }
- }
- }
- #endif
|