mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
[General] Add new class BasePacketProcessor
This commit is contained in:
parent
691dc75401
commit
48a59cf9e9
1 changed files with 36 additions and 0 deletions
36
components/openmw-mp/Base/BasePacketProcessor.hpp
Normal file
36
components/openmw-mp/Base/BasePacketProcessor.hpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
//
|
||||
// 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();
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
#endif //OPENMW_BASEPACKETPROCESSOR_HPP
|
Loading…
Reference in a new issue