This struct is used a single time with the member machine and comprises all fields associated with the state of the application and the execution of the 'program'.
Inner Type Index: | |
| struct | Command |
| A struct denoting the next state and the corresponding method to execute. More... | |
| struct | CommandList |
Public Field Index: | |
| States | BuiltInState =States::NOT_STARTED |
| bool | EmergencyStop =false |
| CommandList | Program |
| The list of commands to execute. | |
| Enum | State =States::NOT_STARTED |
Public Method Index: | |
| void | DbgDumpFurtherExitCodes (AString &target) |
| Enum | GetExitCode () |
| void | SetExitCode (Enum pExitCode) |
Protected Field Index: | |
| std::vector< Enum > | dbgFurtherExitCodes |
| Enum | exitCode =BuiltInExitCodes::OK |
| The exit code. Only the first set is stored and returned later. | |
| States alib::app::App::StateMachine::BuiltInState =States::NOT_STARTED |
The current state in respect to the built-in program commands. Note that this is not of type Enum, but uses the original C++ enum type. Consequently, this is only updated when a built-in command is processed. With that, methods may check for a more general state without getting "confused" by custom insertions which often are not relevant for the decision-making.
|
protected |
| bool alib::app::App::StateMachine::EmergencyStop =false |
Emergency stopper. As soon as this gets set, the execution of the application will stop. The only thing that is still performed is the standard ALib shutdown procedure, but not the shutdown procedure defined by this app (or its derived type). I.e., no configuration files are written.
|
protected |
| CommandList alib::app::App::StateMachine::Program |
| Enum alib::app::App::StateMachine::State =States::NOT_STARTED |
|
inline |
Writes exit codes not respected by the method SetExitCode (because an earlier code was already set) to the target string. Then clears the debug-field dbgFurtherExitCodes. This method is called by the default implementations of the methods exceptionDisplay and onSdOutput
. In release-builds, this method is pruned.
| target | The target string. |
|
inline |
|
inline |
Sets this applications' cli-exit code (the result of the method main()). If the given pExitCode's integral value is 0, nothing is done.
Only the value of the first call is used. Later calls will not overwrite the first given value. In debug-builds, the method DbgDumpFurtherExitCodes may be used to display later given codes, what the default implementation of the method virtual void onSdFinalizeShutdown() does.
| pExitCode | The exit code to set. |