32 #include "Serialization.h" 33 #include "SerializationOps.h" 36 #ifndef DOXYGEN_SHOULD_SKIP_THIS 71 deserializer | type | data;
72 assert(T::type == type);
80 void is(
const T& data) {
85 serializer | type |
const_cast<T&
>(data);
90 #ifndef DOXYGEN_SHOULD_SKIP_THIS A deserializer from a binary file.
Definition: Serialization.h:151
Id getType()
Get the type of the underlying bytes.
Definition: Packet.h:51
void is(const T &data)
Serialize the object into bytes.
Definition: Packet.h:80
constexpr Id InvalidId
The invalid id (which is 0)
Definition: Id.h:43
A packet of bytes.
Definition: Packet.h:44
A serializer to a binary file.
Definition: Serialization.h:43
The namespace for gf classes.
Definition: Action.h:35
uint64_t Id
An identifier.
Definition: Id.h:37
Buffer output stream.
Definition: Streams.h:266
std::vector< uint8_t > bytes
The bytes representing the object.
Definition: Packet.h:46
T as()
Deserialize the underlying bytes into an object.
Definition: Packet.h:66