Plasma Engine  2.0
Loading...
Searching...
No Matches
plRTTIDefaultAllocator< CLASS, AllocatorWrapper > Struct Template Reference

Default implementation of plRTTIAllocator that allocates instances via the given allocator. More...

#include <RTTI.h>

Inheritance diagram for plRTTIDefaultAllocator< CLASS, AllocatorWrapper >:

Public Member Functions

virtual plInternal::NewInstance< void > AllocateInternal (plAllocator *pAllocator) override
 Returns a new instance that was allocated with the given allocator.
 
virtual plInternal::NewInstance< void > CloneInternal (const void *pObject, plAllocator *pAllocator) override
 Clones the given instance with the given allocator.
 
virtual void Deallocate (void *pObject, plAllocator *pAllocator) override
 Deletes the given instance with the given allocator.
 
- Public Member Functions inherited from plRTTIAllocator
virtual bool CanAllocate () const
 Returns whether the type that is represented by this allocator, can be dynamically allocated at runtime.
 
template<typename T >
plInternal::NewInstance< T > Allocate (plAllocator *pAllocator=nullptr)
 Allocates one instance.
 
template<typename T >
plInternal::NewInstance< T > Clone (const void *pObject, plAllocator *pAllocator=nullptr)
 Clones the given instance.
 

Detailed Description

template<typename CLASS, typename AllocatorWrapper = plDefaultAllocatorWrapper>
struct plRTTIDefaultAllocator< CLASS, AllocatorWrapper >

Default implementation of plRTTIAllocator that allocates instances via the given allocator.

Member Function Documentation

◆ AllocateInternal()

template<typename CLASS , typename AllocatorWrapper = plDefaultAllocatorWrapper>
virtual plInternal::NewInstance< void > plRTTIDefaultAllocator< CLASS, AllocatorWrapper >::AllocateInternal ( plAllocator * pAllocator)
inlineoverridevirtual

Returns a new instance that was allocated with the given allocator.

Implements plRTTIAllocator.

◆ CloneInternal()

template<typename CLASS , typename AllocatorWrapper = plDefaultAllocatorWrapper>
virtual plInternal::NewInstance< void > plRTTIDefaultAllocator< CLASS, AllocatorWrapper >::CloneInternal ( const void * pObject,
plAllocator * pAllocator )
inlineoverridevirtual

Clones the given instance with the given allocator.

Reimplemented from plRTTIAllocator.

◆ Deallocate()

template<typename CLASS , typename AllocatorWrapper = plDefaultAllocatorWrapper>
virtual void plRTTIDefaultAllocator< CLASS, AllocatorWrapper >::Deallocate ( void * pObject,
plAllocator * pAllocator )
inlineoverridevirtual

Deletes the given instance with the given allocator.

Implements plRTTIAllocator.


The documentation for this struct was generated from the following file: