3#define PL_INCLUDING_BASICS_H
6#include <Foundation/Basics/PreprocessorUtils.h>
9#include <Foundation/Basics/AllDefinesOff.h>
12#include <Foundation/Basics/Platform/DetectArchitecture.h>
13#include <Foundation/Basics/Platform/DetectPlatform.h>
16#include <Foundation/UserConfig.h>
19#if PL_ENABLED(PL_COMPILE_ENGINE_AS_DLL)
20# ifdef BUILDSYSTEM_BUILDING_FOUNDATION_LIB
21# define PL_FOUNDATION_DLL PL_DECL_EXPORT
22# define PL_FOUNDATION_DLL_FRIEND PL_DECL_EXPORT_FRIEND
24# define PL_FOUNDATION_DLL PL_DECL_IMPORT
25# define PL_FOUNDATION_DLL_FRIEND PL_DECL_IMPORT_FRIEND
28# define PL_FOUNDATION_DLL
29# define PL_FOUNDATION_DLL_FRIEND
32#include <Foundation/FoundationInternal.h>
35#if PL_ENABLED(PL_PLATFORM_WINDOWS)
36# include <Foundation/Basics/Platform/Win/Platform_win.h>
37#elif PL_ENABLED(PL_PLATFORM_OSX)
38# include <Foundation/Basics/Platform/OSX/Platform_OSX.h>
39#elif PL_ENABLED(PL_PLATFORM_LINUX) || PL_ENABLED(PL_PLATFORM_ANDROID)
40# include <Foundation/Basics/Platform/Linux/Platform_Linux.h>
42# error "Undefined platform!"
46#include <Foundation/Basics/Compiler/Clang.h>
47#include <Foundation/Basics/Compiler/GCC.h>
48#include <Foundation/Basics/Compiler/MSVC.h>
51#include <Foundation/Basics/Platform/PlatformFeatures.h>
54#include <Foundation/Basics/Platform/CheckDefinitions.h>
57#include <Foundation/Basics/Platform/Common.h>
60#include <Foundation/Basics/Platform/BlackMagic.h>
63#include <Foundation/Types/Types.h>
66#include <Foundation/Types/TypeTraits.h>
69#include <Foundation/Basics/Assert.h>
72#include <Foundation/Strings/FormatString.h>
85 return s_pDefaultAllocator;
87 return GetStaticsAllocator();
93 PL_ASSERT_ALWAYS(s_pAlignedAllocator !=
nullptr,
94 "plFoundation must have been initialized before this function can be called."
95 "This error can occur when you have a global variable or a static member variable that (indirectly) requires an allocator."
96 "Check out the documentation for 'plStaticsAllocatorWrapper' for more information about this issue.");
97 return s_pAlignedAllocator;
107 static void Initialize();
108 static bool s_bIsInitialized;
111#undef PL_INCLUDING_BASICS_H
Base class for all memory allocators.
Definition Allocator.h:23
static PL_ALWAYS_INLINE plAllocator * GetDefaultAllocator()
The default allocator can be used for any kind of allocation if no alignment is required.
Definition Basics.h:82
static PL_ALWAYS_INLINE plAllocator * GetAlignedAllocator()
The aligned allocator should be used for all allocations which need alignment.
Definition Basics.h:91
The startup system makes sure to initialize and shut down all known subsystems in the proper order.
Definition Startup.h:77
Definition AllocatorWrapper.h:20