2 #define _SERIALIZER_H 1
7 #include <bits/stdint-uintn.h>
11 class ResultReceiver {
13 virtual ~ResultReceiver() = default;
14 virtual void print(uint64_t seq, uint64_t skip, const std::string msg) = 0;
17 class Serializer : public ResultReceiver {
19 ~Serializer() { assert(limit_left <= 0 || pending.empty()); }
20 void print(uint64_t seq, uint64_t skip, const std::string msg) override;
23 uint64_t next_seq = 0;
28 bool operator<(const Element &other) const
30 return seq > other.seq;
33 std::priority_queue<Element> pending;
36 #endif // !defined(_SERIALIZER_H)