ACE_Service_Object_Type Class Reference

Define the methods for handling the configuration of ACE_Service_Objects. More...

#include <Service_Types.h>

Inheritance diagram for ACE_Service_Object_Type:

Inheritance graph
[legend]
Collaboration diagram for ACE_Service_Object_Type:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ACE_Service_Object_Type (void *so, const ACE_TCHAR *name, u_int flags=0, ACE_Service_Object_Exterminator gobbler=0)
 ~ACE_Service_Object_Type (void)
virtual int suspend (void) const
virtual int resume (void) const
virtual int init (int argc, ACE_TCHAR *argv[]) const
virtual int fini (void) const
virtual int info (ACE_TCHAR **str, size_t len) const

Detailed Description

Define the methods for handling the configuration of ACE_Service_Objects.

Definition at line 92 of file Service_Types.h.


Constructor & Destructor Documentation

ACE_Service_Object_Type::ACE_Service_Object_Type void *  so,
const ACE_TCHAR name,
u_int  flags = 0,
ACE_Service_Object_Exterminator  gobbler = 0
 

Definition at line 87 of file Service_Types.cpp.

References ACE_Service_Object_Exterminator, ACE_TCHAR, and ACE_TRACE.

00091   : ACE_Service_Type_Impl (so, s_name, f, gobbler)
00092 {
00093   ACE_TRACE ("ACE_Service_Object_Type::ACE_Service_Object_Type");
00094 }

ACE_Service_Object_Type::~ACE_Service_Object_Type void   ) 
 

Definition at line 155 of file Service_Types.cpp.

References ACE_TRACE.

00156 {
00157   ACE_TRACE ("ACE_Service_Object_Type::~ACE_Service_Object_Type");
00158 }


Member Function Documentation

int ACE_Service_Object_Type::fini void   )  const [virtual]
 

Reimplemented from ACE_Service_Type_Impl.

Definition at line 122 of file Service_Types.cpp.

References ACE_BIT_ENABLED, ACE_DEBUG, ACE_LIB_TEXT, ACE_TRACE, ACE::debug(), ACE_Service_Type_Impl::fini(), ACE_Shared_Object::fini(), LM_DEBUG, and ACE_Service_Type_Impl::object().

00123 {
00124   ACE_TRACE ("ACE_Service_Object_Type::fini");
00125 
00126   void * const obj = this->object ();
00127 
00128   if (ACE::debug () > 2)
00129     ACE_DEBUG ((LM_DEBUG,
00130                 ACE_LIB_TEXT ("(%P|%t) SOT::fini - this=%@, ")
00131                 ACE_LIB_TEXT ("name=%s, flags=%d, so=%@\n"),
00132                 this,
00133                 this->name_,
00134                 this->flags_,
00135                 obj));
00136 
00137   ACE_Service_Object * const so =
00138     static_cast<ACE_Service_Object *> (obj);
00139 
00140   if (so)
00141     {
00142       so->fini ();
00143 
00144       // @TODO: Why is this disabled?
00145 #if 0
00146       if (ACE_BIT_ENABLED (this->flags_,
00147                            ACE_Service_Type::DELETE_OBJ))
00148         delete so;
00149 #endif /* 1 */
00150     }
00151 
00152   return ACE_Service_Type_Impl::fini ();
00153 }

int ACE_Service_Object_Type::info ACE_TCHAR **  str,
size_t  len
const [virtual]
 

Implements ACE_Service_Type_Impl.

Definition at line 175 of file Service_Types.cpp.

References ACE_TCHAR, ACE_TRACE, and ACE_Service_Type_Impl::object().

00176 {
00177   ACE_TRACE ("ACE_Service_Object_Type::info");
00178   return static_cast<ACE_Service_Object *> (this->object ())->info (str, len);
00179 }

int ACE_Service_Object_Type::init int  argc,
ACE_TCHAR argv[]
const [virtual]
 

Implements ACE_Service_Type_Impl.

Definition at line 97 of file Service_Types.cpp.

References ACE_DEBUG, ACE_LIB_TEXT, ACE_TCHAR, ACE_TRACE, ACE::debug(), ACE_Shared_Object::init(), LM_DEBUG, and ACE_Service_Type_Impl::object().

00098 {
00099   ACE_TRACE ("ACE_Service_Object_Type::init");
00100 
00101   void * const obj = this->object ();
00102 
00103   ACE_Service_Object * const so =
00104     static_cast<ACE_Service_Object *> (obj);
00105 
00106   if (ACE::debug () > 2)
00107     ACE_DEBUG ((LM_DEBUG,
00108                 ACE_LIB_TEXT ("(%P|%t) SOT::init, this=%@, ")
00109                 ACE_LIB_TEXT ("name=%s, flags=%d, so=%@\n"),
00110                 this,
00111                 this->name_,
00112                 this->flags_,
00113                 obj));
00114 
00115   if (so == 0)
00116     return -1;
00117   else
00118     return so->init (argc, argv);
00119 }

int ACE_Service_Object_Type::resume void   )  const [virtual]
 

Implements ACE_Service_Type_Impl.

Definition at line 168 of file Service_Types.cpp.

References ACE_TRACE, and ACE_Service_Type_Impl::object().

00169 {
00170   ACE_TRACE ("ACE_Service_Object_Type::resume");
00171   return static_cast<ACE_Service_Object *> (this->object ())->resume ();
00172 }

int ACE_Service_Object_Type::suspend void   )  const [virtual]
 

Implements ACE_Service_Type_Impl.

Definition at line 161 of file Service_Types.cpp.

References ACE_TRACE, and ACE_Service_Type_Impl::object().

00162 {
00163   ACE_TRACE ("ACE_Service_Object_Type::suspend");
00164   return static_cast<ACE_Service_Object *> (this->object ())->suspend ();
00165 }


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