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

#include <cSysEvent.h>

Public Member Functions

 cSysEvent () noexcept
 
 ~cSysEvent ()
 
bool isValidEvent () const noexcept
 
bool CreateEventX (_SECURITY_ATTRIBUTES *lpEventAttributes=nullptr, bool bManualReset=false, bool bInitialState=false, const FILECHAR_t *lpName=nullptr)
 
bool SetEvent ()
 
bool ResetEvent ()
 
bool PulseEvent ()
 
HRESULT WaitForSingleObject (TIMESYSD_t dwMilliseconds)
 
 UNITTEST2_PREDEF (cSysEvent)
 

Detailed Description

Like MFC class CEvent used for multi thread synchronization. similar to Semaphore/Mutex.

Constructor & Destructor Documentation

◆ cSysEvent()

GrayLib::cSysEvent::cSysEvent ( )
inlinenoexcept

◆ ~cSysEvent()

GrayLib::cSysEvent::~cSysEvent ( )
inline

Member Function Documentation

◆ CreateEventX()

bool GrayLib::cSysEvent::CreateEventX ( _SECURITY_ATTRIBUTES *  lpEventAttributes = nullptr,
bool  bManualReset = false,
bool  bInitialState = false,
const FILECHAR_t lpName = nullptr 
)
inline

◆ isValidEvent()

bool GrayLib::cSysEvent::isValidEvent ( ) const
inlinenoexcept

◆ PulseEvent()

bool GrayLib::cSysEvent::PulseEvent ( )
inline

Sets the state of the event to signaled (available), releases any waiting threads, and resets it to nonsignaled (unavailable) automatically.

◆ ResetEvent()

bool GrayLib::cSysEvent::ResetEvent ( )
inline

Sets the state of the event to non-signaled until explicitly set to signaled by the SetEvent member function. This causes all threads wishing to access this event to wait. This member function is not used by automatic events. (!bManualReset)

◆ SetEvent()

bool GrayLib::cSysEvent::SetEvent ( )
inline

Sets the state of the event to signaled, releasing any/all waiting threads.

◆ UNITTEST2_PREDEF()

GrayLib::cSysEvent::UNITTEST2_PREDEF ( cSysEvent  )

◆ WaitForSingleObject()

HRESULT GrayLib::cSysEvent::WaitForSingleObject ( TIMESYSD_t  dwMilliseconds)

wait for the event to be signaled. dwMilliseconds = cTimeSys::k_INF = wait forever.

Returns
HRESULT_WIN32_C(ERROR_WAIT_TIMEOUT)

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