Documentation for module list_callstackentry

An array-based list which grows on demand. When the internal array is full, a new array of twice the size will be allocated and the items are copied over.

source: list_callstackentry.F
Loading...

public Types:

list_callstackentry_type
...

public Subroutines/Functions:

Removes all values from the list. The list itself is not deallocated.
Removes the value at the given position from the list.
Deallocated the internal data-structures of the given list. Caution: If the stored values are pointers, their targets will not get deallocated by this routine.
Returns the value at the given position from the list.
Allocates the internal data-structures of the given list. This has to be called before any of the other routines. For deallocation call list_[valuetype]_destroy.
Inserts the given value at the givenn position within the list. Values which lay behind the insertion-position move one position up.
FUNCTION
LOGICAL
list_callstackentry_isready (list)
Test if the given list has been initialized.
Returns the last element in the list. Is equivalent to: list_callstackentry_get(list, list_callstackentry_size(list))
Returns the last element in the list and removes it. Is equivialent to: value = list_callstackentry_get(list, list_callstackentry_size(list)) call list_callstackentry_del(list, list_callstackentry_size(list))
Appends the given value at the end of the list.
Assings the given value to the given position in the list. Thereby, the former value at that position gets overwritten. If the position is out of bounds, the program stops.
FUNCTION
INTEGER
list_callstackentry_size (list)
Returns the current size of the list.

public Types:

TYPE :: list_callstackentry_type

...


DIMENSION(:), POINTER :: arr => NULL() ...
INTEGER
:: size = -1 ...

SUBROUTINElist_callstackentry_clear(list)

Removes all values from the list. The list itself is not deallocated.

Arguments:
INTENT(inout)
:: list ...

SUBROUTINElist_callstackentry_del(list, pos)

Removes the value at the given position from the list.

Arguments:
INTENT(inout)
:: list ...
INTEGER,
INTENT(in)
:: pos Position in the list - musst fulfill 0 < pos < list_size+1 .

SUBROUTINElist_callstackentry_destroy(list)

Deallocated the internal data-structures of the given list. Caution: If the stored values are pointers, their targets will not get deallocated by this routine.

Arguments:
INTENT(inout)
:: list ...

FUNCTIONlist_callstackentry_get(list, pos)

Returns the value at the given position from the list.

Return Value ::
Arguments:
INTENT(in)
:: list ...
INTEGER,
INTENT(in)
:: pos Position in the list - musst fulfill 0 < pos < list_size+1 .

SUBROUTINElist_callstackentry_init(list, initial_capacity)

Allocates the internal data-structures of the given list. This has to be called before any of the other routines. For deallocation call list_[valuetype]_destroy.

Arguments:
INTENT(inout)
:: list ...
INTEGER,
INTENT(in),
OPTIONAL
:: initial_capacity The initial size of the internal array (default=11).

SUBROUTINElist_callstackentry_insert(list, value, pos)

Inserts the given value at the givenn position within the list. Values which lay behind the insertion-position move one position up.

Arguments:
INTENT(inout)
:: list ...
INTENT(in)
:: value ...
INTEGER,
INTENT(in)
:: pos Position in the list - musst fulfill 0 < pos < list_size+2 .

FUNCTIONlist_callstackentry_isready(list)

Test if the given list has been initialized.

Return Value ::
LOGICAL
Arguments:
INTENT(in)
:: list ...

FUNCTIONlist_callstackentry_peek(list)

Returns the last element in the list. Is equivalent to: list_callstackentry_get(list, list_callstackentry_size(list))

Return Value ::
Arguments:
INTENT(inout)
:: list ...

FUNCTIONlist_callstackentry_pop(list)

Returns the last element in the list and removes it. Is equivialent to: value = list_callstackentry_get(list, list_callstackentry_size(list)) call list_callstackentry_del(list, list_callstackentry_size(list))

Return Value ::
Arguments:
INTENT(inout)
:: list ...

SUBROUTINElist_callstackentry_push(list, value)

Appends the given value at the end of the list.

Arguments:
INTENT(inout)
:: list ...
INTENT(in)
:: value ...

SUBROUTINElist_callstackentry_set(list, value, pos)

Assings the given value to the given position in the list. Thereby, the former value at that position gets overwritten. If the position is out of bounds, the program stops.

Arguments:
INTENT(inout)
:: list ...
INTENT(in)
:: value ...
INTEGER,
INTENT(in)
:: pos Position in the list - musst fulfill 0 < pos < list_size+1.

FUNCTIONlist_callstackentry_size(list)

Returns the current size of the list.

Return Value ::
INTEGER
Arguments:
INTENT(in)
:: list ...

private Parameters/Types:

private Types:

TYPE :: private_item_p_type_callstackentry

...


POINTER :: p => NULL() ...

TYPE :: private_item_type_callstackentry

...


:: value ...