diff options
author | crupest <crupest@outlook.com> | 2022-01-15 22:41:11 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-15 22:41:11 +0800 |
commit | 570e95f4551385a81eb2cf6f2e386e3b0cb291a8 (patch) | |
tree | 8ed08ab29f49b260ac66e88a75aa436c4daefb57 /include/cru/common/io | |
parent | abb9d48a72e2d580d6bfbfcb600795c5ec66e204 (diff) | |
download | cru-570e95f4551385a81eb2cf6f2e386e3b0cb291a8.tar.gz cru-570e95f4551385a81eb2cf6f2e386e3b0cb291a8.tar.bz2 cru-570e95f4551385a81eb2cf6f2e386e3b0cb291a8.zip |
...
Diffstat (limited to 'include/cru/common/io')
-rw-r--r-- | include/cru/common/io/Stream.hpp | 2 | ||||
-rw-r--r-- | include/cru/common/io/UnixFileStream.hpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/cru/common/io/Stream.hpp b/include/cru/common/io/Stream.hpp index d75f3ee3..fedd4a0f 100644 --- a/include/cru/common/io/Stream.hpp +++ b/include/cru/common/io/Stream.hpp @@ -30,6 +30,8 @@ class CRU_BASE_API Stream : public Object { 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 void Flush(); diff --git a/include/cru/common/io/UnixFileStream.hpp b/include/cru/common/io/UnixFileStream.hpp index 8bd3829a..633b9bd1 100644 --- a/include/cru/common/io/UnixFileStream.hpp +++ b/include/cru/common/io/UnixFileStream.hpp @@ -25,9 +25,11 @@ class UnixFileStream : public Stream { bool CanRead() override; Index Read(std::byte* buffer, Index offset, Index size) override; + using Stream::Read; bool CanWrite() override; Index Write(const std::byte* buffer, Index offset, Index size) override; + using Stream::Write; void Close() override; @@ -36,7 +38,7 @@ class UnixFileStream : public Stream { private: String path_; - OpenFileFlag flags; + OpenFileFlag flags_; int file_descriptor_; bool closed_ = false; }; |