5PL_WARNING_DISABLE_MSVC(4985)
27#define PL_DISALLOW_COPY_AND_ASSIGN(type) \
28 type(const type&) = delete; \
29 void operator=(const type&) = delete
31#if PL_ENABLED(PL_COMPILE_FOR_DEVELOPMENT)
33# define PL_CHECK_ALIGNMENT(ptr, alignment) PL_ASSERT_DEV(((size_t)ptr & ((alignment) - 1)) == 0, "Wrong alignment.")
36# define PL_CHECK_ALIGNMENT(ptr, alignment)
39#define PL_WINCHECK_1 1
40#define PL_WINCHECK_1_WINDOWS_ 1
41#define PL_WINCHECK_PL_INCLUDED_WINDOWS_H \
43#define PL_WINCHECK_PL_INCLUDED_WINDOWS_H_WINDOWS_ \
49#define PL_CHECK_WINDOWS_INCLUDE(PL_WINH_INCLUDED, WINH_INCLUDED) \
50 static_assert(PL_PP_CONCAT(PL_WINCHECK_, PL_PP_CONCAT(PL_WINH_INCLUDED, WINH_INCLUDED)) == 1, \
51 "Windows.h has been included but not through pl. #include <Foundation/Basics/Platform/Win/IncludeWindows.h> instead of Windows.h");
53#if PL_ENABLED(PL_COMPILE_ENGINE_AS_DLL)
60# define PL_STATICLINK_FILE(LibraryName, UniqueName) PL_CHECK_WINDOWS_INCLUDE(PL_INCLUDED_WINDOWS_H, _WINDOWS_)
64# define PL_STATICLINK_REFERENCE(UniqueName)
67# define PL_STATICLINK_LIBRARY(LibraryName) void plReferenceFunction_##LibraryName(bool bReturn = true)
73 using Func = void (*)(bool);
90# define PL_STATICLINK_FILE(LibraryName, UniqueName) \
93 void plReferenceFunction_##UniqueName(bool bReturn) {} \
94 void plReferenceFunction_##LibraryName(bool bReturn); \
96 static plStaticLinkHelper StaticLinkHelper_##UniqueName(plReferenceFunction_##LibraryName);
100# define PL_STATICLINK_REFERENCE(UniqueName) \
101 void plReferenceFunction_##UniqueName(bool bReturn = true); \
102 plReferenceFunction_##UniqueName()
105# define PL_STATICLINK_LIBRARY(LibraryName) \
106 plPluginRegister plPluginRegister_##LibraryName(PL_PP_STRINGIFY(PL_PP_CONCAT(pl, LibraryName))); \
107 extern "C" void plReferenceFunction_##LibraryName(bool bReturn = true)
113 template <
typename T,
size_t N>
114 char (*ArraySizeHelper(T (&)[N]))[N];
118#define PL_ARRAY_SIZE(a) (sizeof(*plInternal::ArraySizeHelper(a)) + 0)
122void PL_IGNORE_UNUSED(
const T&)
126#if (__cplusplus >= 202002L || _MSVC_LANG >= 202002L)
127# undef PL_USE_CPP20_OPERATORS
128# define PL_USE_CPP20_OPERATORS PL_ON
131#if PL_ENABLED(PL_USE_CPP20_OPERATORS)
133# define PL_ADD_DEFAULT_OPERATOR_NOTEQUAL(...)
135# define PL_ADD_DEFAULT_OPERATOR_NOTEQUAL(...) \
136 PL_ALWAYS_INLINE bool operator!=(PL_EXPAND_ARGS_COMMA(__VA_ARGS__) rhs) const \
138 return !(*this == rhs); \
Helper struct to register the existence of statically linked plugins. The macro PL_STATICLINK_LIBRARY...
Definition Common.h:81