SDL3pp
A slim C++ wrapper for SDL3
All Classes Namespaces Functions Variables Typedefs Modules Pages Concepts
Public Member Functions | List of all members
SDL::ResourceUnsafe< RESOURCE, DELETER > Class Template Reference

A dumb pointer to resource. More...

Inheritance diagram for SDL::ResourceUnsafe< RESOURCE, DELETER >:
Inheritance graph
[legend]

Public Member Functions

constexpr ResourceUnsafe ()=default
 Default constructor.
 
constexpr ResourceUnsafe (RESOURCE other, DELETER deleter={})
 Constructs pointer from anything compatible.
 
void reset ()
 Resets the value, destroying the resource if not nullptr.
 
- Public Member Functions inherited from SDL::ResourceOwnerBase< RESOURCE, DELETER >
RESOURCE release ()
 Returns reference and reset this.
 
- Public Member Functions inherited from SDL::ResourcePtrBase< RESOURCE >
constexpr operator bool () const
 Check if not null.
 
constexpr bool operator== (const ResourcePtrBase &other) const
 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 referenceoperator-> () const
 Gets addressable reference.
 
constexpr referenceoperator-> ()
 Gets addressable reference.
 
reference get () const
 Get reference.
 

Additional Inherited Members

- Public Types inherited from SDL::ResourceOwnerBase< RESOURCE, DELETER >
using deleter = DELETER
 The deleter type.
 
- Public Types inherited from SDL::ResourcePtrBase< RESOURCE >
using reference = RESOURCE
 The reference resource type.
 
using value_type = typename reference::value_type
 The raw resource type.
 
- Protected Member Functions inherited from SDL::ResourceOwnerBase< RESOURCE, DELETER >
constexpr ResourceOwnerBase (base::value_type value={}, DELETER deleter={})
 Constructs from raw type.
 
void free ()
 Frees resource.
 
- Protected Member Functions inherited from SDL::ResourcePtrBase< RESOURCE >
constexpr ResourcePtrBase (value_type value={})
 Constructs from raw type.
 
referenceget ()
 Get reference.
 

Detailed Description

template<class RESOURCE, class DELETER = DefaultDeleter<RESOURCE>>
class SDL::ResourceUnsafe< RESOURCE, DELETER >

This is not safe to generally use, but might be used to compose other pointers.

Template Parameters
RESOURCE
DELETER

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