Foundation
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Foundation::RHI::RHIObjectPool< Base > Class Template Reference

Storage/Object dereference facility for RHI Objects. More...

#include <Details.hpp>

Public Member Functions

 RHIObjectPool (Core::Allocator *allocator)
 
template<typename U , typename ... Args>
Handle CreateObject (Args &&... args)
 Creates specified RHIObject of derived type T and retrieves its handle.
 
template<typename U = Base>
UGetObjectPtr (Handle handle) const
 Retrieves the raw pointer to the object within the storage.
 
void DestroyObject (Handle handle)
 Destroys the object associated with the given handle, and frees the handle for reuse.
 

Private Attributes

Core::AllocatormAllocator
 
Core::Pool< Handle, BasemObjects
 

Detailed Description

template<typename Base = RHIObject>
class Foundation::RHI::RHIObjectPool< Base >

Storage/Object dereference facility for RHI Objects.

Constructor & Destructor Documentation

◆ RHIObjectPool()

template<typename Base = RHIObject>
Foundation::RHI::RHIObjectPool< Base >::RHIObjectPool ( Core::Allocator allocator)
inline

Member Function Documentation

◆ CreateObject()

template<typename Base = RHIObject>
template<typename U , typename ... Args>
Handle Foundation::RHI::RHIObjectPool< Base >::CreateObject ( Args &&...  args)
inline

Creates specified RHIObject of derived type T and retrieves its handle.

Returns
A handle to the newly created object.

◆ DestroyObject()

template<typename Base = RHIObject>
void Foundation::RHI::RHIObjectPool< Base >::DestroyObject ( Handle  handle)
inline

Destroys the object associated with the given handle, and frees the handle for reuse.

◆ GetObjectPtr()

template<typename Base = RHIObject>
template<typename U = Base>
U * Foundation::RHI::RHIObjectPool< Base >::GetObjectPtr ( Handle  handle) const
inline

Retrieves the raw pointer to the object within the storage.

Template Parameters
UPointer type to cast to.
Returns
The raw pointer.

Member Data Documentation

◆ mAllocator

template<typename Base = RHIObject>
Core::Allocator* Foundation::RHI::RHIObjectPool< Base >::mAllocator
private

◆ mObjects

template<typename Base = RHIObject>
Core::Pool<Handle, Base> Foundation::RHI::RHIObjectPool< Base >::mObjects
private

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