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

Handle to an owned condition. More...

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

Public Member Functions

constexpr Condition (SDL_Condition *resource={})
 Constructs from the underlying resource.
 
constexpr Condition (const Condition &other)=delete
 
constexpr Condition (Condition &&other)=default
 Move constructor.
 
 ~Condition ()
 Frees up resource when object goes out of scope.
 
Conditionoperator= (Condition other)
 Assignment operator.
 
constexpr ConditionRef (const ConditionRef &other)
 Copy constructor.
 
constexpr ConditionRef (ConditionRef &&other)
 Move constructor.
 
- Public Member Functions inherited from SDL::ConditionRef
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
ConditionRef

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