ConcreteComposite Derived Type

type, public, extends(AbstractComposite) :: ConcreteComposite


Inherits

type~~concretecomposite~~InheritsGraph type~concretecomposite ConcreteComposite type~concretecomposite->type~concretecomposite parent StringVector StringVector type~concretecomposite->StringVector children_names type~abstractcomposite AbstractComposite type~concretecomposite->type~abstractcomposite type~abstractframeworkcomponent AbstractFrameworkComponent type~concretecomposite->type~abstractframeworkcomponent component type~stringcompositemap StringCompositeMap type~concretecomposite->type~stringcompositemap children type~surrogateframeworkcomponent SurrogateFrameworkComponent type~abstractframeworkcomponent->type~surrogateframeworkcomponent 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 type~stringcompositepair StringCompositePair type~tvector~2->type~stringcompositepair elements

Inherited by

type~~concretecomposite~~InheritedByGraph type~concretecomposite ConcreteComposite type~concretecomposite->type~concretecomposite parent type~compositecomponent CompositeComponent type~compositecomponent->type~concretecomposite composite 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

Constructor

public interface ConcreteComposite


Type-Bound Procedures

procedure, public :: add_child

  • private function add_child(this, name, composite) result(child)

    Arguments

    Type IntentOptional Attributes Name
    class(ConcreteComposite), intent(inout), target :: this
    character(len=*), intent(in) :: name
    class(AbstractComposite), intent(in) :: composite

    Return Value class(AbstractComposite), pointer

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(ConcreteComposite), intent(in), target :: this
    character(len=*), intent(in) :: name

    Return Value class(AbstractComposite), pointer

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

    Arguments

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

    Return Value class(AbstractComposite), pointer

procedure, public :: get_child_by_index

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

    Arguments

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

    Return Value class(AbstractComposite), pointer

procedure, public :: get_child_by_name

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

    Arguments

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

    Return Value class(AbstractComposite), pointer

procedure, public :: get_component

procedure, public :: get_num_children

  • private function get_num_children(this) result(num_children)

    Arguments

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

    Return Value integer

procedure, public :: get_parent

  • private function get_parent(this) result(parent)

    Arguments

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

    Return Value class(AbstractComposite), pointer

procedure, public :: initialize

$ procedure :: is_leaf $ procedure :: is_root

procedure, public :: set_component

Source Code

   type, extends(AbstractComposite) :: ConcreteComposite
      private
      class(AbstractFrameworkComponent), allocatable :: component
      type(StringCompositeMap) :: children
      type(StringVector) :: children_names
      class(ConcreteComposite), pointer :: parent => null()
   contains
      procedure :: add_child
      procedure :: get_child_by_name, get_child_by_index
      procedure :: get_parent
      procedure :: get_component
      procedure :: set_component
      procedure :: get_num_children
      procedure :: initialize
!!$      procedure :: is_leaf
!!$      procedure :: is_root
   end type ConcreteComposite