ACE_Service_Object_Ptr Class Reference

This is a smart pointer that holds onto the associated ACE_Service_Object * until the current scope is left, at which point the object's hook is called and the service_object_ gets deleted. More...

#include <Service_Object.h>

Collaboration diagram for ACE_Service_Object_Ptr:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_Service_Object_Ptr (ACE_Service_Object *so)
 Acquire ownership of the so.

 ~ACE_Service_Object_Ptr (void)
 Release the held ACE_Service_Object by calling its hook.

ACE_Service_Objectoperator-> ()
 Smart pointer to access the underlying ACE_Service_Object.


Private Attributes

ACE_Service_Objectservice_object_
 Holds the service object until we're done.


Detailed Description

This is a smart pointer that holds onto the associated ACE_Service_Object * until the current scope is left, at which point the object's hook is called and the service_object_ gets deleted.

This class is similar to the Standard C++ Library class . It is used in conjunction with statically linked , as shown in the ./netsvcs/server/main.cpp example.

Definition at line 165 of file Service_Object.h.


Constructor & Destructor Documentation

ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_Service_Object_Ptr::ACE_Service_Object_Ptr ACE_Service_Object so  ) 
 

Acquire ownership of the so.

Definition at line 6 of file Service_Object.inl.

References ACE_INLINE.

00007   : service_object_ (so)
00008 {
00009 }

ACE_INLINE ACE_Service_Object_Ptr::~ACE_Service_Object_Ptr void   ) 
 

Release the held ACE_Service_Object by calling its hook.

Definition at line 11 of file Service_Object.inl.

References ACE_INLINE, ACE_Shared_Object::fini(), and service_object_.

00012 {
00013   this->service_object_->fini ();
00014   delete this->service_object_;
00015 }


Member Function Documentation

ACE_INLINE ACE_Service_Object * ACE_Service_Object_Ptr::operator->  ) 
 

Smart pointer to access the underlying ACE_Service_Object.

Definition at line 18 of file Service_Object.inl.

References service_object_.

00019 {
00020   return this->service_object_;
00021 }


Member Data Documentation

ACE_Service_Object* ACE_Service_Object_Ptr::service_object_ [private]
 

Holds the service object until we're done.

Definition at line 180 of file Service_Object.h.

Referenced by operator->(), and ~ACE_Service_Object_Ptr().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:29:19 2006 for ACE by doxygen 1.3.6