Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_At_Thread_Exit Class Reference

Contains a method to be applied when a thread is terminated. More...

#include <Thread_Manager.h>

Inheritance diagram for ACE_At_Thread_Exit:

Inheritance graph
[legend]
Collaboration diagram for ACE_At_Thread_Exit:

Collaboration graph
[legend]
List of all members.

Public Methods

 ACE_At_Thread_Exit (void)
 Default constructor. More...

virtual ~ACE_At_Thread_Exit (void)
 The destructor. More...

int is_owner (void) const
 <At_Thread_Exit> has the ownership? More...

int is_owner (int owner)
 Set the ownership of the <At_Thread_Exit>. More...

int was_applied (void) const
 This <At_Thread_Exit> was applied? More...

int was_applied (int applied)
 Set applied state of <At_Thread_Exit>. More...


Protected Methods

void do_apply (void)
 Do the apply if necessary. More...

virtual void apply (void)=0
 The apply method. More...


Protected Attributes

ACE_At_Thread_Exit * next_
 The next <At_Thread_Exit> hook in the list. More...

ACE_Thread_Descriptortd_
 The Thread_Descriptor where this at is registered. More...

int was_applied_
 The at was applied? More...

int is_owner_
 The at has the ownership of this? More...


Friends

class ACE_Thread_Descriptor
class ACE_Thread_Manager

Detailed Description

Contains a method to be applied when a thread is terminated.

Definition at line 86 of file Thread_Manager.h.


Constructor & Destructor Documentation

ACE_INLINE ACE_At_Thread_Exit::ACE_At_Thread_Exit void   
 

Default constructor.

Definition at line 8 of file Thread_Manager.i.

00009   : next_ (0),
00010     td_ (0),
00011     was_applied_ (0),
00012     is_owner_ (1)
00013 {
00014 }

ACE_INLINE ACE_At_Thread_Exit::~ACE_At_Thread_Exit void    [virtual]
 

The destructor.

Definition at line 53 of file Thread_Manager.i.

References do_apply.

00054 {
00055   this->do_apply ();
00056 }


Member Function Documentation

virtual void ACE_At_Thread_Exit::apply void    [protected, pure virtual]
 

The apply method.

Implemented in ACE_At_Thread_Exit_Func.

Referenced by ACE_Thread_Descriptor::at_pop.

ACE_INLINE void ACE_At_Thread_Exit::do_apply void    [protected]
 

Do the apply if necessary.

Definition at line 46 of file Thread_Manager.i.

References ACE_Thread_Descriptor::at_pop, is_owner_, td_, and was_applied_.

Referenced by ~ACE_At_Thread_Exit, and ACE_At_Thread_Exit_Func::~ACE_At_Thread_Exit_Func.

00047 {
00048   if (!this->was_applied_ && this->is_owner_)
00049     td_->at_pop();
00050 }

ACE_INLINE int ACE_At_Thread_Exit::is_owner int    owner
 

Set the ownership of the <At_Thread_Exit>.

Definition at line 39 of file Thread_Manager.i.

References is_owner_.

00040 {
00041   is_owner_ = owner;
00042   return is_owner_;
00043 }

ACE_INLINE int ACE_At_Thread_Exit::is_owner void    const
 

<At_Thread_Exit> has the ownership?

Definition at line 33 of file Thread_Manager.i.

References is_owner_.

Referenced by ACE_Thread_Descriptor::at_pop, and ACE_Thread_Descriptor::at_push.

00034 {
00035   return is_owner_;
00036 }

ACE_INLINE int ACE_At_Thread_Exit::was_applied int    applied
 

Set applied state of <At_Thread_Exit>.

Definition at line 24 of file Thread_Manager.i.

References td_, and was_applied_.

00025 {
00026   was_applied_ = applied;
00027   if (was_applied_)
00028     td_ = 0;
00029   return was_applied_;
00030 }

ACE_INLINE int ACE_At_Thread_Exit::was_applied void    const
 

This <At_Thread_Exit> was applied?

Definition at line 17 of file Thread_Manager.i.

References was_applied_.

Referenced by ACE_Thread_Descriptor::at_pop.

00019 {
00020    return was_applied_;
00021 }


Friends And Related Function Documentation

friend class ACE_Thread_Descriptor [friend]
 

Definition at line 88 of file Thread_Manager.h.

friend class ACE_Thread_Manager [friend]
 

Definition at line 89 of file Thread_Manager.h.


Member Data Documentation

int ACE_At_Thread_Exit::is_owner_ [protected]
 

The at has the ownership of this?

Definition at line 126 of file Thread_Manager.h.

Referenced by do_apply, and is_owner.

ACE_At_Thread_Exit* ACE_At_Thread_Exit::next_ [protected]
 

The next <At_Thread_Exit> hook in the list.

Definition at line 111 of file Thread_Manager.h.

Referenced by ACE_Thread_Descriptor::at_pop, and ACE_Thread_Descriptor::at_push.

ACE_Thread_Descriptor* ACE_At_Thread_Exit::td_ [protected]
 

The Thread_Descriptor where this at is registered.

Definition at line 120 of file Thread_Manager.h.

Referenced by ACE_Thread_Descriptor::at_push, do_apply, and was_applied.

int ACE_At_Thread_Exit::was_applied_ [protected]
 

The at was applied?

Definition at line 123 of file Thread_Manager.h.

Referenced by do_apply, and was_applied.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:45:50 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002