diff --git a/AuroraEnvironment.hpp b/AuroraEnvironment.hpp index 4e0c451..42b7277 100644 --- a/AuroraEnvironment.hpp +++ b/AuroraEnvironment.hpp @@ -14,50 +14,128 @@ extern "C" #include "AuroraEnvironment.h" } +#if defined(_AUHAS_AURORAENUM) && defined(_ALLOW_AURORA_ENUM_AUENVHPP) + #include + #include + +#define AUENVHPP_START_ENUM(platform, ...) \ + AUE_DEFINE(platform, (__VA_ARGS__)) + +#else +#define AUENVHPP_START_ENUM(platform, ...) \ + enum class platform \ + { \ + eEnumInvalid = -1, \ + __VA_ARGS__ \ + }; +#endif + namespace Aurora::Build { - enum class ECompiler - { - eInvaild = -1, + AUENVHPP_START_ENUM(ECompiler, eMSVC, eClang, - eGCC - }; + eGCC, + eIntelInside + ); #if defined(AURORA_COMPILER_CLANG) - static const ECompiler kCurrentECompiler = ECompiler::eClang; + static const ECompiler kCurrentCompiler = ECompiler::eClang; #elif defined(AURORA_COMPILER_MSVC) - static const ECompiler kCurrentECompiler = ECompiler::eMSVC; + static const ECompiler kCurrentCompiler = ECompiler::eMSVC; #elif defined(AURORA_COMPILER_GCC) - static const ECompiler kCurrentECompiler = ECompiler::eGCC; + static const ECompiler kCurrentCompiler = ECompiler::eGCC; + #elif defined(AURORA_COMPILER_INTEL) + static const ECompiler kCurrentCompiler = ECompiler::eIntelInside; #else - static const ECompiler kCurrentECompiler = ECompiler::eInvaild; + static const ECompiler kCurrentCompiler = ECompiler::eEnumInvalid; #endif - enum class EPlatform + enum class EPlatformLTS { eInvalid = -1, - + eKernelLinux, + eKernelBsd, eKernelNtos, - - ePlatformWin32, + eKernelReserved1, + eKernelReserved2, + eKernelReserved3, + + ePlatformWin32, // including padding for future OSes + ePlatformUWP, + ePlatformBSD, ePlatformAndroid, ePlatformLinux, - ePlatformApple, + ePlatformAppleMacOS, ePlatformIos, - ePlatformSwitch, + ePlatformRTOS, + ePlatformNX, ePlatformPS4, ePlatformPS5, + ePlatformPS6, + ePlatformPS7, ePlatformXbone, + ePlatformXbone2020, + ePlatformXboneReserved, + ePlatformXboneReserved2, + ePlatformXboneReserved3, + ePlatformNxPlusOne, + ePlatformNxPlusTwo, + ePlatformNxPlusThree, + ePlatformUWPAlt1, + ePlatformUWPAlt2, + ePlatformAppleAlt1, + ePlatformAppleAlt2, ePlatformWii, - ePlatformWiiU + ePlatformWiiU, + + ePlatformMCU = 60, + ePlatformMPU = 70, + + ePlatformUserReserved1 = 100, + ePlatformUserReserved2, + ePlatformUserReserved3, }; + + AUENVHPP_START_ENUM(EPlatform, + eKernelLinux, + eKernelBsd, + eKernelNtos, + eKernelReserved1, + eKernelReserved2, + eKernelReserved3, + ePlatformWin32, + ePlatformUWP, + ePlatformBSD, + ePlatformAndroid, + ePlatformLinux, + ePlatformAppleMacOS, + ePlatformIos, + ePlatformRTOS, + ePlatformNX, + ePlatformPS4, + ePlatformPS5, + ePlatformPS6, + ePlatformPS7, + ePlatformXbone, + ePlatformXbone2020, + ePlatformXboneReserved, + ePlatformXboneReserved2, + ePlatformXboneReserved3, + ePlatformNxPlusOne, + ePlatformNxPlusTwo, + ePlatformNxPlusThree + ) #if defined(AURORA_PLATFORM_KERNEL_LINUX) static const EPlatform kCurrentPlatform = EPlatform::eKernelLinux; #elif defined(AURORA_PLATFORM_NTOS) static const EPlatform kCurrentPlatform = EPlatform::eKernelNtos; + #elif defined(AURORA_PLATFORM_KERNEL_FREEBSD) || defined(AURORA_PLATFORM_KERNEL_LAIN) + static const EPlatform kCurrentPlatform = EPlatform::eKernelBsd; + #elif defined(AURORA_PLATFORM_BSD) + static const EPlatform kCurrentPlatform = EPlatform::ePlatformBSD; #elif defined(AURORA_PLATFORM_WIN32) static const EPlatform kCurrentPlatform = EPlatform::ePlatformWin32; #elif defined(AURORA_PLATFORM_ANDROID) @@ -65,7 +143,7 @@ namespace Aurora::Build #elif defined(AURORA_PLATFORM_LINUX) static const EPlatform kCurrentPlatform = EPlatform::ePlatformLinux; #elif defined(AURORA_PLATFORM_APPLE) - static const EPlatform kCurrentPlatform = EPlatform::ePlatformApple; + static const EPlatform kCurrentPlatform = EPlatform::ePlatformAppleMacOS; #elif defined(AURORA_PLATFORM_IOS) static const EPlatform kCurrentPlatform = EPlatform::ePlatformIos; #elif defined(AURORA_PLATFORM_SWITCH) @@ -81,21 +159,16 @@ namespace Aurora::Build #elif defined(AURORA_PLATFORM_WII_U) static const EPlatform kCurrentPlatform = EPlatform::ePlatformWiiU; #else - static const EPlatform kCurrentPlatform = EPlatform::eInvalid; + static const EPlatform kCurrentPlatform = EPlatform::eEnumInvalid; #endif - enum class EVendor - { - eInvalid = -1, - eUnknown = 0, - + AUENVHPP_START_ENUM(EVendor, eConsoleMicrosft, eConsoleSony, eConsoleNintendo, - eGenericApple, - eGenericMicrosoft, - }; + eGenericMicrosoft + ) #if defined(VENDOR_CONSOLE_MICROSOFT) static const EVendor kCurrentVendor = EVendor::eConsoleMicrosft; @@ -110,16 +183,14 @@ namespace Aurora::Build #elif defined(VENDOR_UNKNOWN) static const EVendor kCurrentVendor = EVendor::eUnknown; #else - static const EVendor kCurrentVendor = EVendor::eInvalid; + static const EVendor kCurrentVendor = EVendor::eEnumInvalid; #endif - enum class EArchitecture - { - eInvalid = -1, + AUENVHPP_START_ENUM(EArchitecture, eX86_32, eX86_64, eAArch64 - }; + ) #if defined(AURORA_ARCH_X86) static const EArchitecture kCurrentArchitecture = EArchitecture::eX86_32; @@ -128,7 +199,7 @@ namespace Aurora::Build #elif defined(AURORA_ARCH_ARM) static const EArchitecture kCurrentArchitecture = EArchitecture::eAArch64; #else - static const EArchitecture kCurrentArchitecture = EArchitecture::eInvalid; + static const EArchitecture kCurrentArchitecture = EArchitecture::eEnumInvalid; #endif @@ -137,9 +208,7 @@ namespace Aurora::Build return kCurrentArchitecture == EArchitecture::eX86_32; } - enum class EABI - { - eInvalid = -1, + AUENVHPP_START_ENUM(EABI, // MSFTs in house amd64 abi eMSFT64, // MSFTs in house aarch64 abi @@ -154,7 +223,7 @@ namespace Aurora::Build eMSFTAArchIntelBridge, // other arm EPlatforms... eLLVMArm - }; + ); #if defined(AURORA_ABI_MSFT_64) static const EABI kCurrentABI = EABI::eMSFT64; @@ -169,14 +238,13 @@ namespace Aurora::Build #elif defined(AURORA_ABI_APPLE) static const EABI kCurrentABI = EABI::eAppleArm; #else - static const EABI kCurrentABI = EABI::eInvalid; + static const EABI kCurrentABI = EABI::eEnumInvalid; #endif - enum class ECPUEndian - { + AUENVHPP_START_ENUM(ECPUEndian, eCPUBig, eCPULittle - }; + ); #if defined (AU_CPU_ENDIAN_LITTLE) static const ECPUEndian kCurrentEndian = ECPUEndian::eCPULittle; @@ -189,7 +257,16 @@ namespace Aurora::Build eCpp20, eCpp17, eCpp14, - eC + eC, + eRust, + eGo, + eCs, + eJava, + eJavaScript, + eKotlin, + eHLSL, + gGLSL, + eCpp20Plus = 20 }; #if defined (AU_LANG_CPP_20)