SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::Mutex Struct Reference

Handle to an owned mutex. More...

Inheritance diagram for SDL::Mutex:
Inheritance graph
[legend]

Public Member Functions

constexpr Mutex (SDL_Mutex *resource={})
 Constructs from the underlying resource.
 
constexpr Mutex (const Mutex &other)=delete
 
constexpr Mutex (Mutex &&other)=default
 Move constructor.
 
 ~Mutex ()
 Frees up resource when object goes out of scope.
 
Mutexoperator= (Mutex other)
 Assignment operator.
 
constexpr MutexRef (const MutexRef &other)
 Copy constructor.
 
constexpr MutexRef (MutexRef &&other)
 Move constructor.
 
- Public Member Functions inherited from SDL::MutexRef
constexpr MutexRef (const MutexRef &other)
 Copy constructor.
 
constexpr MutexRef (MutexRef &&other)
 Move constructor.
 
constexpr ~MutexRef ()=default
 Default constructor.
 
MutexRefoperator= (MutexRef other)
 Assignment operator.
 
void reset (SDL_Mutex *newResource={})
 Destroy a mutex created with MutexBase.MutexBase().
 
 MutexBase ()
 Create a new mutex.
 
- Public Member Functions inherited from SDL::MutexBase
 MutexBase ()
 Create a new mutex.
 
void Lock ()
 Lock the mutex.
 
void TryLock ()
 Try to lock a mutex without blocking.
 
void Unlock ()
 Unlock the mutex.
 
constexpr Resource (T resource={})
 Constructs the underlying resource.
 
constexpr Resource (std::nullptr_t)
 Equivalent to default ctor.
 
constexpr Resource (std::nullopt_t)
 Equivalent to default ctor.
 
 Resource (const Resource &other)=delete
 
 Resource (Resource &&other)=delete
 
- Public Member Functions inherited from SDL::Resource< SDL_Mutex * >
constexpr Resource (SDL_Mutex * resource={})
 Constructs the underlying resource.
 
constexpr Resource (std::nullptr_t)
 Equivalent to default ctor.
 
constexpr Resource (std::nullopt_t)
 Equivalent to default ctor.
 
 Resource (const Resource &other)=delete
 
 Resource (Resource &&other)=delete
 
Resourceoperator= (const Resource &other)=delete
 
Resourceoperator= (Resource &&other)=delete
 
constexpr operator bool () const
 True if contains a valid resource.
 
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 SDL_Mutex * get () const
 Return contained resource;.
 
constexpr SDL_Mutex * release (SDL_Mutex * newResource={})
 Return contained resource and empties or replace value.
 
constexpr const SDL_Mutex * operator-> () const
 Access to fields.
 
constexpr SDL_Mutex * operator-> ()
 Access to fields.
 

Detailed Description

Category:
Resource
See also
MutexBase
MutexRef

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