22 #ifndef __M2ETIS_MESSAGE_DETMERGEORDERINFO_H__
23 #define __M2ETIS_MESSAGE_DETMERGEORDERINFO_H__
30 #include "boost/serialization/base_object.hpp"
31 #include "boost/serialization/shared_ptr.hpp"
36 template<
class Config>
39 typedef boost::shared_ptr<DetMergeOrderInfo>
Ptr;
57 template <
typename Archive>
74 if (r + c == other.
r + other.
c) {
75 uint64_t e = Config::eps;
76 size_t c1 = size_t(c), c2 = size_t(other.
c);
79 if (!(c1 < 2 * Config::eps && c2 < 2 * Config::eps)) {
82 if (kn[c1] != other.
kn[c2]) {
83 return kn[c1] < other.
kn[c2];
90 return unique < other.
unique;
92 return r + c < other.
r + other.
c;
100 std::stringstream ss;
101 ss <<
"TS: {r: " << r <<
", c: " << c <<
", kn: ";
102 for (
unsigned int t = 0; t < Config::eps * 2; ++t) {
105 ss <<
"u: " << unique <<
"}";
120 return *(
ts.get()) < *(other.
ts.get());
130 template <
typename Archive>
131 void serialize(Archive & ar,
const unsigned int ) {
132 ar & boost::serialization::base_object<OrderInfo>(*this);
bool operator<(const struct Timestamp &other)
compares two structs
boost::shared_ptr< DetMergeOrderInfo > Ptr
struct m2etis::message::DetMergeOrderInfo::Timestamp Timestamp
represents a timestamp
DetMergeOrderInfo(const DetMergeOrderInfo &other)
timestamp_p ts
timestamp for this OrderInfo
friend class boost::serialization::access
std::string toString() const
creates a readable string out o f a timestamp
bool operator<(const DetMergeOrderInfo &other) const
compares two orderinfos by their timestamp
void serialize(Archive &ar, const unsigned int)
boost::shared_ptr< Timestamp > timestamp_p
static bool doSerialize(ActionType t)
don't serialise this for SUB and UNSUB msgs