SDL3pp
A slim C++ wrapper for SDL3
|
Handle to an owned mutex. More...
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. | |
Mutex & | operator= (Mutex other) |
Assignment operator. | |
constexpr | MutexRef (const MutexRef &other) |
Copy constructor. | |
constexpr | MutexRef (MutexRef &&other) |
Move constructor. | |
![]() | |
constexpr | MutexRef (const MutexRef &other) |
Copy constructor. | |
constexpr | MutexRef (MutexRef &&other) |
Move constructor. | |
constexpr | ~MutexRef ()=default |
Default constructor. | |
MutexRef & | operator= (MutexRef other) |
Assignment operator. | |
void | reset (SDL_Mutex *newResource={}) |
Destroy a mutex created with MutexBase.MutexBase(). | |
MutexBase () | |
Create a new mutex. | |
![]() | |
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 | |
![]() | |
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 | |
Resource & | operator= (const Resource &other)=delete |
Resource & | operator= (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. | |