AbstractComposite Derived Type

type, public, abstract :: AbstractComposite


Inherited by

type~~abstractcomposite~~InheritedByGraph type~abstractcomposite AbstractComposite type~concretecomposite ConcreteComposite type~concretecomposite->type~abstractcomposite type~concretecomposite->type~concretecomposite parent type~stringcompositepair StringCompositePair type~stringcompositepair->type~abstractcomposite value type~compositecomponent CompositeComponent type~compositecomponent->type~concretecomposite composite type~tvector~2 tVector type~tvector~2->type~stringcompositepair elements type~baseframeworkcomponent BaseFrameworkComponent type~baseframeworkcomponent->type~compositecomponent type~completecomponent CompleteComponent type~completecomponent->type~compositecomponent type~set2~3 set2 type~set2~3->type~tvector~2 items type~maplgenericcomponent MaplGenericComponent type~maplgenericcomponent->type~baseframeworkcomponent type~s_iterator~3 s_iterator type~s_iterator~3->type~set2~3 reference type~stringcompositemap StringCompositeMap type~stringcompositemap->type~set2~3 tree

Type-Bound Procedures

procedure(i_AddChild), public, deferred :: add_child

  • function i_AddChild(this, name, composite) result(child) Prototype

    Arguments

    Type IntentOptional Attributes Name
    class(AbstractComposite), 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(i_GetChildByIndex), public, deferred :: get_child_by_index

  • function i_GetChildByIndex(this, i) result(child) Prototype

    Arguments

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

    Return Value class(AbstractComposite), pointer

procedure(i_GetChildByName), public, deferred :: get_child_by_name

  • function i_GetChildByName(this, name) result(child) Prototype

    Arguments

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

    Return Value class(AbstractComposite), pointer

procedure(i_GetNum), public, deferred :: get_num_children

$ procedure :: is_leaf $ procedure :: is_root $ procedure :: get_height

  • function i_GetNum(this) result(num) Prototype

    Arguments

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

    Return Value integer

procedure(i_GetParent), public, deferred :: get_parent

  • function i_GetParent(this) result(parent) Prototype

    Arguments

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

    Return Value class(AbstractComposite), pointer

Source Code

   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