WinStd
Windows Win32 API using Standard C++
Loading...
Searching...
No Matches
System Handles

Classes

class  winstd::handle< T, INVAL >
 Base abstract template class to support generic object handle keeping. More...
 
class  winstd::dplhandle< T, INVAL >
 Base abstract template class to support object handle keeping for objects that support trivial handle duplication. More...
 

Macros

#define WINSTD_HANDLE_IMPL(C, T, INVAL)
 Implements default constructors and operators to prevent their auto-generation by compiler.
 
#define WINSTD_DPLHANDLE_IMPL(C, T, INVAL)
 Implements default constructors and operators to prevent their auto-generation by compiler.
 

Variables

static const T winstd::handle< T, INVAL >::invalid = INVAL
 Invalid handle value.
 

Detailed Description

Macro Definition Documentation

◆ WINSTD_DPLHANDLE_IMPL

#define WINSTD_DPLHANDLE_IMPL ( C,
T,
INVAL )
Value:
public: \
C ( ) noexcept {} \
C (_In_opt_ T h) noexcept : dplhandle<T, INVAL>( h ) {} \
C (_In_ const C &h) noexcept : dplhandle<T, INVAL>(duplicate_internal(h.m_h)) {} \
C (_Inout_ C &&h) noexcept : dplhandle<T, INVAL>(std::move (h )) {} \
C& operator=(_In_opt_ T h) noexcept { dplhandle<T, INVAL>::operator=( h ); return *this; } \
C& operator=(_In_ const C &h) noexcept { dplhandle<T, INVAL>::operator=( h ); return *this; } \
C& operator=(_Inout_ C &&h) noexcept { dplhandle<T, INVAL>::operator=(std::move(h)); return *this; } \
private:

Implements default constructors and operators to prevent their auto-generation by compiler.

◆ WINSTD_HANDLE_IMPL

#define WINSTD_HANDLE_IMPL ( C,
T,
INVAL )
Value:
public: \
C ( ) noexcept {} \
C (_In_opt_ T h) noexcept : handle<T, INVAL>( h ) {} \
C (_Inout_ C &&h) noexcept : handle<T, INVAL>(std::move(h)) {} \
C& operator=(_In_opt_ T h) noexcept { handle<T, INVAL>::operator=( h ); return *this; } \
C& operator=(_Inout_ C &&h) noexcept { handle<T, INVAL>::operator=(std::move(h)); return *this; } \
WINSTD_NONCOPYABLE(C)

Implements default constructors and operators to prevent their auto-generation by compiler.