QResourceManager Class

(Qt3D::QResourceManager)

The QResourceManager allocates memory for resources that can be referenced by a QHandle. More...

Header: #include <QResourceManager>
qmake: QT += 3dcore
Since: Qt 5.5
Inherits:

Public Functions

QResourceManager()
~QResourceManager()
QHandle<T, INDEXBITS> acquire()
bool contains(const C & id) const
T * data(const QHandle<T, INDEXBITS> & handle)
QHandle<T, INDEXBITS> getOrAcquireHandle(const C & id)
T * getOrCreateResource(const C & id)
QHandle<T, INDEXBITS> lookupHandle(const C & id)
T * lookupResource(const C & id)
int maxResourcesEntries() const
void release(const QHandle<T, INDEXBITS> & handle)
void releaseResource(const C & id)
void reset()

Detailed Description

The QResourceManager allocates memory for resources that can be referenced by a QHandle.

Using a QHandleManager for handle management, the QResourceManager's responsibility is to provide memory for resources and to offer ways to interact with the resource through the QHandle.

Using the QHandle obtained when acquiring a resource, the resource can be retrieved and released when no longer needed.

Internally, memory can be reorganized for best performance while being transparent to the user.

The memory allocation scheme and locking policies can be customized by providing template parameters. The defaults are ArrayAllocationPolicy and NonLockingPolicy respectively.

Member Function Documentation

QResourceManager::QResourceManager()

QResourceManager::~QResourceManager()

QHandle<T, INDEXBITS> QResourceManager::acquire()

bool QResourceManager::contains(const C & id) const

T * QResourceManager::data(const QHandle<T, INDEXBITS> & handle)

QHandle<T, INDEXBITS> QResourceManager::getOrAcquireHandle(const C & id)

T * QResourceManager::getOrCreateResource(const C & id)

QHandle<T, INDEXBITS> QResourceManager::lookupHandle(const C & id)

T * QResourceManager::lookupResource(const C & id)

int QResourceManager::maxResourcesEntries() const

void QResourceManager::release(const QHandle<T, INDEXBITS> & handle)

void QResourceManager::releaseResource(const C & id)

void QResourceManager::reset()