collections 1.0.0
COLLECTIONS is a library providing a set of types supporting collections in Fortran.
|
Defines a generic, linked-list container. More...
Public Member Functions | |
procedure, public | count => ll_count |
Gets the number of items in the list. More... | |
procedure, public | move_to_first => ll_move_to_first |
Moves the current position in the list to the first item. More... | |
procedure, public | move_to_last => ll_move_to_last |
Moves the current position in the list to the last item. More... | |
procedure, public | next => ll_move_to_next |
Moves to the next item in the list. More... | |
procedure, public | previous => ll_move_to_previous |
Moves to the previous item in the list. More... | |
procedure, public | get => ll_get |
Gets the current item. More... | |
procedure, public | set => ll_set |
Replaces the current item in the list with the supplied item. More... | |
procedure, public | push => ll_push |
Pushes an item onto the end of the list. More... | |
procedure, public | pop => ll_pop |
Pops an item off the back of the list. More... | |
procedure, public | clear => ll_clear |
Clears the entire list. More... | |
final | ll_destroy |
Finalizer for the linked_list type responsible for clean-up duties when the list goes out of scope. More... | |
Defines a generic, linked-list container.
Definition at line 576 of file collections.f90.
procedure, public collections::linked_list::clear |
Clears the entire list.
[in,out] | this | The linked_list object. |
Definition at line 712 of file collections.f90.
procedure, public collections::linked_list::count |
Gets the number of items in the list.
[in] | this | The linked_list object. |
Definition at line 595 of file collections.f90.
procedure, public collections::linked_list::get |
Gets the current item.
[in] | this | The linked_list object. |
Definition at line 648 of file collections.f90.
|
final |
Finalizer for the linked_list type responsible for clean-up duties when the list goes out of scope.
Definition at line 715 of file collections.f90.
procedure, public collections::linked_list::move_to_first |
Moves the current position in the list to the first item.
[in,out] | this | The linked_list object. |
Definition at line 604 of file collections.f90.
procedure, public collections::linked_list::move_to_last |
Moves the current position in the list to the last item.
[in,out] | this | The linked_list object. |
Definition at line 613 of file collections.f90.
procedure, public collections::linked_list::next |
Moves to the next item in the list.
[in,out] | this | The linked_list object. |
Definition at line 625 of file collections.f90.
procedure, public collections::linked_list::pop |
Pops an item off the back of the list.
[in,out] | this | The linked_list object. |
Definition at line 703 of file collections.f90.
procedure, public collections::linked_list::previous |
Moves to the previous item in the list.
[in,out] | this | The linked_list object. |
Definition at line 637 of file collections.f90.
procedure, public collections::linked_list::push |
Pushes an item onto the end of the list.
[in,out] | this | The linked_list object. |
[in] | x | The object to store. |
[in] | manage | An optional input used to determine if the list should manage memory for this object. If set to true a clone of x is stored and the list will handle management of resources held by the clone. If false, the list will not manage resources held by x and x itself will be stored. Notice, in this manner it is possible for x to go out of scope while the list still persists thereby resulting in a potentially undefined behavior. It is recommended to use the default value of true except for very specific and well controlled edge cases. |
[in,out] | err | An optional output that can be used to track the error status of the routine. Possible error codes are as follows.
|
Definition at line 694 of file collections.f90.
procedure, public collections::linked_list::set |
Replaces the current item in the list with the supplied item.
[in,out] | this | The linked_list object. |
[in] | x | The object to store. |
[in] | manage | An optional input used to determine if the list should manage memory for this object. If set to true a clone of x is stored and the list will handle management of resources held by the clone. If false, the list will not manage resources held by x and x itself will be stored. Notice, in this manner it is possible for x to go out of scope while the list still persists thereby resulting in a potentially undefined behavior. It is recommended to use the default value of true except for very specific and well controlled edge cases. |
[in,out] | err | An optional output that can be used to track the error status of the routine. Possible error codes are as follows.
|
Definition at line 671 of file collections.f90.