MockItemSpec Derived Type

type, public, extends(StateItemSpec) :: MockItemSpec


Inherits

type~~mockitemspec~~InheritsGraph type~mockitemspec MockItemSpec type~stateitemspec StateItemSpec type~mockitemspec->type~stateitemspec StringVector StringVector type~stateitemspec->StringVector raw_dependencies type~actualptvector ActualPtVector type~stateitemspec->type~actualptvector dependencies type~vector_wrapper~10 vector_wrapper type~actualptvector->type~vector_wrapper~10 elements type~actualconnectionpt ActualConnectionPt type~vector_wrapper~10->type~actualconnectionpt item

Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: adapter_type
character(len=:), public, allocatable :: name
character(len=:), public, allocatable :: subtype

Constructor

public interface MockItemSpec

  • private function new_MockItemSpec(name, subtype, adapter_type) result(spec)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: name
    character(len=*), intent(in), optional :: subtype
    character(len=*), intent(in), optional :: adapter_type

    Return Value type(MockItemSpec)


Type-Bound Procedures

procedure, public :: add_to_bundle

  • private subroutine add_to_bundle(this, bundle, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(in) :: this
    type(ESMF_FieldBundle), intent(inout) :: bundle
    integer, intent(out), optional :: rc

procedure, public :: add_to_state

  • private subroutine add_to_state(this, multi_state, actual_pt, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(in) :: this
    type(MultiState), intent(inout) :: multi_state
    type(ActualConnectionPt), intent(in) :: actual_pt
    integer, intent(out), optional :: rc

procedure, public :: allocate

  • private subroutine allocate(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: can_connect_to

  • private function can_connect_to(this, src_spec, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(in) :: this
    class(StateItemSpec), intent(in) :: src_spec
    integer, intent(out), optional :: rc

    Return Value logical

procedure, public :: connect_to

  • private subroutine connect_to(this, src_spec, actual_pt, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(inout) :: this
    class(StateItemSpec), intent(inout) :: src_spec
    type(ActualConnectionPt), intent(in) :: actual_pt
    integer, intent(out), optional :: rc

procedure, public :: create

  • private subroutine create(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: destroy

  • private subroutine destroy(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: get_dependencies

  • private function get_dependencies(this) result(dependencies)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(in) :: this

    Return Value type(ActualPtVector)

procedure, public :: get_raw_dependencies

  • private function get_raw_dependencies(this) result(raw_dependencies)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(in) :: this

    Return Value type(StringVector)

procedure, public, non_overridable :: is_active

  • private pure function is_active(this)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(in) :: this

    Return Value logical

procedure, public, non_overridable :: is_allocated

  • private pure function is_allocated(this)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(in) :: this

    Return Value logical

procedure, public :: make_adapters

  • private function make_adapters(this, goal_spec, rc) result(adapters)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(in) :: this
    class(StateItemSpec), intent(in) :: goal_spec
    integer, intent(out), optional :: rc

    Return Value type(StateItemAdapterWrapper), allocatable, (:)

procedure, public, non_overridable :: set_active

  • private pure subroutine set_active(this, active)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(inout) :: this
    logical, intent(in), optional :: active

procedure, public, non_overridable :: set_allocated

  • private pure subroutine set_allocated(this, allocated)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(inout) :: this
    logical, intent(in), optional :: allocated

procedure, public :: set_dependencies

  • private subroutine set_dependencies(this, dependencies)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(inout) :: this
    type(ActualPtVector), intent(in) :: dependencies

procedure, public :: set_geometry

  • private subroutine set_geometry(this, geom, vertical_grid, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(inout) :: this
    type(ESMF_Geom), intent(in), optional :: geom
    class(VerticalGrid), intent(in), optional :: vertical_grid
    integer, intent(out), optional :: rc

procedure, public :: set_raw_dependencies

  • private subroutine set_raw_dependencies(this, raw_dependencies)

    Arguments

    Type IntentOptional Attributes Name
    class(StateItemSpec), intent(inout) :: this
    type(StringVector), intent(in) :: raw_dependencies

generic, public :: write(formatted) => write_formatted

  • private subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg)

    Arguments

    Type IntentOptional Attributes Name
    class(BracketSpec), intent(in) :: this
    integer, intent(in) :: unit
    character(len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

procedure, public :: write_formatted

  • private subroutine write_formatted(this, unit, iotype, v_list, iostat, iomsg)

    Arguments

    Type IntentOptional Attributes Name
    class(MockItemSpec), intent(in) :: this
    integer, intent(in) :: unit
    character(len=*), intent(in) :: iotype
    integer, intent(in) :: v_list(:)
    integer, intent(out) :: iostat
    character(len=*), intent(inout) :: iomsg

Source Code

   type, extends(StateItemSpec) :: MockItemSpec
      character(len=:), allocatable :: name
      character(len=:), allocatable :: subtype
      character(len=:), allocatable :: adapter_type
   contains
      procedure :: create
      procedure :: destroy
      procedure :: allocate
      procedure :: set_geometry

      procedure :: connect_to
      procedure :: can_connect_to
      procedure :: make_adapters
      procedure :: add_to_state
      procedure :: add_to_bundle
      procedure :: write_formatted
   end type MockItemSpec