mal-packet-weaver
C++20 packet serialization/deserialization library.
Loading...
Searching...
No Matches
packet.hpp File Reference
#include "../common.hpp"
#include <cereal/archives/portable_binary.hpp>
#include <cereal/types/map.hpp>
#include <cereal/types/vector.hpp>
#include <cereal/types/string.hpp>
Include dependency graph for packet.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mal_packet_weaver::Packet
 Base class for all packets. More...
 
class  mal_packet_weaver::DerivedPacket< PacketType >
 A templated class representing a derived packet from the base Packet class. More...
 

Namespaces

namespace  mal_packet_weaver
 This is the main namespace for the Mal Packet Weaver library.
 

Concepts

concept  mal_packet_weaver::IsPacket
 Concept to check if a given type satisfies the requirements of being a packet.
 

Typedefs

using mal_packet_weaver::PacketSubsystemID = uint16_t
 Type alias for packet subsystem IDs.
 
using mal_packet_weaver::PacketID = uint16_t
 Type alias for packet IDs.
 
using mal_packet_weaver::UniquePacketID = uint32_t
 Unique identifier for a packet, combining subsystem and packet IDs.
 
using mal_packet_weaver::PacketDeserializeFunc = std::function<std::unique_ptr<Packet>(const ByteView)>
 Type alias for packet deserialization function.
 

Functions

constexpr uint32_t mal_packet_weaver::PacketSubsystemIDToUint32 (PacketSubsystemID subsystem_type) noexcept
 Convert a PacketSubsystemID to a uint32_t value.
 
constexpr PacketSubsystemID mal_packet_weaver::UniquePacketIDToPacketSubsystemID (UniquePacketID subsystem_type) noexcept
 Extract PacketSubsystemID from a UniquePacketID.
 
constexpr PacketID mal_packet_weaver::UniquePacketIDToPacketID (UniquePacketID subsystem_type) noexcept
 Extract PacketID from a UniquePacketID.
 
constexpr UniquePacketID mal_packet_weaver::CreatePacketID (PacketSubsystemID subsystem_id, PacketID packet_id) noexcept
 Create a UniquePacketID from subsystem and packet IDs.