Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

P::ServerApp Class Reference
[Core library]

Server (daemon) application base class. More...

#include <pserverapp.h>

Inheritance diagram for P::ServerApp:

P::SimpleApp List of all members.

Public Member Functions

 ServerApp (const AboutData &about)
 ~ServerApp ()
SystemLogsyslog () throw ()
 Returns a reference to the logging object.

bool hasSyslog () const throw ()
 Check for application system logging.

Configconfig () throw ()
 Returns a reference to the config object.

bool hasConfig () const throw ()
 Check for application config.

virtual void reload ()
 Reload application.


Protected Member Functions

virtual int init (int argc, char *argv[])
 Application init.

void daemonize () throw (SystemError)
 Daemonize the process (go into background).

void setSyslog (SystemLog *log) throw ()
 Set the applications system logging object.

void setConfig (Config *cfg) throw ()
 Set the applications config object.


Static Protected Member Functions

RETSIGTYPE SIGHUP_handler (int)

Detailed Description

Server (daemon) application base class.

Author:
Christian Prochnow <cproch@seculogix.de>

Definition at line 37 of file pserverapp.h.


Constructor & Destructor Documentation

P::ServerApp::ServerApp const AboutData about  ) 
 

P::ServerApp::~ServerApp  ) 
 


Member Function Documentation

Config& P::ServerApp::config  )  throw () [inline]
 

Returns a reference to the config object.

Definition at line 51 of file pserverapp.h.

void P::ServerApp::daemonize  )  throw (SystemError) [protected]
 

Daemonize the process (go into background).

bool P::ServerApp::hasConfig  )  const throw () [inline]
 

Check for application config.

Definition at line 55 of file pserverapp.h.

bool P::ServerApp::hasSyslog  )  const throw () [inline]
 

Check for application system logging.

Definition at line 47 of file pserverapp.h.

virtual int P::ServerApp::init int  argc,
char *  argv[]
[protected, virtual]
 

Application init.

Overload this method to implement application initialization. Remember to call the default implementation to initialize the process signal handlers.

Returns:
returns zero if initialization was successfull, otherwise the exit code of the application.

Reimplemented from P::SimpleApp.

virtual void P::ServerApp::reload  )  [virtual]
 

Reload application.

Overfload this method for reloading your application's config data and for restart logging. Default implementation will reload the config and restart the logging.

void P::ServerApp::setConfig Config cfg  )  throw () [protected]
 

Set the applications config object.

void P::ServerApp::setSyslog SystemLog log  )  throw () [protected]
 

Set the applications system logging object.

RETSIGTYPE P::ServerApp::SIGHUP_handler int   )  [static, protected]
 

SystemLog& P::ServerApp::syslog  )  throw () [inline]
 

Returns a reference to the logging object.

Definition at line 43 of file pserverapp.h.


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:36 2004 for P::Classes by doxygen 1.3.3