diff options
author | crupest <crupest@outlook.com> | 2019-06-27 17:02:58 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-06-27 17:02:58 +0800 |
commit | b53527fbe50a953ad0e3225cc812eb76b8a1f82d (patch) | |
tree | eb81cd14d0a165c47f841ad94835f8987109de7e /include/cru/win/native/platform_id.hpp | |
parent | 8c5b05bcfce96495b4ffc4209ab8feda12597729 (diff) | |
download | cru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.tar.gz cru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.tar.bz2 cru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.zip |
...
Diffstat (limited to 'include/cru/win/native/platform_id.hpp')
-rw-r--r-- | include/cru/win/native/platform_id.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/cru/win/native/platform_id.hpp b/include/cru/win/native/platform_id.hpp new file mode 100644 index 00000000..4b018d51 --- /dev/null +++ b/include/cru/win/native/platform_id.hpp @@ -0,0 +1,19 @@ +#pragma once +#include <cru/platform/native_resource.hpp> + +#include <stdexcept> +#include <string_view> + +namespace cru::platform::native::win { +constexpr std::wstring_view win_platform_id = L"Windows"; + +inline bool IsWindowsResource(NativeResource* resource) { + return resource->GetPlatformId() == win_platform_id; +} + +} // namespace cru::platform::native::win + +#define CRU_PLATFORMID_IMPLEMENT_WIN \ + std::wstring_view GetPlatformId() const override { \ + return ::cru::platform::native::win::win_platform_id; \ + } |