World serialization done (not well-tested yet)

This commit is contained in:
2021-03-16 12:19:37 -04:00
parent 7c9fd1e46b
commit a64e339b6b
8 changed files with 111 additions and 52 deletions

View File

@@ -3,15 +3,14 @@
#include <cstdint>
#include <set>
#include "streambuffer.hpp"
class SchedEntry {
private:
friend class Schedule;
int64_t clock_;
int64_t thread_id_;
int64_t place_id_;
int func_args_;
public:
int64_t clock() const { return clock_; }
@@ -34,6 +33,9 @@ public:
void add(int64_t clk, int64_t thid, int64_t plid);
bool ready(int64_t clk) const;
SchedEntry pop();
void serialize(StreamBuffer *sb);
void deserialize(StreamBuffer *sb);
};
#endif // SCHED_HPP