A detached reference to resource that might be transformed into an owned handle.
More...
|
using | base = ResourcePtrBase< RESOURCE, DefaultDeleter< RESOURCE > > |
|
using | reference = RESOURCE |
| The reference resource type.
|
|
using | value_type = typename reference::value_type |
| The raw resource type.
|
|
|
constexpr | DetachedResource (RESOURCE other) |
| Constructs pointer from anything compatible.
|
|
| DetachedResource (const DetachedResource &other)=delete |
|
constexpr | DetachedResource (DetachedResource &&other)=default |
| Move ctor.
|
|
DetachedResource & | operator= (const DetachedResource &other)=delete |
|
constexpr DetachedResource & | operator= (DetachedResource &&other)=default |
| Move assignment.
|
|
| operator UNIQUE () && |
| Converts to UNIQUE.
|
|
reference | get () const |
| Get reference.
|
|
constexpr | operator bool () const |
| Check if not null.
|
|
constexpr bool | operator== (const ResourcePtrBase &) const=default |
| Comparison.
|
|
constexpr bool | operator== (std::nullptr_t) const |
| Comparison.
|
|
constexpr bool | operator== (std::nullopt_t) const |
| Comparison.
|
|
constexpr reference | operator* () const |
| Gets reference.
|
|
constexpr const reference * | operator-> () const |
| Gets addressable reference.
|
|
constexpr reference * | operator-> () |
| Gets addressable reference.
|
|
reference | release () |
| Returns reference and reset this.
|
|
|
constexpr | ResourcePtrBase (value_type value={}, DefaultDeleter< RESOURCE > deleter={}) |
| Constructs from raw type.
|
|
reference & | get () |
| Get reference.
|
|
void | free () |
| Frees resource.
|
|
template<class RESOURCE, class UNIQUE>
struct SDL::DetachedResource< RESOURCE, UNIQUE >
This is meant to be aliased like this:
A detached reference to resource that might be transformed into an owned handle.
Definition SDL3pp_resource.h:271
- Template Parameters
-
RESOURCE | the *Type*Ref. |
UNIQUE | the Type. |
The documentation for this struct was generated from the following file: