command_line_argument Derived Type

type, public, extends(object) :: command_line_argument

Command Line Argument (CLA) class.

Note

If not otherwise declared the action on CLA value is set to “store” a value.


Inherits

type~~command_line_argument~~InheritsGraph type~command_line_argument command_line_argument type~object object type~command_line_argument->type~object

Inherited by

type~~command_line_argument~~InheritedByGraph type~command_line_argument command_line_argument type~command_line_arguments_group command_line_arguments_group type~command_line_arguments_group->type~command_line_argument cla type~command_line_interface command_line_interface type~command_line_interface->type~command_line_arguments_group clasg

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: progname

Program name.

character(len=:), public, allocatable :: version

Program version.

character(len=:), public, allocatable :: help

Help message.

character(len=:), public, allocatable :: help_color

ANSI color of help messages.

character(len=:), public, allocatable :: help_style

ANSI style of help messages.

character(len=:), public, allocatable :: help_markdown

Longer help message, markdown formatted.

character(len=:), public, allocatable :: description

Detailed description.

character(len=:), public, allocatable :: license

License description.

character(len=:), public, allocatable :: authors

Authors list.

character(len=:), public, allocatable :: epilog

Epilogue message.

character(len=:), public, allocatable :: m_exclude

Mutually exclude other CLA(s group).

character(len=:), public, allocatable :: error_message

Meaningful error message to standard-error.

character(len=:), public, allocatable :: error_color

ANSI color of error messages.

character(len=:), public, allocatable :: error_style

ANSI style of error messages.

character(len=512), public, allocatable :: examples(:)

Examples of correct usage.

integer(kind=I4P), public :: error = 0_I4P

Error trapping flag.

integer(kind=I4P), public :: usage_lun = stderr

Output unit to print help/usage messages

integer(kind=I4P), public :: version_lun = stdout

Output unit to print version message

integer(kind=I4P), public :: error_lun = stderr

Error unit to print error messages

character(len=:), public, allocatable :: switch

Switch name.

character(len=:), public, allocatable :: switch_ab

Abbreviated switch name.

character(len=:), public, allocatable :: act

CLA value action.

character(len=:), public, allocatable :: def

Default value.

character(len=:), public, allocatable :: nargs

Number of arguments consumed by CLA.

character(len=:), public, allocatable :: choices

List (comma separated) of allowable values for the argument.

character(len=:), public, allocatable :: val

CLA value.

character(len=:), public, allocatable :: envvar

Environment variable from which take value.

logical, public :: is_required = .false.

Flag for set required argument.

logical, public :: is_positional = .false.

Flag for checking if CLA is a positional or a named CLA.

integer(kind=I4P), public :: position = 0_I4P

Position of positional CLA.

logical, public :: is_passed = .false.

Flag for checking if CLA has been passed to CLI.

logical, public :: is_hidden = .false.

Flag for hiding CLA, thus it does not compare into help.

logical, public :: is_val_required = .true.

Flag for set required value for not required (optional) CLA.


Finalization Procedures

final :: finalize

Free dynamic memory when finalizing.

  • private elemental subroutine finalize(self)

    Free dynamic memory when finalizing.

    Arguments

    Type IntentOptional Attributes Name
    type(command_line_argument), intent(inout) :: self

    CLA data.


Type-Bound Procedures

procedure, public, pass(self) :: free_object

Free dynamic memory.

  • private elemental subroutine free_object(self)

    Free dynamic memory.

    Arguments

    Type IntentOptional Attributes Name
    class(object), intent(inout) :: self

    Object data.

procedure, public, pass(self) :: print_version

Print version.

  • private subroutine print_version(self, pref)

    Print version.

    Arguments

    Type IntentOptional Attributes Name
    class(object), intent(in) :: self

    Object data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, public, pass(self) :: print_error_message

Print meaningful error message.

  • private subroutine print_error_message(self)

    Print meaningful error message to standard-error.

    Arguments

    Type IntentOptional Attributes Name
    class(object), intent(in) :: self

    Object data.

procedure, public, pass(self) :: set_examples

Set examples of correct usage.

  • private subroutine set_examples(self, examples)

    Set examples of correct usage.

    Arguments

    Type IntentOptional Attributes Name
    class(object), intent(inout) :: self

    Object data.

    character(len=*), intent(in), optional :: examples(1:)

    Examples of correct usage.

procedure, public, pass(lhs ) :: assign_object

Assignment overloading.

  • private elemental subroutine assign_object(lhs, rhs)

    Assign two abstract objects.

    Arguments

    Type IntentOptional Attributes Name
    class(object), intent(inout) :: lhs

    Left hand side.

    class(object), intent(in) :: rhs

    Rigth hand side.

procedure, public :: free

Free dynamic memory.

  • private elemental subroutine free(self)

    Free dynamic memory.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

procedure, public :: check

Check data consistency.

  • private subroutine check(self, pref)

    Check data consistency.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, public :: is_required_passed

Check if required CLA is passed.

  • private function is_required_passed(self, pref) result(is_ok)

    Check if required CLA is passed.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

    Return Value logical

    Check result.

procedure, public :: raise_error_m_exclude

Raise error mutually exclusive CLAs passed.

  • private subroutine raise_error_m_exclude(self, pref)

    Raise error mutually exclusive CLAs passed.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, public :: raise_error_nargs_insufficient

Raise error insufficient number of argument values passed.

  • private subroutine raise_error_nargs_insufficient(self, pref)

    Raise error insufficient number of argument values passed.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, public :: raise_error_value_missing

Raise error missing value.

  • private subroutine raise_error_value_missing(self, pref)

    Raise error missing value.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, public :: raise_error_switch_unknown

Raise error switch_unknown.

  • private subroutine raise_error_switch_unknown(self, switch, pref)

    Raise error switch_unknown.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: switch

    CLA switch name.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, public :: raise_error_duplicated_clas

Raise error duplicated CLAs passed.

  • private subroutine raise_error_duplicated_clas(self, switch, pref)

    Raise error duplicated CLAs passed.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: switch

    CLA switch name.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

generic, public :: get => get_cla, get_cla_list

Get CLA value(s).

  • private subroutine get_cla(self, val, pref)

    Get CLA (single) value.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    class(*), intent(inout) :: val

    CLA value.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

  • private subroutine get_cla_list(self, pref, val)

    Get CLA multiple values.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

    class(*), intent(inout) :: val(1:)

    CLA values.

Get CLA value(s) from varying size list.

  • private subroutine get_cla_list_varying_R8P(self, val, pref)

    Get CLA (multiple) value with varying size, real(R8P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    real(kind=R8P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

  • private subroutine get_cla_list_varying_R4P(self, val, pref)

    Get CLA (multiple) value with varying size, real(R4P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    real(kind=R4P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

  • private subroutine get_cla_list_varying_I8P(self, val, pref)

    Get CLA (multiple) value with varying size, integer(I8P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I8P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

  • private subroutine get_cla_list_varying_I4P(self, val, pref)

    Get CLA (multiple) value with varying size, integer(I4P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I4P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

  • private subroutine get_cla_list_varying_I2P(self, val, pref)

    Get CLA (multiple) value with varying size, integer(I2P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I2P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

  • private subroutine get_cla_list_varying_I1P(self, val, pref)

    Get CLA (multiple) value with varying size, integer(I1P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I1P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

  • private subroutine get_cla_list_varying_logical(self, val, pref)

    Get CLA (multiple) value with varying size, logical.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    logical, intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

  • private subroutine get_cla_list_varying_char(self, val, pref)

    Get CLA (multiple) value with varying size, character.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, public :: has_choices

Return true if CLA has defined choices.

  • private pure function has_choices(self)

    Return true if CLA has choices.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(in) :: self

    CLA data.

    Return Value logical

    Check result.

procedure, public :: sanitize_defaults

Sanitize default values.

procedure, public :: signature

Get signature.

  • private function signature(self, bash_completion, plain)

    Get signature.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(in) :: self

    CLA data.

    logical, intent(in), optional :: bash_completion

    Return the signature for bash completion.

    logical, intent(in), optional :: plain

    Return the signature as plain switches list.

    Return Value character(len=:), allocatable

    Signature.

procedure, public :: usage

Get correct usage.

  • private function usage(self, pref, markdown)

    Get correct usage.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(in) :: self

    CLAs group data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

    logical, intent(in), optional :: markdown

    Format for markdown

    Return Value character(len=:), allocatable

    Usage string.

procedure, private :: errored

Trig error occurence and print meaningful message.

  • private subroutine errored(self, error, pref, switch, val_str, log_value)

    Trig error occurence and print meaningful message.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I4P), intent(in) :: error

    Error occurred.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

    character(len=*), intent(in), optional :: switch

    CLA switch name.

    character(len=*), intent(in), optional :: val_str

    Value string.

    character(len=*), intent(in), optional :: log_value

    Logical value to be casted.

procedure, private :: check_envvar_consistency

Check data consistency for envvar CLA.

  • private subroutine check_envvar_consistency(self, pref)

    Check data consistency for envvar CLA.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: check_action_consistency

Check CLA action consistency.

  • private subroutine check_action_consistency(self, pref)

    Check CLA action consistency.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: check_optional_consistency

Check optional CLA consistency.

  • private subroutine check_optional_consistency(self, pref)

    Check optional CLA consistency.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: check_m_exclude_consistency

Check mutually exclusion consistency.

  • private subroutine check_m_exclude_consistency(self, pref)

    Check mutually exclusion consistency.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: check_named_consistency

Check named CLA consistency.

  • private subroutine check_named_consistency(self, pref)

    Check named CLA consistency.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: check_positional_consistency

Check positional CLA consistency.

  • private subroutine check_positional_consistency(self, pref)

    Check positional CLA consistency.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: check_choices

Check if CLA value is in allowed choices.

  • private subroutine check_choices(self, val, pref)

    Check if CLA value is in allowed choices.

    Read more…

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    class(*), intent(in) :: val

    CLA value.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: check_list_size

Check CLA multiple values list size consistency.

  • private function check_list_size(self, Nv, val, pref) result(is_ok)

    Check CLA multiple values list size consistency.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I4P), intent(in) :: Nv

    Number of values.

    character(len=*), intent(in) :: val

    First value.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

    Return Value logical

    Check result.

procedure, private :: get_cla

Get CLA (single) value.

  • private subroutine get_cla(self, val, pref)

    Get CLA (single) value.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    class(*), intent(inout) :: val

    CLA value.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_from_buffer

Get CLA (single) value from a buffer.

  • private subroutine get_cla_from_buffer(self, buffer, val, pref)

    Get CLA (single) value from parsed value.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in) :: buffer

    Buffer containing values (parsed or default CLA value).

    class(*), intent(inout) :: val

    CLA value.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list

Get CLA multiple values.

  • private subroutine get_cla_list(self, pref, val)

    Get CLA multiple values.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

    class(*), intent(inout) :: val(1:)

    CLA values.

procedure, private :: get_cla_list_from_buffer

Get CLA (single) value from a buffer.

  • private subroutine get_cla_list_from_buffer(self, buffer, val, pref)

    Get CLA multiple values from a buffer.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(in) :: buffer

    Buffer containing values (parsed or default CLA value).

    class(*), intent(inout) :: val(1:)

    CLA value.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_R16P

Get CLA multiple values, varying size, R16P.

  • private subroutine get_cla_list_varying_R16P(self, val, pref)

    Get CLA (multiple) value with varying size, real(R16P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    real(kind=R16P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_R8P

Get CLA multiple values, varying size, R8P.

  • private subroutine get_cla_list_varying_R8P(self, val, pref)

    Get CLA (multiple) value with varying size, real(R8P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    real(kind=R8P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_R4P

Get CLA multiple values, varying size, R4P.

  • private subroutine get_cla_list_varying_R4P(self, val, pref)

    Get CLA (multiple) value with varying size, real(R4P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    real(kind=R4P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_I8P

Get CLA multiple values, varying size, I8P.

  • private subroutine get_cla_list_varying_I8P(self, val, pref)

    Get CLA (multiple) value with varying size, integer(I8P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I8P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_I4P

Get CLA multiple values, varying size, I4P.

  • private subroutine get_cla_list_varying_I4P(self, val, pref)

    Get CLA (multiple) value with varying size, integer(I4P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I4P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_I2P

Get CLA multiple values, varying size, I2P.

  • private subroutine get_cla_list_varying_I2P(self, val, pref)

    Get CLA (multiple) value with varying size, integer(I2P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I2P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_I1P

Get CLA multiple values, varying size, I1P.

  • private subroutine get_cla_list_varying_I1P(self, val, pref)

    Get CLA (multiple) value with varying size, integer(I1P).

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    integer(kind=I1P), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_logical

Get CLA multiple values, varying size, bool.

  • private subroutine get_cla_list_varying_logical(self, val, pref)

    Get CLA (multiple) value with varying size, logical.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    logical, intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: get_cla_list_varying_char

Get CLA multiple values, varying size, char.

  • private subroutine get_cla_list_varying_char(self, val, pref)

    Get CLA (multiple) value with varying size, character.

    Arguments

    Type IntentOptional Attributes Name
    class(command_line_argument), intent(inout) :: self

    CLA data.

    character(len=*), intent(out), allocatable :: val(:)

    CLA values.

    character(len=*), intent(in), optional :: pref

    Prefixing string.

procedure, private :: cla_assign_cla

Assignment operator.

generic, private :: assignment(=) => cla_assign_cla

Assignment operator overloading.

Source Code

type, extends(object) :: command_line_argument
  !< Command Line Argument (CLA) class.
  !<
  !< @note If not otherwise declared the action on CLA value is set to "store" a value.
  private
  character(len=:), allocatable, public :: switch                 !< Switch name.
  character(len=:), allocatable, public :: switch_ab              !< Abbreviated switch name.
  character(len=:), allocatable, public :: act                    !< CLA value action.
  character(len=:), allocatable, public :: def                    !< Default value.
  character(len=:), allocatable, public :: nargs                  !< Number of arguments consumed by CLA.
  character(len=:), allocatable, public :: choices                !< List (comma separated) of allowable values for the argument.
  character(len=:), allocatable, public :: val                    !< CLA value.
  character(len=:), allocatable, public :: envvar                 !< Environment variable from which take value.
  logical,                       public :: is_required=.false.    !< Flag for set required argument.
  logical,                       public :: is_positional=.false.  !< Flag for checking if CLA is a positional or a named CLA.
  integer(I4P),                  public :: position=0_I4P         !< Position of positional CLA.
  logical,                       public :: is_passed=.false.      !< Flag for checking if CLA has been passed to CLI.
  logical,                       public :: is_hidden=.false.      !< Flag for hiding CLA, thus it does not compare into help.
  logical,                       public :: is_val_required=.true. !< Flag for set required value for not required (optional) CLA.
  contains
    ! public methods
    procedure, public :: free                           !< Free dynamic memory.
    procedure, public :: check                          !< Check data consistency.
    procedure, public :: is_required_passed             !< Check if required CLA is passed.
    procedure, public :: raise_error_m_exclude          !< Raise error mutually exclusive CLAs passed.
    procedure, public :: raise_error_nargs_insufficient !< Raise error insufficient number of argument values passed.
    procedure, public :: raise_error_value_missing      !< Raise error missing value.
    procedure, public :: raise_error_switch_unknown     !< Raise error switch_unknown.
    procedure, public :: raise_error_duplicated_clas    !< Raise error duplicated CLAs passed.
    generic,   public :: get =>   &
                         get_cla, &
                         get_cla_list                    !< Get CLA value(s).
    generic,   public :: get_varying =>                &
#if defined _R16P
                         get_cla_list_varying_R16P,    &
#endif
                         get_cla_list_varying_R8P,     &
                         get_cla_list_varying_R4P,     &
                         get_cla_list_varying_I8P,     &
                         get_cla_list_varying_I4P,     &
                         get_cla_list_varying_I2P,     &
                         get_cla_list_varying_I1P,     &
                         get_cla_list_varying_logical, &
                         get_cla_list_varying_char       !< Get CLA value(s) from varying size list.
    procedure, public :: has_choices                     !< Return true if CLA has defined choices.
    procedure, public :: sanitize_defaults               !< Sanitize default values.
    procedure, public :: signature                       !< Get signature.
    procedure, public :: usage                           !< Get correct usage.
    ! private methods
    procedure, private :: errored                         !< Trig error occurence and print meaningful message.
    procedure, private :: check_envvar_consistency        !< Check data consistency for envvar CLA.
    procedure, private :: check_action_consistency        !< Check CLA action consistency.
    procedure, private :: check_optional_consistency      !< Check optional CLA consistency.
    procedure, private :: check_m_exclude_consistency     !< Check mutually exclusion consistency.
    procedure, private :: check_named_consistency         !< Check named CLA consistency.
    procedure, private :: check_positional_consistency    !< Check positional CLA consistency.
    procedure, private :: check_choices                   !< Check if CLA value is in allowed choices.
    procedure, private :: check_list_size                 !< Check CLA multiple values list size consistency.
    procedure, private :: get_cla                         !< Get CLA (single) value.
    procedure, private :: get_cla_from_buffer             !< Get CLA (single) value from a buffer.
    procedure, private :: get_cla_list                    !< Get CLA multiple values.
    procedure, private :: get_cla_list_from_buffer        !< Get CLA (single) value from a buffer.
    procedure, private :: get_cla_list_varying_R16P       !< Get CLA multiple values, varying size, R16P.
    procedure, private :: get_cla_list_varying_R8P        !< Get CLA multiple values, varying size, R8P.
    procedure, private :: get_cla_list_varying_R4P        !< Get CLA multiple values, varying size, R4P.
    procedure, private :: get_cla_list_varying_I8P        !< Get CLA multiple values, varying size, I8P.
    procedure, private :: get_cla_list_varying_I4P        !< Get CLA multiple values, varying size, I4P.
    procedure, private :: get_cla_list_varying_I2P        !< Get CLA multiple values, varying size, I2P.
    procedure, private :: get_cla_list_varying_I1P        !< Get CLA multiple values, varying size, I1P.
    procedure, private :: get_cla_list_varying_logical    !< Get CLA multiple values, varying size, bool.
    procedure, private :: get_cla_list_varying_char       !< Get CLA multiple values, varying size, char.
    procedure, private :: cla_assign_cla                  !< Assignment operator.
    generic,   private :: assignment(=) => cla_assign_cla !< Assignment operator overloading.
    final              :: finalize                        !< Free dynamic memory when finalizing.
endtype command_line_argument