box Derived Type

type, public :: box


Inherits

type~~box~~InheritsGraph type~box box type~lens lens type~box->type~lens lenses

Components

Type Visibility Attributes Name Initial
type(lens), public, dimension(:), allocatable :: lenses

the lenses in the box


Type-Bound Procedures

procedure, public :: add_lens

  • public subroutine add_lens(me, l)

    Arguments

    Type IntentOptional Attributes Name
    class(box), intent(inout) :: me
    type(lens), intent(in) :: l

    lense to add

procedure, public :: remove_lens

  • public subroutine remove_lens(me, label)

    remove the lens with the label (if present)

    Arguments

    Type IntentOptional Attributes Name
    class(box), intent(inout) :: me
    character(len=*), intent(in) :: label

Source Code

    type :: box
        type(lens),dimension(:),allocatable :: lenses !! the lenses in the box
        contains
        procedure :: add_lens
        procedure :: remove_lens
    end type box