TProgressBar Derived Type

type, public :: TProgressBar

\brief Displays a text progress bar in the command-line.

By making use of the carriage return character it is possible to generate a progress bar, by continuously overwriting the same line.\n The progress bar appear as:\n \par \b example \n Your Progress Message, 43% [========



Type-Bound Procedures

procedure, public, pass(this) :: initialize

  • private subroutine initialize(this, msg)

    \brief Initialize the TProgressBar object.

    @param[in] msg String containing message to be displayed with the progressbar.[\b OPTIONAL ,\b DEFAULT = none]

    Arguments

    Type IntentOptional Attributes Name
    class(TProgressBar) :: this
    character(len=*), intent(in), optional :: msg

procedure, public, pass(this) :: reset

  • private subroutine reset(this)

    \brief Reset the TProgressBar object.

    Arguments

    Type IntentOptional Attributes Name
    class(TProgressBar) :: this

procedure, public, pass(this) :: run

  • private subroutine run(this, pct, Ix, msg)

    \brief Run the TProgressBar object.

    @param[in] pct Real value providing a the % of progress. @param[in] Ix Integer number providing the number of digits to be used in the %. [\b OPTIONAL ,\b DEFAULT = 2] @param[in] msg String containing message to be displayed with the progressbar.[\b OPTIONAL ,\b DEFAULT = none/ provided by the initialisation]


    Arguments

    Type IntentOptional Attributes Name
    class(TProgressBar) :: this
    real :: pct
    integer, intent(in), optional :: Ix
    character(len=*), intent(in), optional :: msg