SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
SDL::Resource< T > Class Template Reference

A SDL managed resource. More...

Public Types

using value_type = T
 The raw resource type.
 

Public Member Functions

constexpr Resource (T resource={})
 Constructs from the underlying resource.
 
constexpr Resource (const ResourceHandle< Resource< T > > auto &resource)
 Constructs from pointer like.
 
constexpr Resource (std::nullptr_t)
 Equivalent to default ctor.
 
constexpr Resource (std::nullopt_t)
 Equivalent to default ctor.
 
constexpr operator bool () const
 True if contains a valid resource.
 
constexpr operator value_type () const
 Converts back to underlying type.
 
constexpr bool operator== (const Resource &other) const =default
 Comparison.
 
constexpr bool operator== (std::nullopt_t) const
 Comparison.
 
constexpr bool operator== (std::nullptr_t) const
 Comparison.
 
constexpr T get () const
 Return contained resource;.
 
constexpr const T operator-> () const
 Access to fields.
 
constexpr T operator-> ()
 Access to fields.
 

Detailed Description

template<class T>
class SDL::Resource< T >
Template Parameters
Tthe underlying resource type.

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