AbstractComposite.F90 Source File


Files dependent on this one

sourcefile~~abstractcomposite.f90~~AfferentGraph sourcefile~abstractcomposite.f90 AbstractComposite.F90 sourcefile~compositecomponent.f90 CompositeComponent.F90 sourcefile~compositecomponent.f90->sourcefile~abstractcomposite.f90 sourcefile~concretecomposite.f90 ConcreteComposite.F90 sourcefile~compositecomponent.f90->sourcefile~concretecomposite.f90 sourcefile~concretecomposite.f90->sourcefile~abstractcomposite.f90 sourcefile~stringcompositemap.f90 StringCompositeMap.F90 sourcefile~concretecomposite.f90->sourcefile~stringcompositemap.f90 sourcefile~mapl_generic.f90 MAPL_Generic.F90 sourcefile~mapl_generic.f90->sourcefile~abstractcomposite.f90 sourcefile~mapl_generic.f90->sourcefile~concretecomposite.f90 sourcefile~maplgeneric.f90 MaplGeneric.F90 sourcefile~mapl_generic.f90->sourcefile~maplgeneric.f90 sourcefile~stringcompositemap.f90->sourcefile~abstractcomposite.f90 sourcefile~test_concretecomposite.pf Test_ConcreteComposite.pf sourcefile~test_concretecomposite.pf->sourcefile~abstractcomposite.f90 sourcefile~test_concretecomposite.pf->sourcefile~concretecomposite.f90 sourcefile~maplgenericcomponent.f90 MaplGenericComponent.F90 sourcefile~test_concretecomposite.pf->sourcefile~maplgenericcomponent.f90 sourcefile~baseframeworkcomponent.f90 BaseFrameworkComponent.F90 sourcefile~baseframeworkcomponent.f90->sourcefile~compositecomponent.f90 sourcefile~comp_testing_driver.f90 Comp_Testing_Driver.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl_generic.f90 sourcefile~mapl.f90 MAPL.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl.f90 sourcefile~mapl_capgridcomp.f90 MAPL_CapGridComp.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl_capgridcomp.f90 sourcefile~driver.f90~4 driver.F90 sourcefile~driver.f90~4->sourcefile~compositecomponent.f90 sourcefile~driver.f90~4->sourcefile~concretecomposite.f90 sourcefile~driver.f90~4->sourcefile~maplgenericcomponent.f90 sourcefile~extdatagridcompmod.f90 ExtDataGridCompMod.F90 sourcefile~extdatagridcompmod.f90->sourcefile~mapl_generic.f90 sourcefile~extdatagridcompng.f90 ExtDataGridCompNG.F90 sourcefile~extdatagridcompng.f90->sourcefile~mapl_generic.f90 sourcefile~mapl.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_capgridcomp.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_capgridcomp.f90->sourcefile~extdatagridcompmod.f90 sourcefile~mapl_capgridcomp.f90->sourcefile~extdatagridcompng.f90 sourcefile~mapl_historygridcomp.f90 MAPL_HistoryGridComp.F90 sourcefile~mapl_capgridcomp.f90->sourcefile~mapl_historygridcomp.f90 sourcefile~mapl_historycollection.f90 MAPL_HistoryCollection.F90 sourcefile~mapl_historycollection.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_historycollection.f90 sourcefile~mapl_orbgridcompmod.f90 MAPL_OrbGridCompMod.F90 sourcefile~mapl_orbgridcompmod.f90->sourcefile~mapl_generic.f90 sourcefile~maplgenericcomponent.f90->sourcefile~compositecomponent.f90 sourcefile~maplgenericcomponent.f90->sourcefile~concretecomposite.f90 sourcefile~maplgenericcomponent.f90->sourcefile~baseframeworkcomponent.f90 sourcefile~test_compositecomponent.pf Test_CompositeComponent.pf sourcefile~test_compositecomponent.pf->sourcefile~compositecomponent.f90 sourcefile~extdatadriver.f90 ExtDataDriver.F90 sourcefile~extdatadriver.f90->sourcefile~mapl.f90 sourcefile~extdatadrivergridcomp.f90 ExtDataDriverGridComp.F90 sourcefile~extdatadriver.f90->sourcefile~extdatadrivergridcomp.f90 sourcefile~extdatadrivermod.f90 ExtDataDriverMod.F90 sourcefile~extdatadriver.f90->sourcefile~extdatadrivermod.f90 sourcefile~extdataroot_gridcomp.f90 ExtDataRoot_GridComp.F90 sourcefile~extdatadriver.f90->sourcefile~extdataroot_gridcomp.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~extdatagridcompmod.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~extdatagridcompng.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~mapl.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~mapl_historygridcomp.f90 sourcefile~extdatadrivermod.f90->sourcefile~mapl.f90 sourcefile~extdatadrivermod.f90->sourcefile~extdatadrivergridcomp.f90 sourcefile~extdatadrivermod.f90->sourcefile~extdataroot_gridcomp.f90 sourcefile~extdataroot_gridcomp.f90->sourcefile~mapl.f90 sourcefile~varspecdescription.f90 VarspecDescription.F90 sourcefile~extdataroot_gridcomp.f90->sourcefile~varspecdescription.f90 sourcefile~mapl_cap.f90 MAPL_Cap.F90 sourcefile~mapl_cap.f90->sourcefile~mapl_capgridcomp.f90 sourcefile~mapl_demo_fargparse.f90 MAPL_demo_fargparse.F90 sourcefile~mapl_demo_fargparse.f90->sourcefile~mapl.f90 sourcefile~maplgeneric.f90->sourcefile~maplgenericcomponent.f90 sourcefile~pfio_mapl_demo.f90 pfio_MAPL_demo.F90 sourcefile~pfio_mapl_demo.f90->sourcefile~mapl.f90 sourcefile~regrid_util.f90 Regrid_Util.F90 sourcefile~regrid_util.f90->sourcefile~mapl.f90 sourcefile~time_ave_util.f90 time_ave_util.F90 sourcefile~time_ave_util.f90->sourcefile~mapl.f90 sourcefile~ut_extdata.f90 ut_ExtData.F90 sourcefile~ut_extdata.f90->sourcefile~extdatagridcompmod.f90 sourcefile~varspecdescription.f90->sourcefile~mapl.f90 sourcefile~mapl_gridcomps.f90 MAPL_GridComps.F90 sourcefile~mapl_gridcomps.f90->sourcefile~mapl_cap.f90 sourcefile~mapl_nuopcwrappermod.f90 MAPL_NUOPCWrapperMod.F90 sourcefile~mapl_nuopcwrappermod.f90->sourcefile~mapl_cap.f90

Source Code

module mapl_AbstractComposite
   implicit none
   private

   public :: AbstractComposite

   type, abstract :: AbstractComposite
   contains
      procedure(i_GetChildByName), deferred :: get_child_by_name
      procedure(i_GetChildByIndex), deferred :: get_child_by_index
      generic :: get_child => get_child_by_name, get_child_by_index
      procedure(i_AddChild), deferred :: add_child
      procedure(i_GetParent), deferred :: get_parent
      procedure(i_GetNum), deferred :: get_num_children
!!$      procedure :: is_leaf
!!$      procedure :: is_root
!!$      procedure :: get_height
   end type AbstractComposite

   abstract interface

      function i_GetChildByName(this, name) result(child)
         import AbstractComposite
         class(AbstractComposite), pointer :: child
         class(AbstractComposite), target, intent(in) :: this
         character(*), intent(in) :: name
      end function i_GetChildByName

      function i_GetChildByIndex(this, i) result(child)
         import AbstractComposite
         class(AbstractComposite), pointer :: child
         class(AbstractComposite), target, intent(in) :: this
         integer, intent(in) :: i
      end function i_GetChildByIndex

      function i_AddChild(this, name, composite) result(child)
         import AbstractComposite
         class(AbstractComposite), pointer :: child
         class(AbstractComposite), target, intent(inout) :: this
         character(*), intent(in) :: name
         class(AbstractComposite), intent(in) :: composite
      end function i_AddChild

      function i_GetParent(this) result(parent)
         import AbstractComposite
         class(AbstractComposite), pointer :: parent
         class(AbstractComposite), intent(in) :: this
      end function i_GetParent

      integer function i_GetNum(this) result(num)
         import AbstractComposite
         class(AbstractComposite), intent(in) :: this
      end function i_GetNum

   end interface

end module mapl_AbstractComposite