ezEngine Release 26.3
Loading...
Searching...
No Matches
ezRTTINoAllocator Struct Reference

Allocator for types that cannot be dynamically allocated through reflection. More...

#include <RTTI.h>

Inheritance diagram for ezRTTINoAllocator:

Public Member Functions

virtual bool CanAllocate () const override
 Returns false, because this type of allocator is used for classes that shall not be allocated dynamically.
 
virtual ezInternal::NewInstance< void > AllocateInternal (ezAllocator *pAllocator) override
 Will trigger an assert.
 
virtual void Deallocate (void *pObject, ezAllocator *pAllocator) override
 Will trigger an assert.
 
- Public Member Functions inherited from ezRTTIAllocator
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

Allocator for types that cannot be dynamically allocated through reflection.

Used for abstract base classes, static utility classes, or types that should only be created through specific factory functions. Attempting to allocate objects through this allocator will trigger assertions in debug builds.

Member Function Documentation

◆ AllocateInternal()

virtual ezInternal::NewInstance< void > ezRTTINoAllocator::AllocateInternal ( ezAllocator pAllocator)
inlineoverridevirtual

Will trigger an assert.

Implements ezRTTIAllocator.

◆ CanAllocate()

virtual bool ezRTTINoAllocator::CanAllocate ( ) const
inlineoverridevirtual

Returns false, because this type of allocator is used for classes that shall not be allocated dynamically.

Reimplemented from ezRTTIAllocator.

◆ Deallocate()

virtual void ezRTTINoAllocator::Deallocate ( void *  pObject,
ezAllocator pAllocator 
)
inlineoverridevirtual

Will trigger an assert.

Implements ezRTTIAllocator.


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