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

Handle to an owned rWLock. More...

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

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.
 
RWLockoperator= (RWLock other)
 Assignment operator.
 
constexpr RWLockRef (const RWLockRef &other)
 Copy constructor.
 
constexpr RWLockRef (RWLockRef &&other)
 Move constructor.
 
- Public Member Functions inherited from SDL::RWLockRef
constexpr RWLockRef (const RWLockRef &other)
 Copy constructor.
 
constexpr RWLockRef (RWLockRef &&other)
 Move constructor.
 
constexpr ~RWLockRef ()=default
 Default constructor.
 
RWLockRefoperator= (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.
 
- Public Member Functions inherited from SDL::RWLockBase
 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
 
- Public Member Functions inherited from SDL::Resource< SDL_RWLock * >
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
 
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_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.
 

Detailed Description

Category:
Resource
See also
RWLockBase
RWLockRef

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