diff options
author | crupest <crupest@outlook.com> | 2022-09-29 21:01:54 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-09-29 21:01:54 +0800 |
commit | df8b9536b1b351a5f8d3809405a89aa5df79aee9 (patch) | |
tree | 6dac3f5ea8ef0a0178fadd5e07ccc0f23e1f3ece /include | |
parent | 65f920e9b88dc89124b286d82668ece9178a665f (diff) | |
download | cru-df8b9536b1b351a5f8d3809405a89aa5df79aee9.tar.gz cru-df8b9536b1b351a5f8d3809405a89aa5df79aee9.tar.bz2 cru-df8b9536b1b351a5f8d3809405a89aa5df79aee9.zip |
...
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/common/platform/web/WebException.h | 16 | ||||
-rw-r--r-- | include/cru/common/platform/web/WebFileStream.h | 21 |
2 files changed, 37 insertions, 0 deletions
diff --git a/include/cru/common/platform/web/WebException.h b/include/cru/common/platform/web/WebException.h new file mode 100644 index 00000000..d98b8943 --- /dev/null +++ b/include/cru/common/platform/web/WebException.h @@ -0,0 +1,16 @@ +#pragma once + +#include "../../PreConfig.h" + +#ifdef CRU_PLATFORM_EMSCRIPTEN + +#include "../Exception.h" + +namespace cru::platform::web { +class WebException : public PlatformException { + public: + using PlatformException::PlatformException; +}; +} // namespace cru::platform::web + +#endif diff --git a/include/cru/common/platform/web/WebFileStream.h b/include/cru/common/platform/web/WebFileStream.h new file mode 100644 index 00000000..66ee0903 --- /dev/null +++ b/include/cru/common/platform/web/WebFileStream.h @@ -0,0 +1,21 @@ +#pragma once + +#include "../../PreConfig.h" + +#ifdef CRU_PLATFORM_EMSCRIPTEN + +#include "../../io/Stream.h" + +namespace cru::platform::web { +/** + * \remark Web just hates filesystems. But luckily emscripten just creates a + * good simulation of it. All we need to do is to use the C api and let + * emscripten take care of it for us. + */ +class WebFileStream : public io::Stream { + public: + // TODO: go on this! +}; +} // namespace cru::platform::web + +#endif |