SHADE_Y3/SHADE_Engine/src/ECS_Base/SHECSMacros.h

31 lines
600 B
C++

#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;
typedef uint32_t SystemTypeID;
typedef uint32_t SystemVersionID;
typedef uint64_t SystemID;
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
#endif