From 74bb9cd27242b9320f99ff4d2b50c3051576cc14 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 8 Feb 2022 16:53:51 +0800 Subject: ... --- include/cru/common/io/Stream.hpp | 48 ---------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 include/cru/common/io/Stream.hpp (limited to 'include/cru/common/io/Stream.hpp') diff --git a/include/cru/common/io/Stream.hpp b/include/cru/common/io/Stream.hpp deleted file mode 100644 index 131e82e9..00000000 --- a/include/cru/common/io/Stream.hpp +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include "../Base.hpp" - -#include "../String.hpp" - -#include -#include - -namespace cru::io { -class CRU_BASE_API Stream : public Object { - public: - enum class SeekOrigin { Current, Begin, End }; - - Stream() = default; - - CRU_DELETE_COPY(Stream) - CRU_DELETE_MOVE(Stream) - - ~Stream() override = default; - - public: - virtual bool CanSeek() = 0; - virtual Index Seek(Index offset, SeekOrigin origin = SeekOrigin::Current) = 0; - virtual Index Tell(); - virtual void Rewind(); - virtual Index GetSize(); - - virtual bool CanRead() = 0; - virtual Index Read(std::byte* buffer, Index offset, Index size) = 0; - virtual Index Read(std::byte* buffer, Index size); - - virtual bool CanWrite() = 0; - virtual Index Write(const std::byte* buffer, Index offset, Index size) = 0; - virtual Index Write(const std::byte* buffer, Index size); - Index Write(const char* buffer, Index offset, Index size); - Index Write(const char* buffer, Index size); - - virtual std::vector ReadAll(); - - // Utf8 encoding. - String ReadAllAsString(); - - virtual void Flush(); - - virtual void Close(); -}; -} // namespace cru::io -- cgit v1.2.3