Sunshine0.0.5917
Sunshine 0.0.5917
Self-hosted game stream host for Moonlight.
Loading...
Searching...
No Matches
nvprefs::safe_handle Struct Reference

Owning Windows HANDLE wrapper that closes handles automatically. More...

#include <src/platform/windows/nvprefs/nvprefs_common.h>

Inheritance diagram for nvprefs::safe_handle:
Collaboration diagram for nvprefs::safe_handle:

Public Member Functions

 operator bool () const
 Check whether the wrapped Windows handle is valid.
Public Member Functions inherited from util::uniq_ptr< T, Destroy< T *, ReturnType, function > >
pointer get ()
 Return the currently wrapped value or handle.
const_pointer get () const
 Return the currently wrapped value or handle.
deleter_type & get_deleter ()
 Return the deleter used when resetting the wrapped pointer.
const deleter_type & get_deleter () const
 Return the deleter used when resetting the wrapped pointer.
 operator bool () const
 Check whether the wrapper currently owns a non-null pointer.
pointer * operator& ()
 Expose the stored pointer address for C APIs that write handles.
pointer * operator& () const
 Expose the stored pointer address for C APIs that write handles.
std::add_lvalue_reference_t< element_type > operator* ()
 Dereference the managed pointer.
std::add_lvalue_reference_t< element_type const > operator* () const
 Dereference the managed pointer.
pointer operator-> ()
 Access members of the managed pointer.
const_pointer operator-> () const
 Access members of the managed pointer.
uniq_ptr & operator= (const uniq_ptr &other) noexcept=delete
uniq_ptr & operator= (std::unique_ptr< V, deleter_type > &&uniq) noexcept
 Assign state from another instance while preserving ownership semantics.
uniq_ptr & operator= (uniq_ptr< V, deleter_type > &&other) noexcept
 Assign state from another instance while preserving ownership semantics.
pointer release ()
 Release the COM or platform reference owned by the pointer.
void reset (pointer p=pointer())
 Reset the object to its initial empty state.
constexpr uniq_ptr () noexcept=default
 Initialize an empty unique ownership wrapper.
 uniq_ptr (const uniq_ptr &other) noexcept=delete
constexpr uniq_ptr (std::nullptr_t) noexcept
 Construct an empty wrapper implicitly from nullptr, matching std::unique_ptr.
 uniq_ptr (std::unique_ptr< V, deleter_type > &&uniq) noexcept
 Transfer compatible standard unique-pointer ownership implicitly.
 uniq_ptr (uniq_ptr< V, deleter_type > &&other) noexcept
 Transfer compatible Sunshine unique-pointer ownership implicitly.
 uniq_ptr (V *p) noexcept
 Explicitly construct a unique ownership wrapper.

Additional Inherited Members

Public Types inherited from util::uniq_ptr< T, Destroy< T *, ReturnType, function > >
using const_pointer
 Const pointer type exposed by the unique pointer wrapper.
using deleter_type
 Callable type used to release the managed pointer.
using element_type
 Object type managed by the unique pointer wrapper.
using pointer
 Pointer type stored by the unique pointer wrapper.
Protected Attributes inherited from util::uniq_ptr< T, Destroy< T *, ReturnType, function > >
deleter_type _deleter
 Callable used to release _p.
pointer _p
 Pointer currently owned by the wrapper, initially empty.

Detailed Description

Owning Windows HANDLE wrapper that closes handles automatically.


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