13#pragma warning(disable:4251)
16#ifdef COGSFOUNDATION_BUILD
17#ifdef COGSFOUNDATION_DLL
18#define COGSFOUNDATION_API __declspec(dllexport)
20#define COGSFOUNDATION_API
24#ifdef COGSFOUNDATION_DLL
25#define COGSFOUNDATION_API __declspec(dllimport)
27#define COGSFOUNDATION_API
31#define COGSFOUNDATION_API
34#ifndef COGS_FOUNDATION_SIZE_T_LITERAL_SUFFIX
35#define COGS_FOUNDATION_SIZE_T_LITERAL_SUFFIX 1
41constexpr size_t operator ""_uz(
unsigned long long x)
48#define debug_assert(x) assert(x)
51#define debug_assert(x) ((void)0)
66 template <
typename ClassType,
typename FieldType>
69 return reinterpret_cast<size_t>(&((
static_cast<ClassType *
>(
nullptr))->*ptr));
72 constexpr uint32_t make2CCLE(uint8_t a, uint8_t b) {
73 return (
static_cast<uint32_t
>(b) << 8) | a;
76 constexpr uint32_t make2CCBE(uint8_t a, uint8_t b) {
77 return (
static_cast<uint32_t
>(a) << 8) | b;
80 constexpr uint32_t make4CCLE( uint8_t a, uint8_t b, uint8_t c, uint8_t d ) {
81 return (
static_cast<uint32_t
>(d) << 24) | (
static_cast<uint32_t
>(c) << 16) | (
static_cast<uint32_t
>(b) << 8) | a;
84 constexpr uint32_t make4CCBE( uint8_t a, uint8_t b, uint8_t c, uint8_t d ) {
85 return (
static_cast<uint32_t
>(a) << 24) | (
static_cast<uint32_t
>(b) << 16) | (
static_cast<uint32_t
>(c) << 8) | d;
88 const char* getFoundationVersionString();
Contains all Cogs related functionality.
size_t memberOffset(FieldType ClassType::*ptr)
Find the offset of a pointer to member in a class or struct.