|
Foundation
|
Thread-safe type-erased handle 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. | |
| void | DestroyObject (Handle handle) |
| Destroys the object associated with the given handle, and frees the handle for reuse. | |
| void | Destroy () |
| Destroys all objects in the pool. | |
Static Public Member Functions | |
| template<typename U = Base> | |
| static U * | GetObjectPtr (Handle handle) noexcept |
| Retrieves the raw pointer to the object within the storage. | |
Private Types | |
| using | PointerType = Core::UniquePtr< Base > |
Private Attributes | |
| Core::Allocator * | mAllocator |
| Core::AtomicPool< PointerType > | mPool |
Thread-safe type-erased handle dereference facility for RHI Objects.
|
private |
|
inline |
|
inline |
Creates specified RHIObject of derived type T and retrieves its handle.
|
inline |
Destroys all objects in the pool.
|
inline |
Destroys the object associated with the given handle, and frees the handle for reuse.
|
inlinestaticnoexcept |
Retrieves the raw pointer to the object within the storage.
| U | Pointer type to cast to. |
|
private |
|
private |