diff options
author | crupest <crupest@outlook.com> | 2022-01-25 17:48:53 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-25 17:48:53 +0800 |
commit | 71c01a175a939d1a519ab235fdfdeec1101f8b84 (patch) | |
tree | 5d639e2f7bdfd08348e41bb2a64c67f0c5662d2f /include/cru/common | |
parent | 839292efaaf8d997b2cbca7abae8c6e575f6c01a (diff) | |
download | cru-71c01a175a939d1a519ab235fdfdeec1101f8b84.tar.gz cru-71c01a175a939d1a519ab235fdfdeec1101f8b84.tar.bz2 cru-71c01a175a939d1a519ab235fdfdeec1101f8b84.zip |
...
Diffstat (limited to 'include/cru/common')
-rw-r--r-- | include/cru/common/io/FileStream.hpp | 4 | ||||
-rw-r--r-- | include/cru/common/platform/unix/ErrnoException.hpp (renamed from include/cru/common/ErrnoException.hpp) | 10 | ||||
-rw-r--r-- | include/cru/common/platform/unix/UnixFileStream.hpp (renamed from include/cru/common/io/UnixFileStream.hpp) | 18 |
3 files changed, 16 insertions, 16 deletions
diff --git a/include/cru/common/io/FileStream.hpp b/include/cru/common/io/FileStream.hpp index 73c7b61e..86c4c037 100644 --- a/include/cru/common/io/FileStream.hpp +++ b/include/cru/common/io/FileStream.hpp @@ -1,9 +1,9 @@ #pragma once #ifdef CRU_PLATFORM_UNIX -#include "UnixFileStream.hpp" +#include "../platform/unix/UnixFileStream.hpp" namespace cru::io { -using FileStream = UnixFileStream; +using FileStream = platform::unix::UnixFileStream; } #elif CRU_PLATFORM_WINDOWS #include "../platform/win/Win32FileStream.hpp" diff --git a/include/cru/common/ErrnoException.hpp b/include/cru/common/platform/unix/ErrnoException.hpp index d1390cf2..2982e26a 100644 --- a/include/cru/common/ErrnoException.hpp +++ b/include/cru/common/platform/unix/ErrnoException.hpp @@ -1,13 +1,13 @@ #pragma once -#include "PreConfig.hpp" +#include "../../PreConfig.hpp" #ifdef CRU_PLATFORM_UNIX -#include "Exception.hpp" +#include "../Exception.hpp" -namespace cru { -class ErrnoException : public Exception { +namespace cru::platform::unix { +class ErrnoException : public PlatformException { public: ErrnoException() : ErrnoException(String{}) {} explicit ErrnoException(const String& message); @@ -23,6 +23,6 @@ class ErrnoException : public Exception { private: int errno_code_; }; -} // namespace cru +} // namespace cru::platform::unix #endif diff --git a/include/cru/common/io/UnixFileStream.hpp b/include/cru/common/platform/unix/UnixFileStream.hpp index 633b9bd1..618f7aa3 100644 --- a/include/cru/common/io/UnixFileStream.hpp +++ b/include/cru/common/platform/unix/UnixFileStream.hpp @@ -1,17 +1,17 @@ #pragma once -#include "../PreConfig.hpp" +#include "../../PreConfig.hpp" #ifdef CRU_PLATFORM_UNIX -#include "../String.hpp" -#include "OpenFileFlag.hpp" -#include "Stream.hpp" +#include "../../String.hpp" +#include "../../io/OpenFileFlag.hpp" +#include "../../io/Stream.hpp" -namespace cru::io { -class UnixFileStream : public Stream { +namespace cru::platform::unix { +class UnixFileStream : public io::Stream { public: - UnixFileStream(String path, OpenFileFlag flags); + UnixFileStream(String path, io::OpenFileFlag flags); CRU_DELETE_COPY(UnixFileStream) CRU_DELETE_MOVE(UnixFileStream) @@ -38,10 +38,10 @@ class UnixFileStream : public Stream { private: String path_; - OpenFileFlag flags_; + io::OpenFileFlag flags_; int file_descriptor_; bool closed_ = false; }; -} // namespace cru::io +} // namespace cru::platform::unix #endif |