Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray::cOSHandleSet Class Reference

#include <cOSHandleSet.h>

Public Member Functions

 cOSHandleSet (void) noexcept
 
 cOSHandleSet (HANDLE h)
 
 cOSHandleSet (const cOSHandleSet &nss)
 
 ~cOSHandleSet ()
 
void operator= (const cOSHandleSet &nss)
 
void SetCopy (const cOSHandleSet &nss)
 
bool AddHandle (HANDLE h)
 
void RemoveHandle (HANDLE h)
 
void ClearHandles ()
 
HRESULT WaitForObjects (TIMESYSD_t dwMilliseconds, bool bWaitForAll=false)
 

Static Public Attributes

static const int k_nHandeMax
 

Detailed Description

A collection of cOSHandle Wait on any of a set of OS handles to be signaled. Similar to cNetSocketSet and ::select() especially for linux Similar to _WIN32 WaitForMultipleObjects(). MAX = MAXIMUM_WAIT_OBJECTS or FD_SETSIZE

Constructor & Destructor Documentation

◆ cOSHandleSet() [1/3]

Gray::cOSHandleSet::cOSHandleSet ( void  )
inlinenoexcept

◆ cOSHandleSet() [2/3]

Gray::cOSHandleSet::cOSHandleSet ( HANDLE  h)
inline

◆ cOSHandleSet() [3/3]

Gray::cOSHandleSet::cOSHandleSet ( const cOSHandleSet nss)
inline

◆ ~cOSHandleSet()

Gray::cOSHandleSet::~cOSHandleSet ( )
inline

Member Function Documentation

◆ AddHandle()

bool Gray::cOSHandleSet::AddHandle ( HANDLE  h)
inline

Add OSHandle to the set.

Note
can't add more than k_nHandeMax. FD_SETSIZE on linux. MAXIMUM_WAIT_OBJECTS on _WIN32.

◆ ClearHandles()

void Gray::cOSHandleSet::ClearHandles ( )
inline

◆ operator=()

void Gray::cOSHandleSet::operator= ( const cOSHandleSet nss)
inline

◆ RemoveHandle()

void Gray::cOSHandleSet::RemoveHandle ( HANDLE  h)
inline

◆ SetCopy()

void Gray::cOSHandleSet::SetCopy ( const cOSHandleSet nss)
inline

◆ WaitForObjects()

HRESULT Gray::cOSHandleSet::WaitForObjects ( TIMESYSD_t  dwMilliseconds,
bool  bWaitForAll = false 
)

Wait for any or all of these handles to be signaled.

Returns
HRESULT_WIN32_C(ERROR_WAIT_TIMEOUT) after dwMilliseconds
Note
WIN32 does not use select() here because it is in a strange ws2_32.dll AND MUST CALL WSAStartup()

Member Data Documentation

◆ k_nHandeMax

const int Gray::cOSHandleSet::k_nHandeMax
static
Initial value:
=
FD_SETSIZE

The documentation for this class was generated from the following files: