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 Member Functions

 ACE_At_Thread_Exit (void)
 Default constructor.

virtual ~ACE_At_Thread_Exit (void)
 The destructor.

int is_owner (void) const
 has the ownership?

int is_owner (int owner)
 Set the ownership of the .

int was_applied (void) const
 This was applied?

int was_applied (int applied)
 Set applied state of .


Protected Member Functions

void do_apply (void)
 Do the apply if necessary.

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


Protected Attributes

ACE_At_Thread_Exitnext_
 The next hook in the list.

ACE_Thread_Descriptortd_
 The Thread_Descriptor where this at is registered.

int was_applied_
 The at was applied?

int is_owner_
 The at has the ownership of this?


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 90 of file Thread_Manager.h.


Constructor & Destructor Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_At_Thread_Exit::ACE_At_Thread_Exit void   ) 
 

Default constructor.

Definition at line 9 of file Thread_Manager.inl.

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

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_At_Thread_Exit::~ACE_At_Thread_Exit void   )  [virtual]
 

The destructor.

Definition at line 28 of file Thread_Manager.cpp.

References do_apply().

00029 {
00030   this->do_apply ();
00031 }


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 47 of file Thread_Manager.inl.

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().

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

ACE_INLINE int ACE_At_Thread_Exit::is_owner int  owner  ) 
 

Set the ownership of the .

Definition at line 40 of file Thread_Manager.inl.

References is_owner_.

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

ACE_INLINE int ACE_At_Thread_Exit::is_owner void   )  const
 

has the ownership?

Definition at line 34 of file Thread_Manager.inl.

References is_owner_.

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

00035 {
00036   return is_owner_;
00037 }

ACE_INLINE int ACE_At_Thread_Exit::was_applied int  applied  ) 
 

Set applied state of .

Definition at line 25 of file Thread_Manager.inl.

References td_, and was_applied_.

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

ACE_INLINE int ACE_At_Thread_Exit::was_applied void   )  const
 

This was applied?

Definition at line 18 of file Thread_Manager.inl.

References was_applied_.

Referenced by ACE_Thread_Descriptor::at_pop().

00020 {
00021    return was_applied_;
00022 }


Friends And Related Function Documentation

friend class ACE_Thread_Descriptor [friend]
 

Definition at line 92 of file Thread_Manager.h.

friend class ACE_Thread_Manager [friend]
 

Definition at line 93 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 130 of file Thread_Manager.h.

Referenced by do_apply(), and is_owner().

ACE_At_Thread_Exit* ACE_At_Thread_Exit::next_ [protected]
 

The next hook in the list.

Definition at line 115 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 124 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 127 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 Thu Nov 9 11:20:07 2006 for ACE by doxygen 1.3.6