Load packets using a packet factory

This commit is contained in:
Dan Paulat 2021-12-28 16:52:22 -06:00
parent 0ef21fd609
commit ae7baf0980
4 changed files with 155 additions and 14 deletions

View file

@ -0,0 +1,30 @@
#pragma once
#include <scwx/wsr88d/rpg/packet.hpp>
namespace scwx
{
namespace wsr88d
{
namespace rpg
{
class PacketFactory
{
private:
explicit PacketFactory() = delete;
~PacketFactory() = delete;
PacketFactory(const PacketFactory&) = delete;
PacketFactory& operator=(const PacketFactory&) = delete;
PacketFactory(PacketFactory&&) noexcept = delete;
PacketFactory& operator=(PacketFactory&&) noexcept = delete;
public:
static std::shared_ptr<Packet> Create(std::istream& is);
};
} // namespace rpg
} // namespace wsr88d
} // namespace scwx