Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ACE_Dev_Poll_Handler_Guard Class Reference

Class used to make event handler reference count manipulation exception-safe. More...

#include <Dev_Poll_Reactor.h>

Collaboration diagram for ACE_Dev_Poll_Handler_Guard:

Collaboration graph
List of all members.

Public Member Functions

 ACE_Dev_Poll_Handler_Guard (ACE_Event_Handler *eh, bool do_incr=true)
 ~ACE_Dev_Poll_Handler_Guard (void)
void release (void)

Private Attributes

 The event handler being managed.
bool refcounted_
 true if eh_ is a reference-counted handler.

Detailed Description

Class used to make event handler reference count manipulation exception-safe.

This class makes the reference count manipulation that occurs during an upcall exception-safe. Prior to dispatching the event handler, the reference count is increased. Once the upcall for the given event handler is complete, its reference count will be decreased.

Constructor & Destructor Documentation

ACE_INLINE ACE_Dev_Poll_Handler_Guard::ACE_Dev_Poll_Handler_Guard ACE_Event_Handler eh,
bool  do_incr = true


The constructor checks to see if eh is a reference-counted handler and remember that for later. If eh is reference counted, its reference count is incremented unless do_incr is false. do_incr should be false if the reference count was incremented independently of this guard, for example, on a notify handler since the reference count is incremented when the notify is queued.

ACE_INLINE ACE_Dev_Poll_Handler_Guard::~ACE_Dev_Poll_Handler_Guard void   ) 


The destructor decrements the reference count on the event handler corresponding to the given handle.

Member Function Documentation

ACE_INLINE void ACE_Dev_Poll_Handler_Guard::release void   ) 

Release the event handler from this guard; when the destructor is called, the handler's reference count will not be decremented.

Member Data Documentation

ACE_Event_Handler* ACE_Dev_Poll_Handler_Guard::eh_ [private]

The event handler being managed.

bool ACE_Dev_Poll_Handler_Guard::refcounted_ [private]

true if eh_ is a reference-counted handler.

The documentation for this class was generated from the following files:
Generated on Sun May 15 12:50:41 2005 for ACE by  doxygen