Every single piece of code wrote today may or not change, but it will probably change because ill find a better way to do it xD
18 lines
319 B
C++
18 lines
319 B
C++
#ifndef SERIALIZER_HPP
|
|
#define SERIALIZER_HPP
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "Defs.hpp"
|
|
|
|
#include <array>
|
|
|
|
class Serializer
|
|
{
|
|
template<typename T> std::array<byte, sizeof(T)> to_bytes(const T& object);
|
|
template<typename T> T& from_bytes(const std::array<byte, sizeof(T)> &bytes, T& object);
|
|
};
|
|
|
|
#endif |