#pragma once #include #include namespace sp { class PacketHandler; using PacketID = std::uint8_t; using PacketMessage = Message< option::MsgIdType, // add id() operation option::Handler // add dispatch() operation >; #define PacketConstructor(packetName) \ packetName##Packet() {} \ template \ packetName##Packet(Args... args) { \ Construct(args...); \ } #define DeclarePacket(packetName) \ class packetName##Packet : public sp::MessageBase, sp::option::FieldsImpl>, \ sp::option::ToStringImpl } // namespace sp