SimpleColumn.F90 Source File


This file depends on

sourcefile~~simplecolumn.f90~~EfferentGraph sourcefile~simplecolumn.f90 SimpleColumn.F90 sourcefile~abstractcolumn.f90 AbstractColumn.F90 sourcefile~simplecolumn.f90->sourcefile~abstractcolumn.f90 sourcefile~abstractmeternode.f90 AbstractMeterNode.F90 sourcefile~simplecolumn.f90->sourcefile~abstractmeternode.f90 sourcefile~distributedmeter.f90 DistributedMeter.F90 sourcefile~simplecolumn.f90->sourcefile~distributedmeter.f90 sourcefile~abstractcolumn.f90->sourcefile~abstractmeternode.f90 sourcefile~abstractcolumn.f90->sourcefile~distributedmeter.f90 sourcefile~abstractmeter.f90 AbstractMeter.F90 sourcefile~abstractmeternode.f90->sourcefile~abstractmeter.f90 sourcefile~abstractgauge.f90 AbstractGauge.F90 sourcefile~distributedmeter.f90->sourcefile~abstractgauge.f90 sourcefile~distributedmeter.f90->sourcefile~abstractmeter.f90 sourcefile~advancedmeter.f90 AdvancedMeter.F90 sourcefile~distributedmeter.f90->sourcefile~advancedmeter.f90 sourcefile~mapl_errorhandling.f90 MAPL_ErrorHandling.F90 sourcefile~distributedmeter.f90->sourcefile~mapl_errorhandling.f90 sourcefile~abstractgauge.f90->sourcefile~abstractmeter.f90 sourcefile~abstractmeter.f90->sourcefile~mapl_errorhandling.f90 sourcefile~advancedmeter.f90->sourcefile~abstractgauge.f90 sourcefile~advancedmeter.f90->sourcefile~abstractmeter.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~mapl_errorhandling.f90->sourcefile~mapl_throw.f90

Files dependent on this one

sourcefile~~simplecolumn.f90~~AfferentGraph sourcefile~simplecolumn.f90 SimpleColumn.F90 sourcefile~exclusivecolumn.f90 ExclusiveColumn.F90 sourcefile~exclusivecolumn.f90->sourcefile~simplecolumn.f90 sourcefile~inclusivecolumn.f90 InclusiveColumn.F90 sourcefile~inclusivecolumn.f90->sourcefile~simplecolumn.f90 sourcefile~mapl_profiler.f90~2 MAPL_Profiler.F90 sourcefile~mapl_profiler.f90~2->sourcefile~simplecolumn.f90 sourcefile~maxcyclecolumn.f90 MaxCycleColumn.F90 sourcefile~maxcyclecolumn.f90->sourcefile~simplecolumn.f90 sourcefile~meancyclecolumn.f90 MeanCycleColumn.F90 sourcefile~meancyclecolumn.f90->sourcefile~simplecolumn.f90 sourcefile~mincyclecolumn.f90 MinCycleColumn.F90 sourcefile~mincyclecolumn.f90->sourcefile~simplecolumn.f90 sourcefile~numcyclescolumn.f90 NumCyclesColumn.F90 sourcefile~numcyclescolumn.f90->sourcefile~simplecolumn.f90 sourcefile~stddevcolumn.f90 StdDevColumn.F90 sourcefile~stddevcolumn.f90->sourcefile~simplecolumn.f90

Source Code

module MAPL_SimpleColumn
   use MAPL_AbstractColumn
   use GFTL_UnlimitedVector
   use MAPL_AbstractMeterNode
   use MAPL_DistributedMeter
   implicit none
   private

   public :: SimpleColumn

   type, abstract, extends(AbstractColumn) :: SimpleColumn
      private
   contains
      procedure :: get_rows
      procedure(i_get_row), deferred :: get_row
   end type SimpleColumn


   abstract interface

      function i_get_row(this, node) result(row)
         import SimpleColumn
         import AbstractMeterNode
         ! Some columns return reals, others return integers
         class(*), allocatable :: row
         class(SimpleColumn), intent(in) :: this
         class(AbstractMeterNode), target, intent(in) :: node

      end function i_get_row

   end interface


contains


   function get_rows(this, node) result(rows)
      type (UnlimitedVector) :: rows
      class (SimpleColumn), intent(in) :: this
      class (AbstractMeterNode), target, intent(in) :: node

      integer :: i
      class (AbstractMeterNodeIterator), allocatable :: iter
      class (AbstractMeterNode), pointer :: subnode
      

      iter = node%begin()
      i = 0
      do while (iter /= node%end())
         i = i + 1
         subnode => iter%get()
         call rows%push_back(this%get_row(subnode))
         call iter%next()
      end do
      
   end function get_rows


end module MAPL_SimpleColumn