Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CL_Service Class Reference

#include <service.h>

List of all members.

Public Member Functions

 CL_Service (const CL_String &service_name)
 Construction:.
 ~CL_Service ()
int main (int argc, char **argv)
 Operations:.

Public Attributes

CL_Event stop_event
 Attributes:.
CL_Event reload_event
CL_String service_name

Protected Member Functions

virtual void service_run (const std::vector< CL_String > &args)=0

Private Member Functions

void service_thread_main (std::vector< CL_String > args)
 Implementation:.

Static Private Member Functions

static void sig_term (int signal_code)
static void sig_hup (int signal_code)

Static Private Attributes

static CL_Serviceinstance = 0


Constructor & Destructor Documentation

CL_Service::CL_Service const CL_String &  service_name  ) 
 

Construction:.

Definition at line 43 of file service.cpp.

References instance, and TEXT.

CL_Service::~CL_Service  ) 
 

Definition at line 51 of file service.cpp.

References instance.


Member Function Documentation

int CL_Service::main int  argc,
char **  argv
 

Operations:.

Definition at line 62 of file service.cpp.

References CL_File::close(), CL_StringHelp::int_to_local8(), CL_Thread::join(), CL_Exception::message, service_name, service_run(), service_thread_main(), sig_hup(), sig_term(), CL_Thread::start(), stop_event, TEXT, CL_Event::wait(), and CL_File::write().

virtual void CL_Service::service_run const std::vector< CL_String > &  args  )  [protected, pure virtual]
 

Referenced by main(), and service_thread_main().

void CL_Service::service_thread_main std::vector< CL_String >  args  )  [private]
 

Implementation:.

Definition at line 230 of file service.cpp.

References service_run().

Referenced by main().

void CL_Service::sig_hup int  signal_code  )  [static, private]
 

Definition at line 241 of file service.cpp.

References instance, reload_event, and CL_Event::set().

Referenced by main().

void CL_Service::sig_term int  signal_code  )  [static, private]
 

Definition at line 235 of file service.cpp.

References instance, CL_Event::set(), and stop_event.

Referenced by main().


Member Data Documentation

CL_Service * CL_Service::instance = 0 [static, private]
 

Definition at line 248 of file service.cpp.

Referenced by CL_Service(), sig_hup(), sig_term(), and ~CL_Service().

CL_Event CL_Service::reload_event
 

Definition at line 46 of file service.h.

Referenced by sig_hup().

CL_String CL_Service::service_name
 

Definition at line 48 of file service.h.

Referenced by main().

CL_Event CL_Service::stop_event
 

Attributes:.

Definition at line 44 of file service.h.

Referenced by main(), and sig_term().


The documentation for this class was generated from the following files:
Generated on Sat Feb 19 22:51:18 2005 for npcore by  doxygen 1.4.1