2022-09-08 11:08:23 +08:00
|
|
|
#ifndef SH_MACROS_H
|
|
|
|
#define SH_MACROS_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <type_traits>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef uint32_t EntityID;
|
|
|
|
typedef uint16_t EntityIndex;
|
|
|
|
typedef uint32_t ComponentTypeID;
|
2022-09-14 10:32:50 +08:00
|
|
|
typedef uint32_t SystemTypeID;
|
|
|
|
typedef uint32_t SystemVersionID;
|
|
|
|
typedef uint64_t SystemID;
|
2022-09-08 11:08:23 +08:00
|
|
|
|
2022-09-13 14:07:40 +08:00
|
|
|
|
|
|
|
|
2022-09-08 11:08:23 +08:00
|
|
|
const EntityIndex MAX_EID = 51000;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define ENABLE_IF_DERIVED(__RETURN__, __BASE__, __DERIVED__)\
|
|
|
|
std::enable_if_t<std::is_base_of_v<__BASE__,__DERIVED__>,__RETURN__>
|
|
|
|
|
|
|
|
|
|
|
|
#define ENABLE_IF_UINT(_TYPE, _RETURN)\
|
|
|
|
typename std::enable_if<(std::is_integral<_TYPE>::value && !std::is_signed<_TYPE>::value),_RETURN>::type
|
|
|
|
|
2022-09-29 07:59:04 +08:00
|
|
|
#ifdef COMPILING_THE_DLL
|
|
|
|
#ifndef MY_DLL_EXPORT
|
|
|
|
#define MY_DLL_EXPORT __declspec(dllexport)
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#ifndef MY_DLL_EXPORT
|
|
|
|
#define MY_DLL_EXPORT __declspec(dllimport)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2022-09-08 11:08:23 +08:00
|
|
|
#endif
|