27 lines
450 B
C++
27 lines
450 B
C++
#pragma once
|
|
|
|
#include <blitz/protocol/Packets.h>
|
|
#include <blitz/protocol/PacketDeclare.h>
|
|
|
|
namespace blitz {
|
|
namespace protocol {
|
|
|
|
#define DeclarePacket(PacketName, ...) \
|
|
virtual void Visit(const packets::PacketName&) {}
|
|
|
|
class PacketVisitor {
|
|
protected:
|
|
PacketVisitor() {}
|
|
virtual ~PacketVisitor() {}
|
|
|
|
public:
|
|
void Check(const Packet& packet);
|
|
|
|
DeclareAllPacket()
|
|
};
|
|
|
|
#undef DeclarePacket
|
|
|
|
} // namespace protocol
|
|
} // namespace blitz
|