winss
|
#include <handle_wrapper.hpp>
Public Member Functions | |
TrustedHandleWrapper ()=default | |
Create an empty handle wrapper. More... | |
TrustedHandleWrapper (HANDLE handle, DWORD dup_rights=0) | |
Create a new handle wrapper with access to the wrapped handle. More... | |
TrustedHandleWrapper (const TrustedHandleWrapper &h)=default | |
Copies the handle wrapper. More... | |
TrustedHandleWrapper (TrustedHandleWrapper &&h)=default | |
Move the handle wrapper. More... | |
HANDLE | GetHandle () const |
Gets the handle that is wrapped. More... | |
HandleWrapper | GetHandleWrapper () const |
Gets a non-owned handle wrapper. More... | |
TrustedHandleWrapper & | operator= (const TrustedHandleWrapper &h)=default |
Copies the handle wrapper. More... | |
TrustedHandleWrapper & | operator= (TrustedHandleWrapper &&h)=default |
Move the handle wrapper. More... | |
![]() | |
HandleWrapper () | |
Create an empty handle wrapper. More... | |
HandleWrapper (HANDLE handle, bool owned=true, DWORD dup_rights=0) | |
Create a new handle wrapper. More... | |
HandleWrapper (const HandleWrapper &h) | |
Copies the handle wrapper. More... | |
HandleWrapper (HandleWrapper &&h) | |
Move the handle wrapper. More... | |
bool | HasHandle () const |
Gets if the wrapper contains a handle. More... | |
bool | IsOwner () const |
Gets if this instance owns the handle. More... | |
DWORD | GetDuplicateRights () const |
Gets the duplicate rights of the handle. More... | |
WaitResult | Wait (DWORD timeout) const |
Waits for an event on the handle. More... | |
HANDLE | Duplicate (bool inherit) const |
Duplicates the handle. More... | |
bool | operator== (const HandleWrapper &rhs) const |
Checks the handles are equal. More... | |
bool | operator!= (const HandleWrapper &rhs) const |
Checks the handles are not equal. More... | |
bool | operator< (const HandleWrapper &rhs) const |
Checks this handle is less than the rhs. More... | |
bool | operator<= (const HandleWrapper &rhs) const |
Checks this handle is less than or equal to the rhs. More... | |
bool | operator> (const HandleWrapper &rhs) const |
Checks this handle is greater than the rhs. More... | |
bool | operator>= (const HandleWrapper &rhs) const |
Checks this handle is greater than or equal to the rhs. More... | |
HandleWrapper & | operator= (const HandleWrapper &h) |
Copies the handle wrapper. More... | |
HandleWrapper & | operator= (HandleWrapper &&h) |
Move the handle wrapper. More... | |
virtual | ~HandleWrapper () |
Cleans up the handle. More... | |
Additional Inherited Members | |
![]() | |
template<typename Iterator > | |
static WaitResult | Wait (DWORD timeout, Iterator begin, Iterator end) |
Waits for an event on a sequence of handles. More... | |
![]() | |
void | CloseHandle () |
Close the handle if the instance owns it. More... | |
![]() | |
static WaitResult | Wait (DWORD timeout, const std::vector< HANDLE > &handles) |
Waits for an event to happen on the given list of handles. More... | |
![]() | |
bool | owned |
If this instance owns the handle. More... | |
HANDLE | handle |
The wrapped handle. More... | |
DWORD | dup_rights |
The duplicate rights. More... | |
![]() | |
bool | operator== (const HandleWrapper &lhs, const HANDLE &rhs) |
bool | operator== (const HANDLE &lhs, const winss::HandleWrapper &rhs) |
bool | operator!= (const winss::HandleWrapper &lhs, const HANDLE &rhs) |
bool | operator!= (const HANDLE &lhs, const winss::HandleWrapper &rhs) |
bool | operator< (const winss::HandleWrapper &lhs, const HANDLE &rhs) |
bool | operator< (const HANDLE &lhs, const winss::HandleWrapper &rhs) |
bool | operator<= (const winss::HandleWrapper &lhs, const HANDLE &rhs) |
bool | operator<= (const HANDLE &lhs, const winss::HandleWrapper &rhs) |
bool | operator> (const winss::HandleWrapper &lhs, const HANDLE &rhs) |
bool | operator> (const HANDLE &lhs, const winss::HandleWrapper &rhs) |
bool | operator>= (const winss::HandleWrapper &lhs, const HANDLE &rhs) |
bool | operator>= (const HANDLE &lhs, const winss::HandleWrapper &rhs) |
|
default |
Create an empty handle wrapper.
|
explicit |
Create a new handle wrapper with access to the wrapped handle.
handle | The handle to wrap. |
dup_rights | The duplicate rights on the handle. |
|
default |
Copies the handle wrapper.
Any ownership rights will not be copied.
h | The handle wrapper to copy. |
|
default |
Move the handle wrapper.
Any ownership rights will be moved
h | The handle wrapper to move. |
HANDLE winss::TrustedHandleWrapper::GetHandle | ( | ) | const |
Gets the handle that is wrapped.
References winss::HandleWrapper::handle.
Referenced by winss::EventWrapper::IsSet(), winss::EventWrapper::Reset(), and winss::EventWrapper::Set().
winss::HandleWrapper winss::TrustedHandleWrapper::GetHandleWrapper | ( | ) | const |
Gets a non-owned handle wrapper.
References winss::HandleWrapper::dup_rights, and winss::HandleWrapper::handle.
Referenced by winss::EventWrapper::GetHandle().
|
default |
Copies the handle wrapper.
Any ownership rights will not be copied.
h | The handle wrapper to copy. |
|
default |
Move the handle wrapper.
h | The handle wrapper owner to move. |