#include <psimpleapp.h>
Inheritance diagram for P::SimpleApp:

Public Member Functions | |
| SimpleApp (const AboutData &about) | |
| Simple application constructor. | |
| virtual | ~SimpleApp () |
| int | run (int argc, char *argv[]) |
| Init & run the application. | |
| void | stop (int code) |
| Stop the application. | |
| virtual void | terminate (int signal) |
| Terminate application on signal. | |
| const AboutData & | about () const throw () |
| Returns a reference to the about data. | |
Protected Member Functions | |
| virtual int | init (int argc, char *argv[]) |
| Application init. | |
| virtual int | main () |
| Application main loop. | |
| virtual void | cleanup () |
| Application cleanup function. | |
| Semaphore & | exitSem () |
| Returns a reference to the exit-semaphore. | |
| int | exitCode () const |
| Returns the application's exit code. | |
Static Protected Member Functions | |
| RETSIGTYPE | SIGTERM_handler (int) |
| Process termination signal handler. | |
Friends | |
| PCORE_EXPORT friend SimpleApp * | theApp () throw () |
| Returns a pointer to the application object. | |
Definition at line 55 of file psimpleapp.h.
|
|
Simple application constructor. Simple application constructor.
|
|
|
|
|
|
Returns a reference to the about data.
Definition at line 87 of file psimpleapp.h. |
|
|
Application cleanup function. Implement this method for cleaning up the application before exiting it. Definition at line 119 of file psimpleapp.h. |
|
|
Returns the application's exit code.
Definition at line 129 of file psimpleapp.h. |
|
|
Returns a reference to the exit-semaphore.
Definition at line 125 of file psimpleapp.h. |
|
||||||||||||
|
Application init. Overload this method to implement application initialization. Remember to call the default implementation to initialize the process signal handlers.
Reimplemented in P::ServerApp. |
|
|
Application main loop. Overfload this method to implement the application main-loop. The default implementation does nothing except waiting for the exit semaphore to become increased and will then return with the value given to the stop() method.
|
|
||||||||||||
|
Init & run the application. This method initializes the application by calling init(). When initialization was successfull the main method will be called. Before returning with the app's exit code, cleanup() will be called.
|
|
|
Process termination signal handler.
|
|
|
Stop the application. The stop functions increases a semaphore to tell the main-loop that it should exit.
|
|
|
Terminate application on signal.
|
|
|
Returns a pointer to the application object.
|
1.3.3