diff options
| author | crupest <crupest@outlook.com> | 2022-02-08 16:53:51 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-02-08 16:53:51 +0800 |
| commit | 74bb9cd27242b9320f99ff4d2b50c3051576cc14 (patch) | |
| tree | 744bac5799c593d1d6f81e7b09581bea626f2cde /include/cru/common/io/Stream.hpp | |
| parent | b90c398de829d1ba5329651d75bae82f5e4085fe (diff) | |
| download | cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.gz cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.tar.bz2 cru-74bb9cd27242b9320f99ff4d2b50c3051576cc14.zip | |
...
Diffstat (limited to 'include/cru/common/io/Stream.hpp')
| -rw-r--r-- | include/cru/common/io/Stream.hpp | 48 |
1 files changed, 0 insertions, 48 deletions
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 <cstddef> -#include <vector> - -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<std::byte> ReadAll(); - - // Utf8 encoding. - String ReadAllAsString(); - - virtual void Flush(); - - virtual void Close(); -}; -} // namespace cru::io |
