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

Handle to a non owned condition. More...

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

Public Member Functions

constexpr ConditionRef (const ConditionRef &other)
 Copy constructor.
 
constexpr ConditionRef (ConditionRef &&other)
 Move constructor.
 
constexpr ~ConditionRef ()=default
 Default constructor.
 
ConditionRefoperator= (ConditionRef other)
 Assignment operator.
 
void reset (SDL_Condition *newResource={})
 Destroy a condition variable.
 
 ConditionBase ()
 Create a condition variable.
 
- Public Member Functions inherited from SDL::ConditionBase
 ConditionBase ()
 Create a condition variable.
 
void Signal ()
 Restart one of the threads that are waiting on the condition variable.
 
void Broadcast ()
 Restart all threads that are waiting on the condition variable.
 
void Wait (MutexBase &mutex)
 Wait until a condition variable is signaled.
 
bool WaitTimeout (MutexBase &mutex, std::chrono::milliseconds timeout)
 Wait until a condition variable is signaled or a certain time has passed.
 
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_Condition * >
constexpr Resource (SDL_Condition * 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_Condition * get () const
 Return contained resource;.
 
constexpr SDL_Condition * release (SDL_Condition * newResource={})
 Return contained resource and empties or replace value.
 
constexpr const SDL_Condition * operator-> () const
 Access to fields.
 
constexpr SDL_Condition * operator-> ()
 Access to fields.
 

Detailed Description

Category:
Resource
See also
ConditionBase
Condition

Member Function Documentation

◆ ConditionBase()

SDL::ConditionBase::ConditionBase ( )
inline
Postcondition
a new condition variable or nullptr on failure; call GetError() for more information.
Since
This function is available since SDL 3.2.0.
See also
ConditionBase.Broadcast
ConditionBase.Signal
ConditionBase.Wait
ConditionBase.WaitTimeout

◆ reset()

void SDL::ConditionRef::reset ( SDL_Condition *  newResource = {})
inline
Since
This function is available since SDL 3.2.0.
See also
ConditionBase.ConditionBase

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