Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class OutputArchive {
- public:
- void operator()(Entity entity);
- template<typename T>
- void operator()(Entity entity, const T &value) {
- gkDebug() << entity << (void*)&value;
- (*m_packet) << entity << value;
- }
- void setPacket(sf::Packet &packet) { m_packet = &packet; }
- private:
- sf::Packet *m_packet = nullptr;
- };
- class InputArchive {
- public:
- void operator()(Entity &entity);
- template<typename T>
- void operator()(Entity &, T &value) {
- (*m_packet) >> value;
- }
- void setPacket(sf::Packet &packet) { m_packet = &packet; }
- private:
- sf::Packet *m_packet = nullptr;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement