You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
//
|
|
|
|
// Created by koncord on 31.03.17.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef OPENMW_BASEPACKETPROCESSOR_HPP
|
|
|
|
#define OPENMW_BASEPACKETPROCESSOR_HPP
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#define BPP_INIT(packet_id) packetID = packet_id; strPacketID = #packet_id; className = typeid(this).name(); avoidReading = false;
|
|
|
|
|
|
|
|
class BasePacketProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
unsigned char GetPacketID()
|
|
|
|
{
|
|
|
|
return packetID;
|
|
|
|
}
|
|
|
|
std::string GetNameOfID()
|
|
|
|
{
|
|
|
|
return strPacketID;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string GetClassName()
|
|
|
|
{
|
|
|
|
return className;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
unsigned char packetID;
|
|
|
|
std::string strPacketID;
|
|
|
|
std::string className;
|
|
|
|
bool avoidReading;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //OPENMW_BASEPACKETPROCESSOR_HPP
|