#include <Service_Types.h>
Inheritance diagram for ACE_Service_Type_Impl:
Public Member Functions | |
ACE_Service_Type_Impl (void *object, const ACE_TCHAR *s_name, u_int flags=0, ACE_Service_Object_Exterminator gobbler=0) | |
virtual | ~ACE_Service_Type_Impl (void) |
virtual int | suspend (void) const=0 |
virtual int | resume (void) const=0 |
virtual int | init (int argc, ACE_TCHAR *argv[]) const=0 |
virtual int | fini (void) const |
virtual int | info (ACE_TCHAR **str, size_t len) const=0 |
void * | object (void) const |
The pointer to the service. | |
const ACE_TCHAR * | name (void) const |
Get the name of the service. | |
void | name (const ACE_TCHAR *) |
Set the name of the service. | |
void | dump (void) const |
Dump the state of an object. | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
Protected Attributes | |
const ACE_TCHAR * | name_ |
Name of the service. | |
void * | obj_ |
ACE_Service_Object_Exterminator | gobbler_ |
Destroy function to deallocate obj_. | |
u_int | flags_ |
Flags that control serivce behavior (particularly deletion). |
This class provides the root of the implementation hierarchy of the "Bridge" pattern. It maintains a pointer to the appropriate type of service implementation, i.e., ACE_Service_Object, ACE_Module, or ACE_Stream.
Definition at line 39 of file Service_Types.h.
|
Definition at line 35 of file Service_Types.cpp. References ACE_Service_Object_Exterminator, ACE_TCHAR, ACE_TRACE, and name().
|
|
Definition at line 48 of file Service_Types.cpp. References ACE_TRACE.
|
|
Dump the state of an object.
Reimplemented in ACE_Module_Type, and ACE_Stream_Type. Definition at line 28 of file Service_Types.cpp. References ACE_TRACE.
00029 { 00030 #if defined (ACE_HAS_DUMP) 00031 ACE_TRACE ("ACE_Service_Type_Impl::dump"); 00032 #endif /* ACE_HAS_DUMP */ 00033 } |
|
Reimplemented in ACE_Service_Object_Type, ACE_Module_Type, and ACE_Stream_Type. Definition at line 58 of file Service_Types.cpp. References ACE_BIT_ENABLED, ACE_DEBUG, ACE_LIB_TEXT, ACE_TRACE, ACE::debug(), gobbler_, and LM_DEBUG. Referenced by ACE_Stream_Type::fini(), ACE_Module_Type::fini(), ACE_Service_Object_Type::fini(), and ACE_Service_Type::fini().
00059 { 00060 ACE_TRACE ("ACE_Service_Type_Impl::fini"); 00061 if (ACE::debug ()) 00062 ACE_DEBUG ((LM_DEBUG, 00063 ACE_LIB_TEXT ("destroying %s, flags = %d\n"), 00064 this->name_, 00065 this->flags_)); 00066 00067 delete [] const_cast <ACE_TCHAR *> (this->name_); 00068 (const_cast <ACE_Service_Type_Impl *> (this))->name_ = 0; 00069 00070 if (ACE_BIT_ENABLED (this->flags_, 00071 ACE_Service_Type::DELETE_OBJ)) 00072 { 00073 if (gobbler_ != 0) 00074 gobbler_ (this->object ()); 00075 else 00076 // Cast to remove const-ness. 00077 operator delete ((void *) this->object ()); 00078 } 00079 00080 if (ACE_BIT_ENABLED (this->flags_, 00081 ACE_Service_Type::DELETE_THIS)) 00082 delete const_cast <ACE_Service_Type_Impl *> (this); 00083 00084 return 0; 00085 } |
|
Implemented in ACE_Service_Object_Type, ACE_Module_Type, and ACE_Stream_Type. Referenced by ACE_Service_Manager::list_services(). |
|
Implemented in ACE_Service_Object_Type, ACE_Module_Type, and ACE_Stream_Type. Referenced by ACE_Service_Gestalt::initialize(), and ACE_Service_Gestalt::initialize_i(). |
|
Set the name of the service.
Definition at line 24 of file Service_Types.inl. References ACE_TCHAR, ACE_TRACE, ACE::strdelete(), and ACE::strnew().
00025 { 00026 ACE_TRACE ("ACE_Service_Type_Impl::name"); 00027 00028 ACE::strdelete (const_cast<ACE_TCHAR*> (this->name_)); 00029 this->name_ = ACE::strnew (n); 00030 } |
|
Get the name of the service.
Definition at line 17 of file Service_Types.inl. References ACE_TRACE. Referenced by ace_get_module(), ACE_Service_Type_Impl(), ACE_Stream_Type::find(), ACE_Stream_Type::fini(), and ACE_Stream_Type::remove().
|
|
The pointer to the service.
Definition at line 10 of file Service_Types.inl. References ACE_TRACE, and obj_. Referenced by ace_get_module(), ACE_Stream_Type::fini(), ACE_Module_Type::fini(), ACE_Service_Object_Type::fini(), ACE_Service_Object_Type::info(), ACE_Module_Type::init(), ACE_Service_Object_Type::init(), ACE_Dynamic_Service_Base::instance(), ACE_Stream_Type::push(), ACE_Stream_Type::remove(), ACE_Module_Type::resume(), ACE_Service_Object_Type::resume(), ACE_Module_Type::suspend(), and ACE_Service_Object_Type::suspend().
|
|
Implemented in ACE_Service_Object_Type, ACE_Module_Type, and ACE_Stream_Type. Referenced by ACE_Service_Type::resume(). |
|
Implemented in ACE_Service_Object_Type, ACE_Module_Type, and ACE_Stream_Type. Referenced by ACE_Service_Type::suspend(). |
|
Declare the dynamic allocation hooks.
Reimplemented in ACE_Module_Type, and ACE_Stream_Type. Definition at line 69 of file Service_Types.h. |
|
Flags that control serivce behavior (particularly deletion).
Definition at line 83 of file Service_Types.h. |
|
Destroy function to deallocate obj_.
Definition at line 80 of file Service_Types.h. Referenced by fini(). |
|
Name of the service.
Definition at line 73 of file Service_Types.h. |
|
Pointer to object that implements the service. This actually points to an ACE_Service_Object, ACE_Module, or ACE_Stream. Definition at line 77 of file Service_Types.h. Referenced by object(). |