Core: Replace serialization arguments by context structures

Also fixed some endianness errors


Former-commit-id: 450849e681a9b002c3d501a856a8481470d08dea
This commit is contained in:
Lynix
2015-11-19 13:25:07 +01:00
parent bc4eb96af2
commit 1c8a09f90c
9 changed files with 164 additions and 46 deletions

View File

@@ -9,6 +9,7 @@
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/Endianness.hpp>
#include <Nazara/Core/Serialization.hpp>
#include <atomic>
#include <iosfwd>
#include <memory>
@@ -17,11 +18,6 @@
namespace Nz
{
class AbstractHash;
class HashDigest;
class InputStream;
class OutputStream;
class NAZARA_CORE_API String
{
public:
@@ -326,9 +322,11 @@ namespace Nz
};
};
class AbstractHash;
inline bool HashAppend(AbstractHash* hash, const String& string);
NAZARA_CORE_API bool Serialize(OutputStream* output, const String& string, Endianness dataEndianness);
NAZARA_CORE_API bool Unserialize(InputStream* input, String* string, Endianness dataEndianness);
NAZARA_CORE_API bool Serialize(SerializationContext& context, const String& string);
NAZARA_CORE_API bool Unserialize(UnserializationContext& context, String* string);
}
namespace std