ACE  6.2.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ACE_Event_Base Class Reference

A base class for wrappers around the Win32 event locking mechanism. More...

#include <Event_Base.h>

Inheritance diagram for ACE_Event_Base:
Inheritance graph
[legend]

Public Member Functions

virtual ~ACE_Event_Base (void)
 Implicitly destroy the event variable. More...
 
int remove (void)
 
ACE_event_t handle (void) const
 Underlying handle to event. More...
 
void handle (ACE_event_t new_handle)
 
int wait (void)
 
int wait (const ACE_Time_Value *abstime, int use_absolute_time=1)
 
int signal (void)
 
int pulse (void)
 
int reset (void)
 Set to nonsignaled state. More...
 
void dump (void) const
 Dump the state of an object. More...
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...
 

Protected Member Functions

 ACE_Event_Base ()
 Only derived classes allowed to construct event. More...
 

Protected Attributes

ACE_event_t handle_
 The underlying handle. More...
 
bool removed_
 

Private Member Functions

 ACE_Event_Base (const ACE_Event_Base &event)
 
const ACE_Event_Baseoperator= (const ACE_Event_Base &rhs)
 

Detailed Description

A base class for wrappers around the Win32 event locking mechanism.

Portable implementation of an Event mechanism, which is native to Win32, but must be emulated on UNIX. All platforms support process-scope locking support. However, only Win32 platforms support global naming and system-scope locking support.

Constructor & Destructor Documentation

ACE_Event_Base::~ACE_Event_Base ( void  )
virtual

Implicitly destroy the event variable.

ACE_Event_Base::ACE_Event_Base ( )
protected

Only derived classes allowed to construct event.

ACE_Event_Base::ACE_Event_Base ( const ACE_Event_Base event)
private

Member Function Documentation

void ACE_Event_Base::dump ( void  ) const

Dump the state of an object.

ACE_event_t ACE_Event_Base::handle ( void  ) const
inline

Underlying handle to event.

void ACE_Event_Base::handle ( ACE_event_t  new_handle)
inline

Set the underlying handle to event. Note that this method assumes ownership of the <handle> and will close it down in <remove>. If you want the <handle> to stay open when <remove> is called make sure to call <dup> on the <handle> before closing it. You are responsible for the closing the existing <handle> before overwriting it.

const ACE_Event_Base& ACE_Event_Base::operator= ( const ACE_Event_Base rhs)
private
int ACE_Event_Base::pulse ( void  )

if MANUAL reset wakeup all waiting threads and reset event else AUTO reset wakeup one waiting thread (if present) and reset event

int ACE_Event_Base::remove ( void  )

Explicitly destroy the event variable. Note that only one thread should call this method since it doesn't protect against race conditions.

int ACE_Event_Base::reset ( void  )

Set to nonsignaled state.

int ACE_Event_Base::signal ( void  )

if MANUAL reset wake up all waiting threads set to signaled state else AUTO reset if no thread is waiting, set to signaled state if thread(s) are waiting, wake up one waiting thread and reset event

int ACE_Event_Base::wait ( void  )

if MANUAL reset sleep till the event becomes signaled event remains signaled after wait() completes. else AUTO reset sleep till the event becomes signaled event resets wait() completes.

int ACE_Event_Base::wait ( const ACE_Time_Value abstime,
int  use_absolute_time = 1 
)

Same as wait() above, but this one can be timed abstime is absolute time-of-day if if use_absolute_time is non-0, else it is relative time.

Member Data Documentation

ACE_Event_Base::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

ACE_event_t ACE_Event_Base::handle_
protected

The underlying handle.

bool ACE_Event_Base::removed_
protected

Keeps track of whether <remove> has been called yet to avoid multiple <remove> calls, e.g., explicitly and implicitly in the destructor. This flag isn't protected by a lock, so make sure that you don't have multiple threads simultaneously calling <remove> on the same object, which is a bad idea anyway...


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