CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OSDeclaration.hpp
Go to the documentation of this file.
1 #pragma once
3 
4 #ifdef DOXY
5 #define DEBUG
7 #undef DEBUG
8 #else
9 //#define FAKE_POSIX
10 #define TARGET_OS_WINDOWS
11 #define TARGET_OS_MAC
12 #define TARGET_OS_LINUX
13 
14 #if !defined(_WIN32) || defined(FAKE_POSIX)
15 #undef TARGET_OS_WINDOWS
16 #endif
17 #ifndef __APPLE__
18 #undef TARGET_OS_MAC
19 #endif
20 #if !defined(__linux__) && !defined(FAKE_POSIX)
21 #undef TARGET_OS_LINUX
22 #endif
23 #endif
24 
25 namespace CYB {
26  namespace API {
28  class Platform {
29  public:
31  enum Identifier : unsigned int {
32  ALL = 0xFFFFFFFF,
33  POSIX = 1,
34  LINUX = 3,
35  OSX = 5,
36  WINDOWS = 2,
37  };
38  public:
43  static constexpr Identifier Current(void);
44 
49  static constexpr bool IsDebug(void);
54  static constexpr bool IsTest(void);
55  };
56  }
57 }
58 
59 #include "OSDeclaration.inl"
static constexpr bool IsDebug(void)
Get if the current compilation is a debug compilation.
static constexpr bool IsTest(void)
Get if the current compilation is a test compilation.
Strong typing for Platform::Identifier.
Identifier
A bitmask platform identifier. Should be preferred over the macros whenever possible.
static constexpr Identifier Current(void)
Get the current Platform being compiled on.