SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL::ResourceBase< RAW_POINTER, RAW_CONST_POINTER > Class Template Reference

Base class for resources. More...

Public Types

using RawPointer = RAW_POINTER
 The underlying raw pointer type.
using RawConstPointer = RAW_CONST_POINTER
 The underlying const raw pointer type.

Public Member Functions

constexpr ResourceBase (RawPointer resource)
 Constructs from resource pointer.
constexpr ResourceBase (std::nullptr_t=nullptr)
 Constructs null/invalid.
constexpr operator bool () const
 Converts to bool.
constexpr auto operator<=> (const ResourceBase &other) const =default
 Comparison.
constexpr RawConstPointer operator-> () const noexcept
 member access to underlying resource pointer.
constexpr RawPointer operator-> () noexcept
 member access to underlying resource pointer.
constexpr RawPointer get () const noexcept
 Retrieves underlying resource pointer.
constexpr RawPointer release () noexcept
 Retrieves underlying resource pointer and clear this.

Friends

constexpr void swap (ResourceBase &lhs, ResourceBase &rhs) noexcept

Detailed Description

template<typename RAW_POINTER, typename RAW_CONST_POINTER = RAW_POINTER>
class SDL::ResourceBase< RAW_POINTER, RAW_CONST_POINTER >

Base class for resources.


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