cubos::core::data::BinarySerializer class

Implementation of the abstract Serializer class meant to serialize data in a non-readable but fast and compact way.

Base classes

class Serializer
Base class for serializers, which defines the interface for serializing arbitrary data using its reflection metadata.

Constructors, destructors, conversion operators

BinarySerializer(memory::Stream& stream)
Constructs.

Protected functions

auto decompose(const reflection::Type& type, const void* value) -> bool override
Called for each type with no hook defined.

Function documentation

cubos::core::data::BinarySerializer::BinarySerializer(memory::Stream& stream)

Constructs.

Parameters
stream Stream to write to.

bool cubos::core::data::BinarySerializer::decompose(const reflection::Type& type, const void* value) override protected

Called for each type with no hook defined.

Parameters
type Type.
value Value.
Returns Whether the value was successfully serialized.

Should recurse by calling write() again as appropriate.