ezEngine Release 25.08
Loading...
Searching...
No Matches
ezRTTIDefaultAllocator< CLASS, AllocatorWrapper > Struct Template Reference

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

#include <RTTI.h>

Inheritance diagram for ezRTTIDefaultAllocator< CLASS, AllocatorWrapper >:

Public Member Functions

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

Detailed Description

template<typename CLASS, typename AllocatorWrapper = ezDefaultAllocatorWrapper>
struct ezRTTIDefaultAllocator< CLASS, AllocatorWrapper >

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

Member Function Documentation

◆ AllocateInternal()

template<typename CLASS , typename AllocatorWrapper = ezDefaultAllocatorWrapper>
virtual ezInternal::NewInstance< void > ezRTTIDefaultAllocator< CLASS, AllocatorWrapper >::AllocateInternal ( ezAllocator pAllocator)
inlineoverridevirtual

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

Implements ezRTTIAllocator.

◆ CloneInternal()

template<typename CLASS , typename AllocatorWrapper = ezDefaultAllocatorWrapper>
virtual ezInternal::NewInstance< void > ezRTTIDefaultAllocator< CLASS, AllocatorWrapper >::CloneInternal ( const void *  pObject,
ezAllocator pAllocator 
)
inlineoverridevirtual

Clones the given instance with the given allocator.

Reimplemented from ezRTTIAllocator.

◆ Deallocate()

template<typename CLASS , typename AllocatorWrapper = ezDefaultAllocatorWrapper>
virtual void ezRTTIDefaultAllocator< CLASS, AllocatorWrapper >::Deallocate ( void *  pObject,
ezAllocator pAllocator 
)
inlineoverridevirtual

Deletes the given instance with the given allocator.

Implements ezRTTIAllocator.


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