CAutoResetEvent Class Reference
[Win32 Synchronization primitivesWin32 Kernel Objects]

Inheritance diagram for CAutoResetEvent:

Inheritance graph
[legend]
Collaboration diagram for CAutoResetEvent:

Collaboration graph
[legend]

List of all members.


Detailed Description

A class that wraps the operating system Event API and exposes just the interface for an auto reset event.

Public Member Functions

 CAutoResetEvent (CEvent::InitialState initialState=CEvent::NonSignaled, SECURITY_ATTRIBUTES *pSecurityAttributes=0)
 Create an anonymous CAutoResetEvent object for in-process use.
 CAutoResetEvent (const IKernelObjectName &name, SECURITY_ATTRIBUTES *pSecurityAttributes=0, CEvent::InitialState initialState=CEvent::NonSignaled)
 Create a new named CAutoResetEvent object or connect to an existing one with the same name, for cross-process use.
 CAutoResetEvent (const IKernelObjectName &name, const CEvent::CreationFlags creationFlags, SECURITY_ATTRIBUTES *pSecurityAttributes=0, CEvent::InitialState initialState=CEvent::NonSignaled)
 Create a new named CAutoResetEvent object or connect to an existing one with the same name, for cross-process use. Use the CreationFlags to force creation only or connection only if required.
void Set ()
 Set the event to the signalled state.
void Pulse ()
 Pulse the event. Releases one waiting thread and resets the event.
virtual HANDLE GetWaitHandle () const
 Access a HANDLE to wait on by passing it to one of the Wait Functions.
virtual void Wait () const
 Wait indefinitely for the object to become signalled.
virtual bool Wait (const Milliseconds timeout) const
 Wait, with a time limit, for the object to become signalled.

Static Public Member Functions

static void Wait (HANDLE handle)
 Wait indefinitely for the supplied handle to become signalled.
static bool Wait (HANDLE handle, const Milliseconds timeout)
 Wait, with a time limit, for the supplied handle to become signalled.
static bool WaitWithMessageLoop (HANDLE handle, const Milliseconds timeout)
static bool WaitWithMessageLoop (HANDLE handle, const Milliseconds timeout, const DWORD removeFlags)
static bool WaitWithMessageLoop (const DWORD numHandles, HANDLE *pHandles, const Milliseconds timeout)
static bool WaitWithMessageLoop (const DWORD numHandles, HANDLE *pHandles, DWORD &signalledHandle, const Milliseconds timeout)
static bool WaitWithMessageLoop (const DWORD numHandles, HANDLE *pHandles, DWORD &signalledHandle, const Milliseconds timeout, const DWORD removeFlags)

Constructor & Destructor Documentation

CAutoResetEvent ( CEvent::InitialState  initialState = CEvent::NonSignaled,
SECURITY_ATTRIBUTES pSecurityAttributes = 0 
) [explicit]

Create an anonymous CAutoResetEvent object for in-process use.

CAutoResetEvent ( const IKernelObjectName name,
SECURITY_ATTRIBUTES pSecurityAttributes = 0,
CEvent::InitialState  initialState = CEvent::NonSignaled 
) [explicit]

Create a new named CAutoResetEvent object or connect to an existing one with the same name, for cross-process use.

CAutoResetEvent ( const IKernelObjectName name,
const CEvent::CreationFlags  creationFlags,
SECURITY_ATTRIBUTES pSecurityAttributes = 0,
CEvent::InitialState  initialState = CEvent::NonSignaled 
)

Create a new named CAutoResetEvent object or connect to an existing one with the same name, for cross-process use. Use the CreationFlags to force creation only or connection only if required.


Member Function Documentation

void Set (  ) 

Set the event to the signalled state.

void Pulse (  ) 

Pulse the event. Releases one waiting thread and resets the event.

HANDLE GetWaitHandle (  )  const [virtual]

Access a HANDLE to wait on by passing it to one of the Wait Functions.

Implements IWaitable.

void Wait (  )  const [virtual]

Wait indefinitely for the object to become signalled.

Implements IWaitable.

bool Wait ( const Milliseconds  timeout  )  const [virtual]

Wait, with a time limit, for the object to become signalled.

Implements IWaitable.

void Wait ( HANDLE  handle  )  [static, inherited]

Wait indefinitely for the supplied handle to become signalled.

bool Wait ( HANDLE  handle,
const Milliseconds  timeout 
) [static, inherited]

Wait, with a time limit, for the supplied handle to become signalled.

bool WaitWithMessageLoop ( HANDLE  handle,
const Milliseconds  timeout 
) [static, inherited]

bool WaitWithMessageLoop ( HANDLE  handle,
const Milliseconds  timeout,
const DWORD  removeFlags 
) [static, inherited]

bool WaitWithMessageLoop ( const DWORD  numHandles,
HANDLE *  pHandles,
const Milliseconds  timeout 
) [static, inherited]

bool WaitWithMessageLoop ( const DWORD  numHandles,
HANDLE *  pHandles,
DWORD &  signalledHandle,
const Milliseconds  timeout 
) [static, inherited]

bool WaitWithMessageLoop ( const DWORD  numHandles,
HANDLE *  pHandles,
DWORD &  signalledHandle,
const Milliseconds  timeout,
const DWORD  removeFlags 
) [static, inherited]


Generated on Thu Mar 26 16:40:27 2009 for JetByte Socket Tools - v6.0 by  doxygen 1.5.3