#include <Service_Object.h>
Collaboration diagram for ACE_Service_Type:

Public Types | |
| enum | { DELETE_OBJ = 1, DELETE_THIS = 2 } |
| enum | { SERVICE_OBJECT = ACE_SVC_OBJ_T, MODULE = ACE_MODULE_T, STREAM = ACE_STREAM_T, INVALID_TYPE = -1 } |
Public Methods | |
| ACE_Service_Type (const ACE_TCHAR *n, ACE_Service_Type_Impl *o, const ACE_DLL &dll, int active) | |
| ~ACE_Service_Type (void) | |
| const ACE_TCHAR * | name (void) const |
| void | name (const ACE_TCHAR *) |
| const ACE_Service_Type_Impl * | type (void) const |
| void | type (const ACE_Service_Type_Impl *, int active=1) |
| int | suspend (void) const |
| int | resume (void) const |
| int | active (void) const |
| void | active (int) |
| int | fini (void) |
| Calls <fini> on <type_>. More... | |
| int | fini_called (void) const |
| Check if the service has been fini'ed. More... | |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Private Attributes | |
| const ACE_TCHAR * | name_ |
| Humanly readible name of svc. More... | |
| const ACE_Service_Type_Impl * | type_ |
| Pointer to C++ object that implements the svc. More... | |
| ACE_DLL | dll_ |
| ACE_DLL representing the shared object file (non-zero if dynamically linked). More... | |
| int | active_ |
| 1 if svc is currently active, otherwise 0. More... | |
| int | fini_already_called_ |
| 1 if <fini> on <type_> has already been called, otherwise 0. More... | |
This class acts as the interface of the "Bridge" pattern.
Definition at line 68 of file Service_Object.h.
|
|
Definition at line 71 of file Service_Object.h.
00072 {
00073 /// Delete the payload object.
00074 DELETE_OBJ = 1,
00075
00076 /// Delete the enclosing object.
00077 DELETE_THIS = 2
00078 };
|
|
|
Definition at line 80 of file Service_Object.h.
00081 {
00082 SERVICE_OBJECT = ACE_SVC_OBJ_T,
00083 MODULE = ACE_MODULE_T,
00084 STREAM = ACE_STREAM_T,
00085 INVALID_TYPE = -1
00086 };
|
|
||||||||||||||||||||
|
Definition at line 24 of file Service_Object.cpp. References ACE_TCHAR, ACE_TRACE, and name.
|
|
|
Definition at line 38 of file Service_Object.cpp. References ACE_TCHAR, ACE_TRACE, fini, and name_.
|
|
|
Definition at line 53 of file Service_Object.i. References ACE_TRACE, and active_.
|
|
|
Definition at line 46 of file Service_Object.i. References ACE_TRACE, and active_. Referenced by ACE_Service_Repository::find_i, ACE_Service_Config::initialize, and ACE_Service_Manager::list_services.
|
|
|
Dump the state of an object.
Definition at line 19 of file Service_Object.cpp. References ACE_TRACE.
00020 {
00021 ACE_TRACE ("ACE_Service_Type::dump");
00022 }
|
|
|
Calls <fini> on <type_>.
Definition at line 48 of file Service_Object.cpp. References ACE_Service_Type_Impl::fini, fini_already_called_, and type_. Referenced by ACE_Service_Repository::fini, and ~ACE_Service_Type.
00049 {
00050 if (!this->fini_already_called_)
00051 {
00052 this->fini_already_called_ = 1;
00053 return this->type_->fini ();
00054 }
00055 return 0;
00056 }
|
|
|
Check if the service has been fini'ed.
Definition at line 60 of file Service_Object.i. References ACE_TRACE, and fini_already_called_. Referenced by ACE_Service_Repository::find_i.
00061 {
00062 ACE_TRACE ("ACE_Service_Type::fini_called");
00063 return this->fini_already_called_;
00064 }
|
|
|
Definition at line 100 of file Service_Object.cpp. References ACE_TCHAR, ACE_TRACE, name_, and ACE::strnew.
00101 {
00102 ACE_TRACE ("ACE_Service_Type::name");
00103
00104 delete [] (ACE_TCHAR *) this->name_;
00105 this->name_ = ACE::strnew (n);
00106 }
|
|
|
Definition at line 24 of file Service_Object.i. References ACE_TRACE, and name_. Referenced by ACE_Service_Type, ACE_Service_Config::initialize, ACE_Service_Repository::insert, and ACE_Service_Manager::list_services.
|
|
|
Definition at line 67 of file Service_Object.cpp. References ACE_TRACE, ACE_Service_Type_Impl::resume, and type_. Referenced by ACE_Service_Repository::resume.
00068 {
00069 ACE_TRACE ("ACE_Service_Type::resume");
00070 ((ACE_Service_Type *) this)->active_ = 1;
00071 return this->type_->resume ();
00072 }
|
|
|
Definition at line 59 of file Service_Object.cpp. References ACE_TRACE, ACE_Service_Type_Impl::suspend, and type_. Referenced by ACE_Service_Repository::suspend.
00060 {
00061 ACE_TRACE ("ACE_Service_Type::suspend");
00062 ((ACE_Service_Type *) this)->active_ = 0;
00063 return this->type_->suspend ();
00064 }
|
|
||||||||||||
|
Definition at line 38 of file Service_Object.i. References ACE_TRACE, and type_.
00039 {
00040 ACE_TRACE ("ACE_Service_Type::type");
00041 this->type_ = o;
00042 ((ACE_Service_Type *) this)->active_ = enabled;
00043 }
|
|
|
Definition at line 31 of file Service_Object.i. References ACE_TRACE, and type_. Referenced by ace_get_module, ace_yyparse, ACE_Service_Config::initialize, ACE_Dynamic_Service_Base::instance, and ACE_Service_Manager::list_services.
|
|
|
Declare the dynamic allocation hooks.
Definition at line 117 of file Service_Object.h. |
|
|
1 if svc is currently active, otherwise 0.
Definition at line 130 of file Service_Object.h. Referenced by active. |
|
|
ACE_DLL representing the shared object file (non-zero if dynamically linked).
Definition at line 127 of file Service_Object.h. |
|
|
1 if <fini> on <type_> has already been called, otherwise 0.
Definition at line 133 of file Service_Object.h. Referenced by fini, and fini_called. |
|
|
Humanly readible name of svc.
Definition at line 121 of file Service_Object.h. Referenced by name, and ~ACE_Service_Type. |
|
|
Pointer to C++ object that implements the svc.
Definition at line 124 of file Service_Object.h. |
1.2.14 written by Dimitri van Heesch,
© 1997-2002