This commit is contained in:
2024-10-06 19:15:14 +02:00
parent 5d32eda090
commit 701b815dc1
14 changed files with 734 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#pragma once
#include <td/protocol/Packets.h>
#include <memory>
namespace td {
namespace protocol {
namespace PacketFactory {
template<typename PacketDerived, typename = typename std::enable_if<std::is_base_of<Packet, PacketDerived>::value>::type>
std::unique_ptr<PacketDerived> CreatePacket() {
return std::make_unique<PacketDerived>();
}
const std::unique_ptr<Packet>& CreateReadOnlyPacket(PacketType a_Type);
} // namespace PacketFactory
} // namespace protocol
} // namespace td