struct prop_t {
unsigned n;
string m;
+
+ MEMBERS(n, m)
+ LEXICOGRAPHIC_COMPARISON(prop_t)
};
+MARSHALLABLE(prop_t)
+
class paxos_protocol {
public:
enum status : status_t { OK, ERR };
bool accept;
prop_t n_a;
string v_a;
+
+ MEMBERS(oldinstance, accept, n_a, v_a)
};
};
-inline unmarshall & operator>>(unmarshall &u, prop_t &a) { return u >> a.n >> a.m; }
-inline marshall & operator<<(marshall &m, prop_t a) { return m << a.n << a.m; }
-inline bool operator>(const prop_t &a, const prop_t &b) { return tie(a.n, a.m) > tie(b.n, b.m); }
-inline bool operator>=(const prop_t &a, const prop_t &b) { return tie(a.n, a.m) >= tie(b.n, b.m); }
-
-inline unmarshall & operator>>(unmarshall &u, paxos_protocol::prepareres &r) {
- return u >> r.oldinstance >> r.accept >> r.n_a >> r.v_a;
-}
-
-inline marshall & operator<<(marshall &m, paxos_protocol::prepareres r) {
- return m << r.oldinstance << r.accept << r.n_a << r.v_a;
-}
+MARSHALLABLE(paxos_protocol::prepareres)
#endif