build_progress_t Derived Type

type, public :: build_progress_t

Build progress object


Components

Type Visibility Attributes Name Initial
type(console_t), public :: console

Console object for updating console lines

integer, public :: n_complete

Number of completed targets

integer, public :: n_target

Total number of targets scheduled

integer, public, allocatable :: output_lines(:)

Store needed when updating previous console lines

logical, public :: plain_mode = .true.

‘Plain’ output (no colors or updating)

type(build_target_ptr), public, pointer :: target_queue(:)

Queue of scheduled build targets


Constructor

public interface build_progress_t

Constructor for build_progress_t

  • private function new_build_progress(target_queue, plain_mode) result(progress)

    Initialise a new build progress object

    Arguments

    Type IntentOptional Attributes Name
    type(build_target_ptr), intent(in), target :: target_queue(:)

    The queue of scheduled targets

    logical, intent(in), optional :: plain_mode

    Enable ‘plain’ output for progress object

    Return Value type(build_progress_t)

    Progress object to initialise


Type-Bound Procedures

procedure, public :: compiling_status => output_status_compiling

Output ‘compiling’ status for build target

  • private subroutine output_status_compiling(progress, queue_index)

    Output ‘compiling’ status for build target and overall percentage progress

    Arguments

    Type IntentOptional Attributes Name
    class(build_progress_t), intent(inout) :: progress

    Progress object

    integer, intent(in) :: queue_index

    Index of build target in the target queue

procedure, public :: completed_status => output_status_complete

Output ‘complete’ status for build target

  • private subroutine output_status_complete(progress, queue_index, build_stat)

    Output ‘complete’ status for build target and update overall percentage progress

    Arguments

    Type IntentOptional Attributes Name
    class(build_progress_t), intent(inout) :: progress

    Progress object

    integer, intent(in) :: queue_index

    Index of build target in the target queue

    integer, intent(in) :: build_stat

    Build status flag

procedure, public :: success => output_progress_success

Output finished status for whole package

  • private subroutine output_progress_success(progress)

    Output finished status for whole package

    Arguments

    Type IntentOptional Attributes Name
    class(build_progress_t), intent(inout) :: progress

Source Code

type build_progress_t
    !> Console object for updating console lines
    type(console_t) :: console
    !> Number of completed targets
    integer :: n_complete
    !> Total number of targets scheduled
    integer :: n_target
    !> 'Plain' output (no colors or updating)
    logical :: plain_mode = .true.
    !> Store needed when updating previous console lines
    integer, allocatable :: output_lines(:)
    !> Queue of scheduled build targets
    type(build_target_ptr), pointer :: target_queue(:)
contains
    !> Output 'compiling' status for build target
    procedure :: compiling_status => output_status_compiling
    !> Output 'complete' status for build target
    procedure :: completed_status => output_status_complete
    !> Output finished status for whole package
    procedure :: success => output_progress_success
end type build_progress_t