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 fini() hook is called and the service_object_ gets deleted. More...
#include <Service_Object.h>
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 fini() hook. | |
ACE_Service_Object * | operator-> () |
Smart pointer to access the underlying ACE_Service_Object. | |
Private Attributes | |
ACE_Service_Object * | service_object_ |
Holds the service object until we're done. |
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 fini() hook is called and the service_object_ gets deleted.
This class is similar to the Standard C++ Library class auto_ptr. It is used in conjunction with statically linked ACE_Service_Objects, as shown in the ./netsvcs/server/main.cpp example.
Definition at line 167 of file Service_Object.h.
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.
: service_object_ (so) { }
ACE_Service_Object_Ptr::~ACE_Service_Object_Ptr | ( | void | ) |
Release the held ACE_Service_Object by calling its fini() hook.
Definition at line 11 of file Service_Object.inl.
{ this->service_object_->fini (); delete this->service_object_; }
ACE_Service_Object * ACE_Service_Object_Ptr::operator-> | ( | void | ) |
Smart pointer to access the underlying ACE_Service_Object.
Definition at line 18 of file Service_Object.inl.
{ return this->service_object_; }
Holds the service object until we're done.
Definition at line 182 of file Service_Object.h.