![]() |
Raven Engine v0.1
|
Scoped smart pointer that uses a specific allocator. More...
#include <Scope.h>
Public Member Functions | |
| template<typename Allocator, typename... Args> | |
| ScopeWithAllocator (Allocator *allocator, Args &&... args) | |
| Constructs and allocates with given allocator. | |
| ScopeWithAllocator (ScopeWithAllocator &&other) noexcept | |
| ScopeWithAllocator & | operator= (ScopeWithAllocator &&other) noexcept |
| ~ScopeWithAllocator () | |
| Destructor. Calls destructor and deallocates via allocator. | |
| T * | Get () const noexcept |
| Gets the managed pointer. | |
| T & | operator* () const |
| T * | operator-> () const noexcept |
Scoped smart pointer that uses a specific allocator.
Allocates object storage via either StackAllocator or MalevolentAllocator and calls the constructor via placement new. Deallocates appropriately on destruction.
| T | The type of object to manage. |
|
inlineexplicit |
Constructs and allocates with given allocator.
| Allocator | Type of allocator (StackAllocator<T> or MalevolentAllocator). |
| allocator | Pointer to allocator. |
| args | Constructor arguments for T. |
|
inlinenoexcept |
|
inline |
Destructor. Calls destructor and deallocates via allocator.
|
inlinenoexcept |
Gets the managed pointer.
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |