14 struct SortPredicate {
15 bool operator()(
const MetaSubmessage& x,
const MetaSubmessage& y)
const 17 if (x.src_guid_ != y.src_guid_) {
18 return x.src_guid_ < y.src_guid_;
21 if (x.dst_guid_ != y.dst_guid_) {
22 return x.dst_guid_ < y.dst_guid_;
25 if (x.sm_._d() != y.sm_._d()) {
26 return x.sm_._d() < y.sm_._d();
32 return x.sm_.heartbeat_sm().count.value > y.sm_.heartbeat_sm().count.value;
34 return x.sm_.acknack_sm().count.value > y.sm_.acknack_sm().count.value;
41 struct EqualPredicate {
42 bool operator()(
const MetaSubmessage& x,
const MetaSubmessage& y)
const 44 return x.src_guid_ == y.src_guid_ &&
45 x.dst_guid_ == y.dst_guid_ &&
46 x.sm_._d() == y.sm_._d();
51 size_t dedup(MetaSubmessageVec& vec)
59 std::sort(vec.begin(), vec.end(), SortPredicate());
60 MetaSubmessageVec::iterator pos = vec.begin();
61 MetaSubmessageVec::iterator next = pos;
62 std::advance(next, 1);
63 const MetaSubmessageVec::iterator limit = vec.end();
65 for (; next != limit; ++pos, ++next) {
size_t dedup(MetaSubmessageVec &vec)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.