// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com) // This file is part of the "Nazara Engine - Core module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_CORE_OWNEDMEMORYSTREAM_HPP #define NAZARA_CORE_OWNEDMEMORYSTREAM_HPP #include #include #include namespace Nz { class NAZARA_CORE_API OwnedMemoryStream : public MemoryStream { public: inline OwnedMemoryStream(OpenModeFlags openMode = OpenMode_ReadWrite); inline OwnedMemoryStream(ByteArray byteArray, OpenModeFlags openMode = OpenMode_ReadWrite); OwnedMemoryStream(const OwnedMemoryStream&) = delete; OwnedMemoryStream(OwnedMemoryStream&&) noexcept = default; ~OwnedMemoryStream() = default; OwnedMemoryStream& operator=(const OwnedMemoryStream&) = delete; OwnedMemoryStream& operator=(OwnedMemoryStream&&) noexcept = default; private: using MemoryStream::SetBuffer; ByteArray m_ownedByteArray; }; } #include #endif // NAZARA_CORE_OWNEDMEMORYSTREAM_HPP