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

Semi-safe reference for AsyncIOQueue.

Inheritance diagram for SDL::AsyncIOQueueRef:
Inheritance graph
[legend]
Collaboration diagram for SDL::AsyncIOQueueRef:
Collaboration graph
[legend]

Public Member Functions

 AsyncIOQueueRef (AsyncIOQueueParam resource) noexcept
 Constructs from AsyncIOQueueParam. More...
 
 AsyncIOQueueRef (AsyncIOQueueRaw resource) noexcept
 Constructs from AsyncIOQueueParam. More...
 
constexpr AsyncIOQueueRef (const AsyncIOQueueRef &other) noexcept=default
 Copy constructor.
 
 ~AsyncIOQueueRef ()
 Destructor.
 
constexpr AsyncIOQueue (std::nullptr_t) noexcept
 Default ctor.
 
constexpr AsyncIOQueue (const AsyncIOQueueRaw resource) noexcept
 Constructs from AsyncIOQueueParam. More...
 
constexpr AsyncIOQueue (const AsyncIOQueue &other) noexcept=default
 Copy constructor.
 
constexpr AsyncIOQueue (AsyncIOQueue &&other) noexcept
 Move constructor.
 
constexpr AsyncIOQueue (const AsyncIOQueueRef &other)=delete
 
constexpr AsyncIOQueue (AsyncIOQueueRef &&other)=delete
 
 AsyncIOQueue ()
 Create a task queue for tracking multiple I/O operations. More...
 
- Public Member Functions inherited from SDL::AsyncIOQueue
constexpr AsyncIOQueue (std::nullptr_t) noexcept
 Default ctor.
 
constexpr AsyncIOQueue (const AsyncIOQueueRaw resource) noexcept
 Constructs from AsyncIOQueueParam. More...
 
constexpr AsyncIOQueue (AsyncIOQueue &&other) noexcept
 Move constructor.
 
constexpr AsyncIOQueue (const AsyncIOQueueRef &other)=delete
 
constexpr AsyncIOQueue (AsyncIOQueueRef &&other)=delete
 
 AsyncIOQueue ()
 Create a task queue for tracking multiple I/O operations. More...
 
 ~AsyncIOQueue ()
 Destructor.
 
constexpr AsyncIOQueueoperator= (AsyncIOQueue &&other) noexcept
 Assignment operator.
 
constexpr AsyncIOQueueRaw get () const noexcept
 Retrieves underlying AsyncIOQueueRaw.
 
constexpr AsyncIOQueueRaw release () noexcept
 Retrieves underlying AsyncIOQueueRaw and clear this.
 
constexpr auto operator<=> (const AsyncIOQueue &other) const noexcept=default
 Comparison.
 
constexpr operator bool () const noexcept
 Converts to bool.
 
constexpr operator AsyncIOQueueParam () const noexcept
 Converts to AsyncIOQueueParam.
 
void Destroy ()
 Destroy a previously-created async I/O task queue. More...
 
std::optional< AsyncIOOutcomeGetResult ()
 Query an async I/O task queue for completed tasks. More...
 
std::optional< AsyncIOOutcomeWaitResult (Milliseconds timeout)
 Block until an async I/O task queue has a completed task. More...
 
std::optional< AsyncIOOutcomeWaitResult ()
 Block until an async I/O task queue has a completed task. More...
 
void Signal ()
 Wake up any threads that are blocking in AsyncIOQueue.WaitResult(). More...
 

Additional Inherited Members

- Protected Member Functions inherited from SDL::AsyncIOQueue
constexpr AsyncIOQueue (const AsyncIOQueue &other) noexcept=default
 Copy constructor.
 
constexpr AsyncIOQueueoperator= (const AsyncIOQueue &other) noexcept=default
 Assignment operator.
 

Constructor & Destructor Documentation

◆ AsyncIOQueueRef() [1/2]

SDL::AsyncIOQueueRef::AsyncIOQueueRef ( AsyncIOQueueParam  resource)
inlinenoexcept
Parameters
resourcea AsyncIOQueueRaw or AsyncIOQueue.

This does not takes ownership!

◆ AsyncIOQueueRef() [2/2]

SDL::AsyncIOQueueRef::AsyncIOQueueRef ( AsyncIOQueueRaw  resource)
inlinenoexcept
Parameters
resourcea AsyncIOQueueRaw or AsyncIOQueue.

This does not takes ownership!

Member Function Documentation

◆ AsyncIOQueue() [1/2]

SDL::AsyncIOQueue::AsyncIOQueue ( )
inline

Async I/O operations are assigned to a queue when started. The queue can be checked for completed tasks thereafter.

Postcondition
a new task queue object or nullptr if there was an error; call GetError() for more information.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
AsyncIOQueue.Destroy
AsyncIOQueue.GetResult
AsyncIOQueue.WaitResult

◆ AsyncIOQueue() [2/2]

constexpr SDL::AsyncIOQueue::AsyncIOQueue ( const AsyncIOQueueRaw  resource)
inlineexplicitconstexprnoexcept
Parameters
resourcea AsyncIOQueueRaw to be wrapped.

This assumes the ownership, call release() if you need to take back.


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