#include <BESApp.h>
Inheritance diagram for BESApp:
Public Member Functions | |
virtual | ~BESApp () |
virtual int | main (int argC, char **argV)=0 |
main routine, the main entry point for any BES applications. | |
virtual int | initialize (int argC, char **argV)=0 |
Initialize the application using the passed argc and argv values. | |
virtual int | run (void)=0 |
The body of the application, implementing the primary functionality of the BES application. | |
virtual int | terminate (int sig=0)=0 |
Clean up after the application. | |
virtual void | dump (ostream &strm) const =0 |
dumps information about this object | |
string | appName (void) const |
Returns the name of the application. | |
Static Public Member Functions | |
static BESApp * | TheApplication (void) |
Returns the BESApp application object for this application. | |
Protected Member Functions | |
BESApp (void) | |
Protected Attributes | |
string | _appName |
bool | _debug |
bool | _isInitialized |
Static Protected Attributes | |
static BESApp * | _theApplication = 0 |
This class represents the application class for any BES applications. It provides information about the application, such as any parameters passed to the application, the name of the application, debugging for the application, etc...
This is a pure abstract class, not even main is implemented. It is up to the derived class to implement main, initialize, run, and terminate.
Provides a static method to retrieve the BESApp instance being used for this application.
BESApp::BESApp | ( | void | ) | [inline, protected] |
virtual BESApp::~BESApp | ( | ) | [inline, virtual] |
string BESApp::appName | ( | void | ) | const [inline] |
Returns the name of the application.
The name of the application is typically argv[0] passed into the main function. But could be passed into the application or derived in a different way.
virtual void BESApp::dump | ( | ostream & | strm | ) | const [pure virtual] |
dumps information about this object
Displays information about this object, typically for debugging purposes.
strm | C++ i/o stream to dump the information to |
Implements BESObj.
Implemented in BESBaseApp, BESModuleApp, ServerApp, and CmdApp.
virtual int BESApp::initialize | ( | int | argC, | |
char ** | argV | |||
) | [pure virtual] |
Initialize the application using the passed argc and argv values.
It is up to the derived classes of BESApp to implement the initialize method.
argC | number of arguments passed to the application, which is argc passed to the main function. | |
argV | arguments passed to the application, which is argv passed to the main function. |
Implemented in BESBaseApp, BESModuleApp, ServerApp, and CmdApp.
virtual int BESApp::main | ( | int | argC, | |
char ** | argV | |||
) | [pure virtual] |
main routine, the main entry point for any BES applications.
It is up to the derived classes of BESApp to implement the main routine. However, the main method should call initialize, run and terminate in that order and should pass to the initialize routine the arguments argc and argv passed to the main function.
argC | number of arguments passed to the application, which is argc passed to the main function. | |
argV | arguments passed to the application, which is argv passed to the main function. |
Implemented in BESBaseApp.
virtual int BESApp::run | ( | void | ) | [pure virtual] |
The body of the application, implementing the primary functionality of the BES application.
It is up to the derived classes of BESApp to implement the run method.
Implemented in BESBaseApp, ServerApp, and CmdApp.
virtual int BESApp::terminate | ( | int | sig = 0 |
) | [pure virtual] |
Clean up after the application.
It is up to the derived classes of BESApp to implement the terminate method. Memory cleanup, file descriptor cleanup, etc... might go in this method.
sig | if the applicaiton is terminating due to a signal, pass the signal to terminate routine. |
Implemented in BESBaseApp, BESModuleApp, and ServerApp.
static BESApp* BESApp::TheApplication | ( | void | ) | [inline, static] |
string BESApp::_appName [protected] |
bool BESApp::_debug [protected] |
bool BESApp::_isInitialized [protected] |
BESApp * BESApp::_theApplication = 0 [static, protected] |