Octopus
linked_list_oct_m::linked_list_t Type Reference

This class implements a linked list of unlimited polymorphic values. More...

Detailed Description

This class implements a linked list of unlimited polymorphic values.

This allows the storage of any type of data. Iterating over the list is done using the associated iterator.

Note
This class and the corresponding iterator (linked_list_iterator_t) are not meant to used as is, but rather to be extended and by providing an add method to the list and a get_next method to the iterator.

Definition at line 132 of file linked_list.F90.

Inheritance diagram for linked_list_oct_m::linked_list_t:
Inheritance graph

Public Attributes

integer, public size = 0
 

Private Member Functions

procedure add_node => linked_list_add_node
 add a node to the linked list More...
 
procedure add_ptr => linked_list_add_node_ptr
 add data by pointer to the list More...
 
procedure add_copy => linked_list_add_node_copy
 add data by copying to the list More...
 
procedure delete => linked_list_delete_node
 delete a node from the list More...
 
procedure has => linked_list_has
 
procedure copy => linked_list_copy
 
generic assignment => copy
 
procedure empty => linked_list_empty
 
final linked_list_finalize
 

Private Attributes

class(list_node_t), pointer first_node => null()
 
class(list_node_t), pointer last_node => null()
 

Member Function/Subroutine Documentation

◆ add_node()

procedure linked_list_oct_m::linked_list_t::add_node
private

add a node to the linked list

Parameters
[in,out]thisthe linked list
valuedata to be added
[in]cloneflag whether to clone, or keep a pointer

Definition at line 138 of file linked_list.F90.

◆ add_ptr()

procedure linked_list_oct_m::linked_list_t::add_ptr
private

add data by pointer to the list

Parameters
[in,out]thisthe linked list
valuepointer to the data

Definition at line 139 of file linked_list.F90.

◆ add_copy()

procedure linked_list_oct_m::linked_list_t::add_copy
private

add data by copying to the list

Parameters
[in,out]thisthe linked list
valuedata to be added

Definition at line 140 of file linked_list.F90.

◆ delete()

procedure linked_list_oct_m::linked_list_t::delete
private

delete a node from the list

Parameters
[in,out]thisthe list
valuethe data to delete

Definition at line 141 of file linked_list.F90.

◆ has()

procedure linked_list_oct_m::linked_list_t::has
private

Definition at line 142 of file linked_list.F90.

◆ copy()

procedure linked_list_oct_m::linked_list_t::copy
private

Definition at line 143 of file linked_list.F90.

◆ assignment()

generic linked_list_oct_m::linked_list_t::assignment
private

Definition at line 144 of file linked_list.F90.

◆ empty()

procedure linked_list_oct_m::linked_list_t::empty
private

Definition at line 145 of file linked_list.F90.

◆ linked_list_finalize()

final linked_list_oct_m::linked_list_t::linked_list_finalize
finalprivate

Definition at line 146 of file linked_list.F90.

Member Data Documentation

◆ size

integer, public linked_list_oct_m::linked_list_t::size = 0

Definition at line 134 of file linked_list.F90.

◆ first_node

class(list_node_t), pointer linked_list_oct_m::linked_list_t::first_node => null()
private

Definition at line 135 of file linked_list.F90.

◆ last_node

class(list_node_t), pointer linked_list_oct_m::linked_list_t::last_node => null()
private

Definition at line 136 of file linked_list.F90.


The documentation for this type was generated from the following file: