Define the methods for handling the configuration of ACE_Service_Objects. More...
#include <Service_Types.h>


Public Member Functions | |
| ACE_Service_Object_Type (void *so, const ACE_TCHAR *name, u_int flags=0, ACE_Service_Object_Exterminator gobbler=0, int stype=ACE_Service_Type::SERVICE_OBJECT) | |
| ~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 |
Private Attributes | |
| int | initialized_ |
| Holds the initialization status (result of object->init()). | |
Define the methods for handling the configuration of ACE_Service_Objects.
Definition at line 104 of file Service_Types.h.
| ACE_Service_Object_Type::ACE_Service_Object_Type | ( | void * | so, | |
| const ACE_TCHAR * | name, | |||
| u_int | flags = 0, |
|||
| ACE_Service_Object_Exterminator | gobbler = 0, |
|||
| int | stype = ACE_Service_Type::SERVICE_OBJECT | |||
| ) |
Definition at line 84 of file Service_Types.cpp.
: ACE_Service_Type_Impl (so, s_name, f, gobbler, stype) , initialized_ (-1) { ACE_TRACE ("ACE_Service_Object_Type::ACE_Service_Object_Type"); }
| ACE_Service_Object_Type::~ACE_Service_Object_Type | ( | void | ) |
Definition at line 132 of file Service_Types.cpp.
{
ACE_TRACE ("ACE_Service_Object_Type::~ACE_Service_Object_Type");
}
| int ACE_Service_Object_Type::fini | ( | void | ) | const [virtual] |
Reimplemented from ACE_Service_Type_Impl.
Definition at line 114 of file Service_Types.cpp.
{
ACE_TRACE ("ACE_Service_Object_Type::fini");
void * const obj = this->object ();
ACE_Service_Object * const so =
static_cast<ACE_Service_Object *> (obj);
// Call fini() if an only if, the object was successfuly
// initialized, i.e. init() returned 0. This is necessary to
// maintain the ctor/dtor-like semantics for init/fini.
if (so != 0 && this->initialized_ == 0)
so->fini ();
return ACE_Service_Type_Impl::fini ();
}
| int ACE_Service_Object_Type::info | ( | ACE_TCHAR ** | str, | |
| size_t | len | |||
| ) | const [virtual] |
Implements ACE_Service_Type_Impl.
Definition at line 152 of file Service_Types.cpp.
{
ACE_TRACE ("ACE_Service_Object_Type::info");
return static_cast<ACE_Service_Object *> (this->object ())->info (str, len);
}
| int ACE_Service_Object_Type::init | ( | int | argc, | |
| ACE_TCHAR * | argv[] | |||
| ) | const [virtual] |
Implements ACE_Service_Type_Impl.
Definition at line 96 of file Service_Types.cpp.
{
ACE_TRACE ("ACE_Service_Object_Type::init");
void * const obj = this->object ();
ACE_Service_Object * const so =
static_cast<ACE_Service_Object *> (obj);
if (so == 0)
return -1;
this->initialized_ = so->init (argc, argv);
return this->initialized_;
}
| int ACE_Service_Object_Type::resume | ( | void | ) | const [virtual] |
Implements ACE_Service_Type_Impl.
Definition at line 145 of file Service_Types.cpp.
{
ACE_TRACE ("ACE_Service_Object_Type::resume");
return static_cast<ACE_Service_Object *> (this->object ())->resume ();
}
| int ACE_Service_Object_Type::suspend | ( | void | ) | const [virtual] |
Implements ACE_Service_Type_Impl.
Definition at line 138 of file Service_Types.cpp.
{
ACE_TRACE ("ACE_Service_Object_Type::suspend");
return static_cast<ACE_Service_Object *> (this->object ())->suspend ();
}
int ACE_Service_Object_Type::initialized_ [mutable, private] |
Holds the initialization status (result of object->init()).
Definition at line 125 of file Service_Types.h.
1.7.0