#include <msp/strings/format.h>
#include <msp/strings/lexicalcast.h>
#include "protocol.h"
-#include "protocol_impl.h"
using namespace std;
delete i->second;
}
+unsigned Protocol::get_next_packet_class_id()
+{
+ static unsigned next_id = 1;
+ return next_id++;
+}
+
void Protocol::add_packet(PacketDefBase *pdef)
{
PacketDefBase *&ptr = packet_class_defs[pdef->get_class_id()];
}
-unsigned Protocol::PacketDefBase::next_class_id = 1;
-
Protocol::PacketDefBase::PacketDefBase(unsigned i):
id(i)
{ }