CompositeComponent Derived Type

type, public, abstract, extends(AbstractFrameworkComponent) :: CompositeComponent

$ private


Inherits

type~~compositecomponent~~InheritsGraph type~compositecomponent CompositeComponent type~abstractframeworkcomponent AbstractFrameworkComponent type~compositecomponent->type~abstractframeworkcomponent type~concretecomposite ConcreteComposite type~compositecomponent->type~concretecomposite composite type~surrogateframeworkcomponent SurrogateFrameworkComponent type~abstractframeworkcomponent->type~surrogateframeworkcomponent type~concretecomposite->type~abstractframeworkcomponent component type~concretecomposite->type~concretecomposite parent StringVector StringVector type~concretecomposite->StringVector children_names type~abstractcomposite AbstractComposite type~concretecomposite->type~abstractcomposite type~stringcompositemap StringCompositeMap type~concretecomposite->type~stringcompositemap children type~set2~3 set2 type~stringcompositemap->type~set2~3 tree type~ivector~2 iVector type~set2~3->type~ivector~2 parents, lefts, rights, heights type~tvector~2 tVector type~set2~3->type~tvector~2 items

Inherited by

type~~compositecomponent~~InheritedByGraph type~compositecomponent CompositeComponent type~baseframeworkcomponent BaseFrameworkComponent type~baseframeworkcomponent->type~compositecomponent type~completecomponent CompleteComponent type~completecomponent->type~compositecomponent type~maplgenericcomponent MaplGenericComponent type~maplgenericcomponent->type~baseframeworkcomponent type~mapl_metacomp MAPL_MetaComp type~mapl_metacomp->type~maplgenericcomponent type~namedcomponent NamedComponent type~namedcomponent->type~maplgenericcomponent type~historytrajectory HistoryTrajectory type~historytrajectory->type~mapl_metacomp GENSTATE type~masksamplergeosat MaskSamplerGeosat type~masksamplergeosat->type~mapl_metacomp GENSTATE type~stationsampler StationSampler type~stationsampler->type~mapl_metacomp GENSTATE

Components

Type Visibility Attributes Name Initial
class(ConcreteComposite), public, pointer :: composite => null()

Type-Bound Procedures

procedure, public :: add_child

procedure(i_AddChildComponent), public, deferred :: add_child_component

  • function i_AddChildComponent(this, name, user_component) result(child) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractFrameworkComponent), intent(inout), target :: this
    character(len=*), intent(in) :: name
    class(AbstractComponent), intent(in) :: user_component

    Return Value class(AbstractFrameworkComponent), pointer

procedure(i_Run), public, deferred :: finalize

  • subroutine i_Run(this, clock, phase, unusable, rc) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(SurrogateFrameworkComponent), intent(inout) :: this
    type(ESMF_Clock), intent(inout) :: clock
    character(len=*), intent(in) :: phase
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

generic, public :: get_child => get_child_by_name, get_child_by_index

  • private function get_child_by_name(this, name) result(child)

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeComponent), intent(in) :: this
    character(len=*), intent(in) :: name

    Return Value class(AbstractFrameworkComponent), pointer

  • private function get_child_by_index(this, i) result(child)

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeComponent), intent(in) :: this
    integer, intent(in) :: i

    Return Value class(AbstractFrameworkComponent), pointer

procedure, public :: get_child_by_index

  • private function get_child_by_index(this, i) result(child)

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeComponent), intent(in) :: this
    integer, intent(in) :: i

    Return Value class(AbstractFrameworkComponent), pointer

procedure, public :: get_child_by_name

  • private function get_child_by_name(this, name) result(child)

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeComponent), intent(in) :: this
    character(len=*), intent(in) :: name

    Return Value class(AbstractFrameworkComponent), pointer

procedure(i_GetComponent), public, deferred :: get_component

  • function i_GetComponent(this) result(component) Prototype

    Arguments

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

    Return Value class(AbstractComponent), pointer

procedure, public :: get_composite

  • private function get_composite(this) result(composite)

    Arguments

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

    Return Value class(AbstractComposite), pointer

procedure(i_GetState), public, deferred :: get_internal_state

  • function i_GetState(this) result(state) Prototype

    Arguments

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

    Return Value type(ESMF_State), pointer

procedure, public :: get_num_children

  • private function get_num_children(this) result(num_children)

    Arguments

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

    Return Value integer

procedure, public :: get_parent

procedure(i_Run), public, deferred :: initialize

  • subroutine i_Run(this, clock, phase, unusable, rc) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(SurrogateFrameworkComponent), intent(inout) :: this
    type(ESMF_Clock), intent(inout) :: clock
    character(len=*), intent(in) :: phase
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure(i_Run), public, deferred :: run

  • subroutine i_Run(this, clock, phase, unusable, rc) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(SurrogateFrameworkComponent), intent(inout) :: this
    type(ESMF_Clock), intent(inout) :: clock
    character(len=*), intent(in) :: phase
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure(i_RunChild), public, deferred :: run_child

  • subroutine i_RunChild(this, name, clock, phase, unusable, rc) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(SurrogateFrameworkComponent), intent(inout) :: this
    character(len=*), intent(in) :: name
    type(ESMF_Clock), intent(inout) :: clock
    character(len=*), intent(in) :: phase
    class(KeywordEnforcer), intent(in), optional :: unusable
    integer, intent(out), optional :: rc

procedure(i_SetComponent), public, deferred :: set_component

  • subroutine i_SetComponent(this, component) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractFrameworkComponent), intent(inout), target :: this
    class(AbstractComponent), intent(in) :: component

procedure, public :: set_composite

  • private subroutine set_composite(this, composite)

    Arguments

    Type IntentOptional Attributes Name
    class(CompositeComponent), intent(inout) :: this
    class(AbstractComposite), intent(in), target :: composite

Source Code

   type, abstract, extends(AbstractFrameworkComponent) :: CompositeComponent
!!$      private
      class(ConcreteComposite), pointer :: composite => null()
   contains
      procedure :: get_child_by_name
      procedure :: get_child_by_index
      generic :: get_child => get_child_by_name, get_child_by_index
      procedure :: add_child
      procedure :: get_parent
      procedure :: get_num_children

      ! Indirect design pattern accessors
      procedure :: set_composite
      procedure :: get_composite
      
   end type CompositeComponent