MutableSequence Derived Type

type, public, abstract, extends(Sequence) :: MutableSequence

Abstract type that represents a sequence, whose items can be changed.



Type-Bound Procedures

procedure, public :: destroy => object_destroy

Call to allow for freeing of resources of this object.

  • private subroutine object_destroy(self)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(inout) :: self

procedure, public :: getattribute => object_getattribute

Get value of an attribute of this object

  • private function object_getattribute(self, attr, attr_name) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(in) :: self
    type(object), intent(out) :: attr
    character(kind=C_CHAR,len=*), intent(in) :: attr_name

    Return Value integer(kind=C_INT)

procedure, public :: setattr => object_setattr

Set value of an attribute of this object

  • private function object_setattr(self, attr_name, attr_value) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(inout) :: self
    character(kind=C_CHAR,len=*), intent(in) :: attr_name
    class(object), intent(in) :: attr_value

    Return Value integer(kind=C_INT)

procedure, public :: delattr => object_delattr

Delete an attribute of this object

  • private function object_delattr(self, attr_name) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(inout) :: self
    character(kind=C_CHAR,len=*), intent(in) :: attr_name

    Return Value integer(kind=C_INT)

procedure, public :: get_c_ptr => object_get_c_ptr

Get c_ptr representation of this object. For development of Python extension modules

  • private function object_get_c_ptr(self) result(r)

    Get C pointer to an object, needed for developing Python extensions.

    Arguments

    Type IntentOptional AttributesName
    class(object), intent(in) :: self

    Return Value type(c_ptr)

generic, public :: len => sequence_len_int32

Get the length of the object (number of elements).

  • private function Sequence_len_int32(self, length) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int32), intent(out) :: length

    Return Value integer(kind=C_INT)

generic, public :: count => sequence_count_int32

  • private function sequence_count_int32(self, the_count, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int32), intent(out) :: the_count
    class(object), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: index => sequence_index_int32

Get the first index of a value.

  • private function sequence_index_int32(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int32), intent(out) :: ind
    class(object), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_object

Get item at a certain index

  • private function sequence_getitem_int32_object(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(inout) :: self
    type(object), intent(out) :: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_int32

Get item at a certain index

  • private function sequence_getitem_int32_int32(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int32), intent(out) :: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_int64

Get item at a certain index

  • private function sequence_getitem_int32_int64(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int64), intent(out) :: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_real32

Get item at a certain index

  • private function sequence_getitem_int32_real32(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    real(kind=real32), intent(out) :: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_real64

Get item at a certain index

  • private function sequence_getitem_int32_real64(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    real(kind=real64), intent(out) :: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_complex_real32

Get item at a certain index

  • private function sequence_getitem_int32_complex_real32(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    complex(kind=real32), intent(out) :: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_complex_real64

Get item at a certain index

  • private function sequence_getitem_int32_complex_real64(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    complex(kind=real64), intent(out) :: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_logical

Get item at a certain index

  • private function sequence_getitem_int32_logical(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    logical, intent(out) :: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_char_1d

Get item at a certain index

  • private function sequence_getitem_int32_char_1d(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    character(kind=C_CHAR), intent(out), dimension(:), pointer:: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int32_chars

Get item at a certain index

  • private function sequence_getitem_int32_chars(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    character(kind=C_CHAR,len=:), intent(out), allocatable:: item
    integer(kind=int32), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: len => sequence_len_int64

Get the length of the object (number of elements).

  • private function Sequence_len_int64(self, length) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int64), intent(out) :: length

    Return Value integer(kind=C_INT)

generic, public :: count => sequence_count_int64

  • private function sequence_count_int64(self, the_count, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int64), intent(out) :: the_count
    class(object), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: index => sequence_index_int64

Get the first index of a value.

  • private function sequence_index_int64(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int64), intent(out) :: ind
    class(object), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_object

Get item at a certain index

  • private function sequence_getitem_int64_object(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(inout) :: self
    type(object), intent(out) :: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_int32

Get item at a certain index

  • private function sequence_getitem_int64_int32(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int32), intent(out) :: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_int64

Get item at a certain index

  • private function sequence_getitem_int64_int64(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    integer(kind=int64), intent(out) :: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_real32

Get item at a certain index

  • private function sequence_getitem_int64_real32(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    real(kind=real32), intent(out) :: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_real64

Get item at a certain index

  • private function sequence_getitem_int64_real64(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    real(kind=real64), intent(out) :: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_complex_real32

Get item at a certain index

  • private function sequence_getitem_int64_complex_real32(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    complex(kind=real32), intent(out) :: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_complex_real64

Get item at a certain index

  • private function sequence_getitem_int64_complex_real64(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    complex(kind=real64), intent(out) :: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_logical

Get item at a certain index

  • private function sequence_getitem_int64_logical(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    logical, intent(out) :: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_char_1d

Get item at a certain index

  • private function sequence_getitem_int64_char_1d(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    character(kind=C_CHAR), intent(out), dimension(:), pointer:: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

generic, public :: getitem => sequence_getitem_int64_chars

Get item at a certain index

  • private function sequence_getitem_int64_chars(self, item, ind) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    character(kind=C_CHAR,len=:), intent(out), allocatable:: item
    integer(kind=int64), intent(in) :: ind

    Return Value integer(kind=C_INT)

procedure, public :: contains => sequence_contains

Checks if a given item is contained in the sequence.

  • private function sequence_contains(self, contain_flag, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(Sequence), intent(in) :: self
    logical, intent(out) :: contain_flag
    class(object), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_object

Set an item at a given index

  • private function mutablesequence_setitem_int32_object(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    class(object), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_int32

Set an item at a given index

  • private function mutablesequence_setitem_int32_int32(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    integer(kind=int32), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_int64

Set an item at a given index

  • private function mutablesequence_setitem_int32_int64(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    integer(kind=int64), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_real32

Set an item at a given index

  • private function mutablesequence_setitem_int32_real32(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    real(kind=real32), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_real64

Set an item at a given index

  • private function mutablesequence_setitem_int32_real64(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    real(kind=real64), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_complex_real32

Set an item at a given index

  • private function mutablesequence_setitem_int32_complex_real32(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    complex(kind=real32), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_complex_real64

Set an item at a given index

  • private function mutablesequence_setitem_int32_complex_real64(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    complex(kind=real64), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_logical

Set an item at a given index

  • private function mutablesequence_setitem_int32_logical(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    logical, intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_char_1d

Set an item at a given index

  • private function mutablesequence_setitem_int32_char_1d(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    character(kind=C_CHAR), intent(in), dimension(:):: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int32_chars

Set an item at a given index

  • private function mutablesequence_setitem_int32_chars(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int32), intent(in) :: ind
    character(kind=C_CHAR,len=*), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_object

Set an item at a given index

  • private function mutablesequence_setitem_int64_object(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    class(object), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_int32

Set an item at a given index

  • private function mutablesequence_setitem_int64_int32(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    integer(kind=int32), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_int64

Set an item at a given index

  • private function mutablesequence_setitem_int64_int64(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    integer(kind=int64), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_real32

Set an item at a given index

  • private function mutablesequence_setitem_int64_real32(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    real(kind=real32), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_real64

Set an item at a given index

  • private function mutablesequence_setitem_int64_real64(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    real(kind=real64), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_complex_real32

Set an item at a given index

  • private function mutablesequence_setitem_int64_complex_real32(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    complex(kind=real32), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_complex_real64

Set an item at a given index

  • private function mutablesequence_setitem_int64_complex_real64(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    complex(kind=real64), intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_logical

Set an item at a given index

  • private function mutablesequence_setitem_int64_logical(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    logical, intent(in) :: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_char_1d

Set an item at a given index

  • private function mutablesequence_setitem_int64_char_1d(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    character(kind=C_CHAR), intent(in), dimension(:):: item

    Return Value integer(kind=C_INT)

generic, public :: setitem => mutablesequence_setitem_int64_chars

Set an item at a given index

  • private function mutablesequence_setitem_int64_chars(self, ind, item) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(MutableSequence), intent(inout) :: self
    integer(kind=int64), intent(in) :: ind
    character(kind=C_CHAR,len=*), intent(in) :: item

    Return Value integer(kind=C_INT)