SDL3pp
A slim C++ wrapper for SDL3
|
Handle to an owned rWLock. More...
Public Member Functions | |
constexpr | RWLock (SDL_RWLock *resource={}) |
Constructs from the underlying resource. | |
constexpr | RWLock (const RWLock &other)=delete |
constexpr | RWLock (RWLock &&other)=default |
Move constructor. | |
~RWLock () | |
Frees up resource when object goes out of scope. | |
RWLock & | operator= (RWLock other) |
Assignment operator. | |
constexpr | RWLockRef (const RWLockRef &other) |
Copy constructor. | |
constexpr | RWLockRef (RWLockRef &&other) |
Move constructor. | |
![]() | |
constexpr | RWLockRef (const RWLockRef &other) |
Copy constructor. | |
constexpr | RWLockRef (RWLockRef &&other) |
Move constructor. | |
constexpr | ~RWLockRef ()=default |
Default constructor. | |
RWLockRef & | operator= (RWLockRef other) |
Assignment operator. | |
void | reset (SDL_RWLock *newResource={}) |
Destroy a read/write lock created with RWLockBase.RWLockBase(). | |
RWLockBase () | |
Create a new read/write lock. | |
![]() | |
RWLockBase () | |
Create a new read/write lock. | |
void | LockForReading () |
Lock the read/write lock for read only operations. | |
void | LockForWriting () |
Lock the read/write lock for write operations. | |
void | TryLockForReading () |
Try to lock a read/write lock for reading without blocking. | |
void | TryLockForWriting () |
Try to lock a read/write lock for writing without blocking. | |
void | Unlock () |
Unlock the read/write lock. | |
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_RWLock * 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_RWLock * | get () const |
Return contained resource;. | |
constexpr SDL_RWLock * | release (SDL_RWLock * newResource={}) |
Return contained resource and empties or replace value. | |
constexpr const SDL_RWLock * | operator-> () const |
Access to fields. | |
constexpr SDL_RWLock * | operator-> () |
Access to fields. | |