46 template <
class AObject,
typename AConstructor,
typename... AArgs> AObject*
AllocateObject(
const std::true_type AIgnored, AArgs&&... AArguments);
59 template <
class AObject,
typename AIgnoredConstructor,
typename... AArgs> AObject*
AllocateObject(
const std::false_type AIgnored, AArgs&&... AArguments);
72 template <
typename AType,
typename... AArgs>
static AType*
InPlaceAllocation(
void*
const ALocation, AArgs&&... AArguments);
128 template <
class AObject>
void DeleteObject(AObject*
const AAllocated) noexcept;
Template type for wrapping pointers and treating them as objects. Only works with CyberEngine interfa...
Object< AObject > CopyObject(const AObject &ACopy)
Copys an Object of type AObject.
ID
Defines the IDs of allocatable engine objects.
Heap & FHeap
The Heap this allocator uses.
Used as a base class by all constructors.
Object< AObject > ConstructObject(AArgs &&...AArguments)
Allocates the Object specified by AObject using a specified Constructor.
Object< AObject > NewObject(void)
Allocates the Object specified by AObject using the empty constructor.
Used for allocating objects within and without the engine.
virtual void * InteropAllocation(const Allocatable::ID AID, Constructor< void > &AConstructor)=0
Allocates the object specified by AID into FHeap.
AObject * AllocateObject(const std::true_type AIgnored, AArgs &&...AArguments)
Allocate an Allocatable object through interop.
Allocator(Heap &AHeap) noexcept
Construct an Allocator.
static AType * InPlaceAllocation(void *const ALocation, AArgs &&...AArguments)
Wrapper for placement new.
An interface which can allocate memory.
void DeleteObject(AObject *const AAllocated) noexcept
Deletes an object allocated with the Allocator.