aboutsummaryrefslogtreecommitdiff
path: root/include/Platform.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Platform.hpp')
-rw-r--r--include/Platform.hpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/Platform.hpp b/include/Platform.hpp
index ffe7038..3ae3d24 100644
--- a/include/Platform.hpp
+++ b/include/Platform.hpp
@@ -29,9 +29,9 @@ namespace sibs
PLATFORM_OPENBSD32 = 1 << 12 | PLATFORM_OPENBSD,
PLATFORM_OPENBSD64 = 1 << 13 | PLATFORM_OPENBSD,
- PLATFORM_HAIKU = 1 << 20,
- PLATFORM_HAIKU32 = 1 << 21 | PLATFORM_HAIKU,
- PLATFORM_HAIKU64 = 1 << 22 | PLATFORM_HAIKU
+ PLATFORM_HAIKU = 1 << 20,
+ PLATFORM_HAIKU32 = 1 << 21 | PLATFORM_HAIKU,
+ PLATFORM_HAIKU64 = 1 << 22 | PLATFORM_HAIKU
};
const StringViewMap<Platform> PLATFORM_BY_NAME = {
@@ -49,13 +49,18 @@ namespace sibs
{ "openbsd", PLATFORM_OPENBSD },
{ "openbsd32", PLATFORM_OPENBSD32 },
{ "openbsd64", PLATFORM_OPENBSD64 },
- { "haiku", PLATFORM_HAIKU },
- { "haiku32", PLATFORM_HAIKU32 },
- { "haiku64", PLATFORM_HAIKU64 },
+ { "haiku", PLATFORM_HAIKU },
+ { "haiku32", PLATFORM_HAIKU32 },
+ { "haiku64", PLATFORM_HAIKU64 },
};
bool containsPlatform(const std::vector<Platform> &platforms, Platform platform);
const char* asString(Platform platform);
Platform getPlatformByName(StringView name);
+ // Return true if both platforms are of same type, for example if platform @a is either win, win32, win64 and @b is either win, win32, win64
bool isSamePlatformFamily(Platform a, Platform b);
+ // Returns true if platform @base is a base platform for platform @platform, for example if @platform is win64 and @base is either win64 or win, then this function return true.
+ // If for example @platform is win64 and @base is win32, then this function returns false.
+ bool isBaseForPlatform(Platform base, Platform platform);
+ Platform getPlatformGenericType(Platform platform);
}