Core/MemoryStream: Add hash overload for MemoryStream

Former-commit-id: ab618e0db87bd85994a3b11a29c7f38e28d8aae3
This commit is contained in:
Lynix 2015-11-19 14:03:26 +01:00
parent 11f85ab9bb
commit 35b27bbe67
2 changed files with 23 additions and 0 deletions

View File

@ -47,6 +47,14 @@ namespace Nz
ByteArray m_buffer; ByteArray m_buffer;
UInt64 m_pos; UInt64 m_pos;
}; };
class AbstractHash;
inline bool HashAppend(AbstractHash* hash, const String& string);
NAZARA_CORE_API bool Serialize(SerializationContext& context, const String& string);
NAZARA_CORE_API bool Unserialize(UnserializationContext& context, String* string);
} }
#include <Nazara/Core/MemoryStream.hpp>
#endif // NAZARA_MEMORYSTREAM_HPP #endif // NAZARA_MEMORYSTREAM_HPP

View File

@ -0,0 +1,15 @@
// Copyright (C) 2015 Jérôme Leclercq
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/Core/Debug.hpp>
namespace Nz
{
inline bool HashAppend(AbstractHash* hash, const MemoryStream& stream)
{
return HashAppend(hash, stream.GetBuffer());
}
}
#include <Nazara/Core/DebugOff.hpp>