#include <BasicFramework.hpp>
Inheritance diagram for BasicFramework:


It is meant to be used by programs that start up, do some processing, and quit.
The end user should define subclasses of this class, implementing those methods described as being meant to be overridden; initialize(), additionalSetup(), spinUp(), process(), and shutDown().
In use, the user will construct an object of the class derived from this, then call the run() method.
Definition at line 91 of file BasicFramework.hpp.
Public Member Functions | |
| BasicFramework (const std::string &applName, const std::string &applDesc) throw () | |
| Constructor for BasicFramework. | |
| virtual | ~BasicFramework () |
| Destructor. | |
| virtual bool | initialize (int argc, char *argv[], bool pretty=true) throw () |
| Process command line arguments. | |
| bool | run () throw () |
| Run the program. | |
Protected Member Functions | |
| virtual void | completeProcessing () |
| Called by the run() method; calls additionalSetup(), spinUp(), and process(), in that order. | |
| virtual void | additionalSetup () |
| Additional set-up to be performed before starting processing. | |
| virtual void | spinUp () |
| Code to be executed AFTER initialize() and additionalSetup(). | |
| virtual void | process () |
| Processing to be performed. | |
| virtual void | shutDown () |
| Clean-up processing to be done before the program ends. | |
Protected Attributes | |
| int | debugLevel |
| Debug level for this run of the program. | |
| int | verboseLevel |
| Verbose level for this run of the program. | |
| std::string | argv0 |
| Name of the program. | |
| std::string | appDesc |
| Description of program's function. | |
| CommandOptionNoArg | debugOption |
| Enable debugging output and syslog message cloning to stdout. | |
| CommandOptionNoArg | verboseOption |
| CommandOptionNoArg | helpOption |
|
||||||||||||
|
Constructor for BasicFramework.
Definition at line 55 of file BasicFramework.cpp. |
|
|
Destructor.
Definition at line 108 of file BasicFramework.hpp. |
|
|
Additional set-up to be performed before starting processing. This generally involves things that are necessary for either the spinUp processing or main processing. This method should be implemeneted by the end-user. Definition at line 165 of file BasicFramework.hpp. Referenced by LoopedFramework::completeProcessing(), and BasicFramework::completeProcessing(). |
|
|
Called by the run() method; calls additionalSetup(), spinUp(), and process(), in that order. Generally should not be overridden. Reimplemented in LoopedFramework. Definition at line 130 of file BasicFramework.cpp. References BasicFramework::additionalSetup(), BasicFramework::process(), and BasicFramework::spinUp(). Referenced by BasicFramework::run(). |
|
||||||||||||||||
|
Process command line arguments. When this method is overridden, make sure to call the parent class's initialize().
Reimplemented in InOutFramework. Definition at line 69 of file BasicFramework.cpp. References CommandOptionParser::displayUsage(), CommandOptionParser::dumpErrors(), CommandOptionParser::hasErrors(), CommandOptionParser::parseOptions(), and verboseLevel. Referenced by main(). |
|
|
Processing to be performed. This method should be implemeneted by the end-user. Reimplemented in MinSfTest, and Test. Definition at line 179 of file BasicFramework.hpp. Referenced by LoopedFramework::completeProcessing(), and BasicFramework::completeProcessing(). |
|
|
Run the program. Processes only once (refer to subclasses for looped processing).
Definition at line 103 of file BasicFramework.cpp. References BasicFramework::completeProcessing(), and BasicFramework::shutDown(). Referenced by main(). |
|
|
Clean-up processing to be done before the program ends. This method is executed outside of a try block and should be implemeneted by the end-user. Definition at line 187 of file BasicFramework.hpp. Referenced by BasicFramework::run(). |
|
|
Code to be executed AFTER initialize() and additionalSetup(). This method should be implemeneted by the end-user. Definition at line 172 of file BasicFramework.hpp. Referenced by LoopedFramework::completeProcessing(), and BasicFramework::completeProcessing(). |
|
|
Description of program's function.
Definition at line 141 of file BasicFramework.hpp. |
|
|
Name of the program.
Definition at line 140 of file BasicFramework.hpp. |
|
|
Debug level for this run of the program.
Definition at line 138 of file BasicFramework.hpp. |
|
|
Enable debugging output and syslog message cloning to stdout.
Definition at line 145 of file BasicFramework.hpp. |
|
|
Definition at line 147 of file BasicFramework.hpp. |
|
|
Verbose level for this run of the program.
Definition at line 139 of file BasicFramework.hpp. |
|
|
Definition at line 146 of file BasicFramework.hpp. |
1.3.9.1