setup_generic Subroutine

private subroutine setup_generic(self, name, requires_index, index)

Uses

Do some standard setup/checking

Type Bound

abstract_config_type

Arguments

Type IntentOptional Attributes Name
class(abstract_config_type), intent(inout) :: self
character(len=*), intent(in), optional :: name
logical, intent(in), optional :: requires_index
integer, intent(in), optional :: index

Contents

Source Code


Source Code

  subroutine setup_generic(self, name, requires_index, index)
    use optionals, only: get_option_with_default
    implicit none
    class(abstract_config_type), intent(inout) :: self
    character(len = *), intent(in), optional :: name
    logical, intent(in), optional :: requires_index
    integer, intent(in), optional :: index
    self%name = get_option_with_default(name, self%get_default_name())
    self%requires_index = get_option_with_default(requires_index, &
         self%get_default_requires_index())
    self%index = get_option_with_default(index, 1)
    self%initialised = .true.
  end subroutine setup_generic