key_class Derived Type

type, public, abstract :: key_class

Can be used as a key for the list. it can be extended to use any data as a key. all that is necessary is to define the == operator function. For convienence, integer or characters keys are also allowed to be used.


Type-Bound Procedures

procedure(key_equal_func), public, deferred :: key_equal

  • pure elemental function key_equal_func(item1, item2) Prototype

    interface for equality operator for key_class.

    Arguments

    Type IntentOptional Attributes Name
    class(key_class), intent(in) :: item1
    class(key_class), intent(in) :: item2

    Return Value logical

generic, public :: operator(==) => key_equal

  • pure elemental function key_equal_func(item1, item2) Prototype

    interface for equality operator for key_class.

    Arguments

    Type IntentOptional Attributes Name
    class(key_class), intent(in) :: item1
    class(key_class), intent(in) :: item2

    Return Value logical

Source Code

    type,abstract,public :: key_class
        !! Can be used as a key for the list.
        !! it can be extended to use any data as a key.
        !! all that is necessary is to define the == operator function.
        !! For convienence, integer or characters keys are also
        !! allowed to be used.
    contains
        !private  ! remove for now to work around intel compile bug. see issue #6
        procedure(key_equal_func),deferred :: key_equal
        generic,public :: operator(==) => key_equal
    end type key_class