tuple Derived Type

type, public, extends(ImmutableSequence) :: tuple

Type that corresponds to a Python tuple. Create with tuple_create.



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 => tuple_setitem_int32_object

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int32_int32

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int32_int64

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int32_real32

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int32_real64

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int32_complex_real32

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int32_complex_real64

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int32_logical

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int32_char_1d

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

    Type IntentOptional AttributesName
    class(tuple), 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 => tuple_setitem_int32_chars

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

    Type IntentOptional AttributesName
    class(tuple), 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 => tuple_setitem_int64_object

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int64_int32

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int64_int64

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int64_real32

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int64_real64

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int64_complex_real32

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int64_complex_real64

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int64_logical

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

generic, public :: setitem => tuple_setitem_int64_char_1d

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

    Type IntentOptional AttributesName
    class(tuple), 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 => tuple_setitem_int64_chars

Sets item at given index. One must set all items before use of tuple.

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

    Arguments

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

    Return Value integer(kind=C_INT)

procedure, public :: add => tuple_add

Concatenates tuples.

  • private function tuple_add(self, result_tuple, tuple_to_concatenate) result(ierror)

    Arguments

    Type IntentOptional AttributesName
    class(tuple), intent(inout) :: self
    type(tuple), intent(out) :: result_tuple
    class(tuple), intent(inout) :: tuple_to_concatenate

    Return Value integer(kind=C_INT)