| 12 | using namespace OpenDDS::DCPS; |
| 13 | |
| 14 | struct TestKey { |
| 15 | TestKey(const GUID_t& from, const GUID_t& to) : from_(from), to_(to) {} |
| 16 | TestKey(const TestKey& val) : from_(val.from_), to_(val.to_) {} |
| 17 | bool operator<(const TestKey& rhs) const { |
| 18 | const int from_comp = std::memcmp(&from_, &rhs.from_, sizeof (GUID_t)); |
| 19 | if (from_comp < 0) { |
| 20 | return true; |
| 21 | } else if (from_comp == 0) { |
| 22 | return std::memcmp(&to_, &rhs.to_, sizeof (GUID_t)) < 0; |
| 23 | } |
| 24 | return false; |
| 25 | } |
| 26 | bool operator==(const TestKey& rhs) const { |
| 27 | const int from_comp = std::memcmp(&from_, &rhs.from_, sizeof (GUID_t)); |
| 28 | const int to_comp = std::memcmp(&to_, &rhs.to_, sizeof (GUID_t)); |
| 29 | return from_comp == 0 && to_comp == 0; |
| 30 | } |
| 31 | void get_contained_guids(RepoIdSet& set) const { |
| 32 | set.clear(); |
| 33 | set.insert(from_); |
| 34 | set.insert(to_); |
| 35 | } |
| 36 | GUID_t from_; |
| 37 | GUID_t to_; |
| 38 | }; |
| 39 | |
| 40 | #define NOOP |
| 41 | |