Definition of classes and methods used to determine close encounters
Implements a class for a simple progress bar that can print on the screen.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=I4B), | public | :: | PBARSIZE | = | 80 |
Number of characters acros for a whole progress bar |
|
| integer(kind=I4B), | public | :: | bar_pos |
The current position of the progress bar |
|||
| character(len=:), | public, | allocatable | :: | barstr |
The string that prints out as the progress bar |
||
| character(len=32), | public | :: | fmt |
The format string that is used to define the progress bar itself |
|||
| integer(kind=I8B), | public | :: | loop_length |
The total number of loops that the progrees bar is executing |
|||
| character(len=64), | public | :: | message |
The current message displayed at the end of the progress bar |
| procedure, public :: reset => io_progress_bar_reset | Resets the progress bar to the beginning |
| procedure, public :: update => io_progress_bar_update | Updates the progress bar with new values |
Resets the progress bar to the beginning
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(progress_bar), | intent(inout) | :: | self |
The progress bar object |
||
| integer(kind=I8B), | intent(in) | :: | loop_length |
The length of the loop that the progress bar is attached to |
Updates the progress bar with new values
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(progress_bar), | intent(inout) | :: | self |
Progres bar object |
||
| integer(kind=I8B), | intent(in) | :: | i |
The current loop index of the progress loop |
||
| character(len=*), | intent(in), | optional | :: | message |
An optional message to display to the right of the progress bar |