cla_t Derived Type

type, public :: cla_t


Components

Type Visibility Attributes Name Initial
type(arg_t), public :: arg_info
type(cmd_t), public :: cmd
integer, public :: flag_idx(NUM_FLAGS)
logical, public :: flags(NUM_FLAGS)
type(pattern_t), public, allocatable :: patterns(:)
type(cmd_t), public :: sub_cmd
type(cmd_t), public :: sub_sub_cmd

Type-Bound Procedures

procedure, public :: collect_flags => cla__collect_flags

  • private subroutine cla__collect_flags(cla)

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: do_debug => cla__do_debug_subc

  • private subroutine cla__do_debug_subc(cla)

    Processes the debug command, reads a subcommand, and calls the corresponding procedure.

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: do_find => cla__do_find_subc

  • private subroutine cla__do_find_subc(cla)

    Processes the debug command, reads a subcommand and a sub-subcommand, and calls the corresponding procedure.

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: get_patterns => cla__get_patterns

  • private subroutine cla__get_patterns(cla, offset)

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla
    integer, intent(in) :: offset

procedure, public :: init => cla__initialize

  • private subroutine cla__initialize(cla)

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: init_debug => cla__init_debug_subc

  • private subroutine cla__init_debug_subc(cla)

    Prepare subcommands for the debug command.

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: init_find => cla__init_find_subc

  • private subroutine cla__init_find_subc(cla)

    Prepare subcommands for the find command.

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: init_find_match => cla__init_find_match_subsubc

  • private subroutine cla__init_find_match_subsubc(cla)

    Prepare sub-subcommands for the match subcommand.

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: read_cmd => cla__read_command

  • private subroutine cla__read_command(cla)

    Read the first argument and match it with registered commands.

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: read_subc => cla__read_subcommand

  • private subroutine cla__read_subcommand(cla)

    Read the second argument and match it with registered subcommands.

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

procedure, public :: read_subsubc => cla__read_sub_subcommand

  • private subroutine cla__read_sub_subcommand(cla)

    Read the third argument and match it with registered sub-subcommands.

    Arguments

    Type IntentOptional Attributes Name
    class(cla_t), intent(inout) :: cla

Source Code

   type, public :: cla_t
      type(arg_t) :: arg_info
      type(cmd_t) :: cmd, sub_cmd, sub_sub_cmd
      type(pattern_t), allocatable :: patterns(:)
      logical :: flags(NUM_FLAGS)
      integer :: flag_idx(NUM_FLAGS)
   contains
      procedure :: init => cla__initialize
      procedure :: read_cmd => cla__read_command
      procedure :: read_subc => cla__read_subcommand
      procedure :: read_subsubc => cla__read_sub_subcommand
      procedure :: collect_flags => cla__collect_flags
      procedure :: get_patterns => cla__get_patterns
      procedure :: init_debug => cla__init_debug_subc
      procedure :: init_find => cla__init_find_subc
      procedure :: init_find_match => cla__init_find_match_subsubc
      procedure :: do_debug => cla__do_debug_subc
      procedure :: do_find => cla__do_find_subc
   end type cla_t