diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-07-28 18:32:05 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-07-28 18:32:05 +0000 |
commit | 427138672f527523c54aca646cdf5d8381c7e77a (patch) | |
tree | b5b9a6e78f03de5d6709600d1895ba7fb2926de3 /ace/Service_Object.h | |
parent | a795934236296e55f1822f041ed58107fa795435 (diff) | |
download | ATCD-427138672f527523c54aca646cdf5d8381c7e77a.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Service_Object.h')
-rw-r--r-- | ace/Service_Object.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ace/Service_Object.h b/ace/Service_Object.h index 7954ea3b8c6..ac7131b8266 100644 --- a/ace/Service_Object.h +++ b/ace/Service_Object.h @@ -86,6 +86,34 @@ protected: // Flags that control serivce behavior (particularly deletion). }; +class ACE_Export ACE_Service_Object_Ptr + // = TITLE + // 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. + // + // = DESCRIPTION + // 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. +{ +public: + // = Initialization and termination methods. + 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: + ACE_Service_Object *service_object_; + // Holds the service object until we're done. +}; + #if defined (__ACE_INLINE__) #include "ace/Service_Object.i" #endif /* __ACE_INLINE__ */ |