This is a basic framework for programs processing in loops in the GNSSTK.
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 the process() method, simply set variable timeToDie true prior to returning for the program to call shutDown() and then terminate.
In use, the user will construct an object of the class derived from this, then call the initialize() and run() methods in that order.
Definition at line 69 of file LoopedFramework.hpp.
#include <LoopedFramework.hpp>
Public Member Functions | |
LoopedFramework (const std::string &applName, const std::string &applDesc) noexcept | |
virtual | ~LoopedFramework () |
Destructor. More... | |
![]() | |
BasicFramework (const std::string &applName, const std::string &applDesc) noexcept | |
virtual bool | initialize (int argc, char *argv[], bool pretty=true) noexcept |
bool | run () noexcept |
virtual | ~BasicFramework () |
Destructor. More... | |
Protected Member Functions | |
virtual void | completeProcessing () |
![]() | |
virtual void | additionalSetup () |
virtual void | process () |
virtual void | shutDown () |
virtual void | spinUp () |
Protected Attributes | |
bool | timeToDie |
if set to true, the loop will terminate More... | |
![]() | |
std::string | appDesc |
Description of program's function. More... | |
std::string | argv0 |
Name of the program. More... | |
int | debugLevel |
Debug level for this run of the program. More... | |
CommandOptionNoArg | debugOption |
Enable/increase debugging output. More... | |
CommandOptionHelpUsage | helpOption |
Request command-line option usage. More... | |
int | verboseLevel |
Verbose level for this run of the program. More... | |
CommandOptionNoArg | verboseOption |
Enable/increase informational output. More... | |
Private Member Functions | |
LoopedFramework () | |
Additional Inherited Members | |
![]() | |
int | exitCode |
![]() | |
static const int | EXCEPTION_ERROR = 1 |
static const int | EXIST_ERROR = 2 |
static const int | GENERAL_ERROR = 1 |
static const int | OPTION_ERROR = 2 |
|
inlinenoexcept |
Constructor for LoopedFramework.
[in] | applName | name of the program (argv[0]). |
[in] | applDesc | text description of program's function (used by CommandOption help). |
Definition at line 78 of file LoopedFramework.hpp.
|
inlinevirtual |
Destructor.
Definition at line 85 of file LoopedFramework.hpp.
|
private |
|
protectedvirtual |
Called by the run() method, calls additionalSetup(), spinUp(), and process(), in that order. Generally should not be overridden.
Reimplemented from gnsstk::BasicFramework.
Definition at line 49 of file LoopedFramework.cpp.
|
protected |
if set to true, the loop will terminate
Definition at line 88 of file LoopedFramework.hpp.