FMUTIL  0.1
Fortran Miscellaneous UTILities
lists::list Type Reference

List type. More...

+ Collaboration diagram for lists::list:

Public Member Functions

procedure assignlist
 
generic, public assignment => assignlist
 Assignment operator for the List type, this enables copying of RHS List items to LHS List. Note that after this operation, LHS List will be an exact copy of the RHS List including data and internal state. More...
 
procedure create_newslots
 
procedure, public size => list_size
 Returns size of the List or number of items stored. More...
 
procedure, public pushback => push_back
 Push one item at the back of the List. More...
 
procedure, public popback => pop_back
 Pop one item from the back of the List. More...
 
procedure, public item => item_at
 Returns a pointer to the item with the given index (1-based) More...
 
procedure, public front => item_front
 Returns the item with the index-1. More...
 
procedure, public back => item_back
 Returns the item with the last index. More...
 
procedure, public insert => item_insert
 Inserts the item at the given index and relocate items at the later indices. More...
 
procedure, public erase => item_erase
 Delete the item at the given index and relocate the item at the later indices. More...
 
procedure, public shrinktofit
 Deallocate unused List slots. More...
 
procedure, public clear
 Clear the contents of the List but memory is not deallocated. More...
 
final destroy
 Frees up all the memory allocated. More...
 

Public Attributes

integer, public status = 0
 Status: 0-success, any negative value indicates exception condition. More...
 
integer usedslots = 0
 Number of slots that currently contain data. More...
 
integer allocatedslots = 0
 Number of slots that are currently allocated. More...
 
integer newslotstoallocate = DEFAULT_NEWSLOTSALLOCATED
 Number of new slots to create on List capacity increase. More...
 
type(listitem), dimension(:), allocatable listdata
 Array of List items. More...
 

Detailed Description

List type.

Definition at line 62 of file list.f90.

Member Function/Subroutine Documentation

◆ assignlist()

procedure lists::list::assignlist

Definition at line 85 of file list.f90.

◆ assignment()

generic, public lists::list::assignment

Assignment operator for the List type, this enables copying of RHS List items to LHS List. Note that after this operation, LHS List will be an exact copy of the RHS List including data and internal state.

Definition at line 91 of file list.f90.

References lists::assignlist().

+ Here is the call graph for this function:

◆ back()

procedure, public lists::list::back

Returns the item with the last index.

Definition at line 119 of file list.f90.

◆ clear()

procedure, public lists::list::clear

Clear the contents of the List but memory is not deallocated.

Definition at line 133 of file list.f90.

◆ create_newslots()

procedure lists::list::create_newslots

Definition at line 101 of file list.f90.

◆ destroy()

final lists::list::destroy
final

Frees up all the memory allocated.

Definition at line 136 of file list.f90.

References lists::destroy().

+ Here is the call graph for this function:

◆ erase()

procedure, public lists::list::erase

Delete the item at the given index and relocate the item at the later indices.

Definition at line 127 of file list.f90.

◆ front()

procedure, public lists::list::front

Returns the item with the index-1.

Definition at line 116 of file list.f90.

◆ insert()

procedure, public lists::list::insert

Inserts the item at the given index and relocate items at the later indices.

Definition at line 123 of file list.f90.

◆ item()

procedure, public lists::list::item

Returns a pointer to the item with the given index (1-based)

Definition at line 113 of file list.f90.

◆ popback()

procedure, public lists::list::popback

Pop one item from the back of the List.

Definition at line 110 of file list.f90.

◆ pushback()

procedure, public lists::list::pushback

Push one item at the back of the List.

Definition at line 107 of file list.f90.

◆ shrinktofit()

procedure, public lists::list::shrinktofit

Deallocate unused List slots.

Definition at line 130 of file list.f90.

◆ size()

procedure, public lists::list::size

Returns size of the List or number of items stored.

Definition at line 104 of file list.f90.

Member Data Documentation

◆ allocatedslots

integer lists::list::allocatedslots = 0

Number of slots that are currently allocated.

Definition at line 73 of file list.f90.

◆ listdata

type(listitem), dimension(:), allocatable lists::list::listdata

Array of List items.

Definition at line 79 of file list.f90.

◆ newslotstoallocate

integer lists::list::newslotstoallocate = DEFAULT_NEWSLOTSALLOCATED

Number of new slots to create on List capacity increase.

Definition at line 76 of file list.f90.

◆ status

integer, public lists::list::status = 0

Status: 0-success, any negative value indicates exception condition.

Definition at line 67 of file list.f90.

◆ usedslots

integer lists::list::usedslots = 0

Number of slots that currently contain data.

Definition at line 70 of file list.f90.


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