Expand SerializeIF #656
- Add various helper methods for deserializing/deserializing to big(network) endianness or native endianness. This avoids boilerplate code or re-implementing simple helpers over and over again
serializeBe: Calls serialize with big (network) endianness
- Add default implementations for serialize and deSerialize which do not perform pointer arithmetic. There is usually no need to re-implement those on demand, their default implementation can be derived from the one performing pointer arithmetic
Also adds unit test module for the new API
I updated the methods to be able to return the serialized and deserialized size. I think this is still a very useful value to know.
On a sidenote:
If someone wants to use the new API, they have to prepend the regular method call with
auto foo FooWhichImplementsSerializeIF(...); foo.SerializeIF::serialize(data, size);
This is relatively new for me. To make the regular
foo.serialize(...) work, something like a base class is probably necessary, but I am not fully sure about that. From an API standpoint, I'd prefer it if one could just all
.serialize. But this is probably a topic for another issue/PR
No due date set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?