cla_assign_cla Subroutine

private elemental subroutine cla_assign_cla(lhs, rhs)

Assignment operator.

Type Bound

command_line_argument

Arguments

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

Left hand side.

type(command_line_argument), intent(in) :: rhs

Rigth hand side.


Calls

proc~~cla_assign_cla~~CallsGraph proc~cla_assign_cla flap_command_line_argument_t::command_line_argument%cla_assign_cla proc~assign_object flap_object_t::object%assign_object proc~cla_assign_cla->proc~assign_object

Source Code

  elemental subroutine cla_assign_cla(lhs, rhs)
  !< Assignment operator.
  class(command_line_argument), intent(inout) :: lhs !< Left hand side.
  type(command_line_argument),  intent(in)    :: rhs !< Rigth hand side.

  ! object members
  call lhs%assign_object(rhs)
  ! command_line_argument members
  if (allocated(rhs%switch   )) lhs%switch          = rhs%switch
  if (allocated(rhs%switch_ab)) lhs%switch_ab       = rhs%switch_ab
  if (allocated(rhs%act      )) lhs%act             = rhs%act
  if (allocated(rhs%def      )) lhs%def             = rhs%def
  if (allocated(rhs%nargs    )) lhs%nargs           = rhs%nargs
  if (allocated(rhs%choices  )) lhs%choices         = rhs%choices
  if (allocated(rhs%val      )) lhs%val             = rhs%val
  if (allocated(rhs%envvar   )) lhs%envvar          = rhs%envvar
                                lhs%is_required     = rhs%is_required
                                lhs%is_positional   = rhs%is_positional
                                lhs%position        = rhs%position
                                lhs%is_passed       = rhs%is_passed
                                lhs%is_hidden       = rhs%is_hidden
                                lhs%is_val_required = rhs%is_val_required
  endsubroutine cla_assign_cla