Core: Add serialization interface
Former-commit-id: cfa749dba1b6f23ef8f38519e0bc9ad9492e3db3
This commit is contained in:
@@ -9,8 +9,11 @@
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Enums.hpp>
|
||||
#include <Nazara/Core/InputStream.hpp>
|
||||
#include <Nazara/Core/OutputStream.hpp>
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
@@ -26,8 +29,15 @@ namespace Nz
|
||||
template<typename T>
|
||||
struct TypeTag {};
|
||||
|
||||
inline bool Serialize(OutputStream* output, bool value);
|
||||
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_arithmetic<T>::value, bool> Serialize(OutputStream* output, T value);
|
||||
|
||||
inline bool Unserialize(InputStream* input, bool* value);
|
||||
|
||||
template<typename T>
|
||||
std::enable_if_t<std::is_arithmetic<T>::value, bool> Unserialize(InputStream* input, T* value);
|
||||
}
|
||||
|
||||
#include <Nazara/Core/Algorithm.inl>
|
||||
|
||||
Reference in New Issue
Block a user