Test_CompositeComponent.pf Source File


This file depends on

sourcefile~~test_compositecomponent.pf~~EfferentGraph sourcefile~test_compositecomponent.pf Test_CompositeComponent.pf sourcefile~abstractcomponent.f90 AbstractComponent.F90 sourcefile~test_compositecomponent.pf->sourcefile~abstractcomponent.f90 sourcefile~abstractframeworkcomponent.f90 AbstractFrameworkComponent.F90 sourcefile~test_compositecomponent.pf->sourcefile~abstractframeworkcomponent.f90 sourcefile~compositecomponent.f90 CompositeComponent.F90 sourcefile~test_compositecomponent.pf->sourcefile~compositecomponent.f90 sourcefile~mapl_keywordenforcer.f90 MAPL_KeywordEnforcer.F90 sourcefile~test_compositecomponent.pf->sourcefile~mapl_keywordenforcer.f90 sourcefile~surrogateframeworkcomponent.f90 SurrogateFrameworkComponent.F90 sourcefile~abstractframeworkcomponent.f90->sourcefile~surrogateframeworkcomponent.f90 sourcefile~compositecomponent.f90->sourcefile~abstractframeworkcomponent.f90 sourcefile~abstractcomposite.f90 AbstractComposite.F90 sourcefile~compositecomponent.f90->sourcefile~abstractcomposite.f90 sourcefile~concretecomposite.f90 ConcreteComposite.F90 sourcefile~compositecomponent.f90->sourcefile~concretecomposite.f90 sourcefile~concretecomposite.f90->sourcefile~abstractframeworkcomponent.f90 sourcefile~concretecomposite.f90->sourcefile~abstractcomposite.f90 sourcefile~stringcompositemap.f90 StringCompositeMap.F90 sourcefile~concretecomposite.f90->sourcefile~stringcompositemap.f90 sourcefile~stringcompositemap.f90->sourcefile~abstractcomposite.f90

Source Code

module Test_CompositeComponent
   use mapl_AbstractComponent
   use mapl_AbstractFrameworkComponent
   use mapl_CompositeComponent
   use mapl_KeywordEnforcerMod
   use funit, only: assert_that
   use esmf
   implicit none

   type, extends(CompositeComponent) :: CompleteComponent
   contains
      procedure :: initialize
      procedure :: run
      procedure :: finalize
      procedure :: set_component
      procedure :: get_component
      procedure :: get_internal_state
      procedure :: add_child_component
      procedure :: run_child
   end type CompleteComponent

contains

   @test
   subroutine test_get_num_children()
   end subroutine test_get_num_children


   subroutine initialize(this, clock, phase, unusable, rc)
      class(CompleteComponent), intent(inout) :: this
      type(ESMF_Clock), intent(inout) :: clock
      character(*), intent(in) :: phase
      class(KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional, intent(out) :: rc
   end subroutine initialize

   subroutine run(this, clock, phase, unusable, rc)
      class(CompleteComponent), intent(inout) :: this
      type(ESMF_Clock), intent(inout) :: clock
      character(*), intent(in) :: phase
      class(KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional, intent(out) :: rc
   end subroutine run

   subroutine finalize(this, clock, phase, unusable, rc)
      class(CompleteComponent), intent(inout) :: this
      type(ESMF_Clock), intent(inout) :: clock
      character(*), intent(in) :: phase
      class(KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional, intent(out) :: rc
   end subroutine finalize

   subroutine set_component(this, component)
      class(CompleteComponent), target, intent(inout) :: this
      class(AbstractComponent), intent(in) :: component
   end subroutine set_component

   function get_component(this) result(component)
      class(AbstractComponent), pointer :: component
      class(CompleteComponent), target, intent(in) :: this
   end function get_component

   function get_internal_state(this) result(state)
      type(ESMF_State), pointer :: state
      class(CompleteComponent), target, intent(in) :: this
   end function get_internal_state

   subroutine run_child(this, name, clock, phase, unusable, rc)
      class(CompleteComponent), intent(inout) :: this
      character(*), intent(in) :: name
      type(ESMF_Clock), intent(inout) :: clock
      character(*), intent(in) :: phase
      class(KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional, intent(out) :: rc
   end subroutine run_child

   function add_child_component(this, name, user_component) result(child)
      class(AbstractFrameworkComponent), pointer :: child
      class(CompleteComponent), target, intent(inout) :: this
      character(*), intent(in) :: name
      class(AbstractComponent), intent(in) :: user_component
   end function add_child_component

   

end module Test_CompositeComponent