#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 92 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. | |
| virtual bool | initialize (std::string cmdLine, 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 56 of file BasicFramework.cpp. |
|
|
Destructor.
Definition at line 109 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 181 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 165 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().
Definition at line 103 of file BasicFramework.cpp. |
|
||||||||||||||||
|
Process command line arguments. When this method is overridden, make sure to call the parent class's initialize().
Reimplemented in InOutFramework. Definition at line 70 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 195 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 138 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 203 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 188 of file BasicFramework.hpp. Referenced by LoopedFramework::completeProcessing(), and BasicFramework::completeProcessing(). |
|
|
Description of program's function.
Definition at line 157 of file BasicFramework.hpp. |
|
|
Name of the program.
Definition at line 156 of file BasicFramework.hpp. |
|
|
Debug level for this run of the program.
Definition at line 154 of file BasicFramework.hpp. |
|
|
Enable debugging output and syslog message cloning to stdout.
Definition at line 161 of file BasicFramework.hpp. |
|
|
Definition at line 163 of file BasicFramework.hpp. |
|
|
Verbose level for this run of the program.
Definition at line 155 of file BasicFramework.hpp. |
|
|
Definition at line 162 of file BasicFramework.hpp. |
1.3.9.1