Class UUIDSerializer

Class Documentation

class UUIDSerializer

Helper/utility class for reading/writing UUIDs.

In homogeneous environments, or in usages not involving network transport or storage that will be written and read by the same operating system or platform, this class would not typically be required, as the UUID data can easily be represented by two 64-bit integers.

In heterogenous environments, especially those involving Windows and non-Windows machines reading and writing the same UUID data, the nature of UUID storage format on Windows requires special handling. To avoid any issues in these cases, it is recommended that the user employ the UUIDSerializer class whenever transport or storage of the UUID data is likely.

Note

UUIDSerializer is not a Serializer implementation and should not be treated as one; it is instead a helper class that uses a user-provided Serializer implementation internally.

Public Functions

UUIDSerializer(Serializer *serializer)
~UUIDSerializer()
size_t Write(const utility::UUID &uuid)

Write the uuid to the underlying serializer.

size_t Read(utility::UUID *uuid)

Read a uuid from the underlying serializer.