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

Implement shared ownership for a resource. More...

Inheritance diagram for SDL::ResourceShared< UNIQUE >:
Inheritance graph
[legend]

Public Member Functions

constexpr ResourceShared (std::nullptr_t=nullptr)
 Default constructor.
 
constexpr ResourceShared (UNIQUE &&value)
 Constructs from unique type.
 
constexpr ResourceShared (base::value_type value, typename UNIQUE::deleter deleter={})
 Constructs from raw type.
 
constexpr bool unique () const
 True if this is the only shared instance.
 
void reset ()
 Reset this instance.
 
- Public Member Functions inherited from SDL::ResourcePtrBase< UNIQUE::reference >
reference get () const
 Get reference.
 
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.
 

Friends

class ResourceWeak< UNIQUE >
 

Additional Inherited Members

- Public Types inherited from SDL::ResourcePtrBase< UNIQUE::reference >
using reference = UNIQUE::reference
 The reference resource type.
 
using value_type = typename reference::value_type
 The raw resource type.
 
- Protected Member Functions inherited from SDL::ResourcePtrBase< UNIQUE::reference >
constexpr ResourcePtrBase (value_type value={})
 Constructs from raw type.
 
referenceget ()
 Get reference.
 

Detailed Description

template<class UNIQUE>
class SDL::ResourceShared< UNIQUE >
Template Parameters
UNIQUE

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