ARPDAS_QNX6 1.0
|
#include <DG_Resmgr.h>
Public Member Functions | |
DG_dispatch_client () | |
virtual | ~DG_dispatch_client () |
void | attach (DG_dispatch *disp) |
void | detach () |
virtual int | ready_to_quit ()=0 |
Public Attributes | |
DG_dispatch * | dispatch |
DG_dispatch_client is a virtual base class for clients of DG_dispatch. The main service provided is quit coordination. ready_to_quit() virtual function should return true if client is ready to quit. This will remove the client from the DG_dispatch's list, so a subsequent detach() is unnecessary. Hence ready_to_quit() should set the dispatch member to NULL before returning a non-zero value. As a rule, clients should shut down all of their functions prior to returning. For devices, that means resmgr_detach()
As written, this is probably a bad design, since DG_dispatch::client_add is called with a partially constructed client. In a multi-threaded environment, there is a potential for harm.
Definition at line 21 of file DG_Resmgr.h.
DG_dispatch_client::DG_dispatch_client | ( | ) |
DG_dispatch_client::~DG_dispatch_client | ( | ) | [virtual] |
Definition at line 13 of file DG_Resmgr.cc.
References detach(), and dispatch.
void DG_dispatch_client::attach | ( | DG_dispatch * | disp | ) |
Definition at line 18 of file DG_Resmgr.cc.
References DG_dispatch::client_add(), and dispatch.
Referenced by DG_data::DG_data().
void DG_dispatch_client::detach | ( | ) |
Definition at line 24 of file DG_Resmgr.cc.
References DG_dispatch::client_rm(), and dispatch.
Referenced by ~DG_dispatch_client().
virtual int DG_dispatch_client::ready_to_quit | ( | ) | [pure virtual] |
Definition at line 28 of file DG_Resmgr.h.
Referenced by attach(), detach(), DG_dispatch_client(), DG_data::ready_to_quit(), DG_cmd::ready_to_quit(), and ~DG_dispatch_client().