Project

General

Profile

self_vector_ref Module

  • Uses:

  • self_object
module~~self_vector_ref~~UsesGraph module~self_vector_ref self_vector_ref self_object self_object self_object->module~self_vector_ref

Provides array-based, self-extending reference vectors of arbitrary type.

Used By

module~~self_vector_ref~~UsedByGraph module~self_vector_ref self_vector_ref module~self_vector self_vector module~self_vector_ref->module~self_vector

Variables

TypeVisibility AttributesNameInitial
integer, private, parameter:: vector_initial_size =20

Interfaces

private interface vector_ref

  • private function new_empty(verbose, initial_size) result(this)

    Arguments

    Type IntentOptional AttributesName
    logical, intent(in), optional :: verbose
    integer, intent(in), optional :: initial_size

    Return Value type(vector_ref)

  • private function new_from_array(items, verbose, initial_size) result(this)

    Arguments

    Type IntentOptional AttributesName
    class(*), intent(in), target:: items(:)
    logical, intent(in), optional :: verbose
    integer, intent(in), optional :: initial_size

    Return Value type(vector_ref)

    Description

    Create a vector from a pre-existing array


Derived Types

type, public, extends(object) :: vector_ref

Components

TypeVisibility AttributesNameInitial
integer, private :: current_size =0
integer, private :: maximum_size =0
logical, private :: verbose =.false.
type(vector_item), private, allocatable:: items(:)

Constructor

private function new_empty(verbose, initial_size)
private function new_from_array(items, verbose, initial_size)

Create a vector from a pre-existing array

Finalizations Procedures

final :: destroy

Type-Bound Procedures

procedure, public :: clone
procedure, public :: clear
procedure, public :: extend
procedure, public :: at
procedure, public :: find
procedure, public :: add_item
generic, public :: add => add_item
procedure, public :: add_array
procedure, public :: add_vector
procedure, public :: add_iter
generic, public :: add_list => add_array
generic, public :: add_list => add_vector
generic, public :: add_list => add_iter
procedure, public :: set_verbose
procedure, public :: get_verbose
procedure, public :: length
procedure, public :: capacity
procedure, public :: includes
procedure, public :: iter
procedure, public :: is_equal
procedure, public :: to_string

Description

Array-based, self-extending vector containing references to arbitrary data.

type, public :: vector_iterator

Components

TypeVisibility AttributesNameInitial
class(vector_ref), public, pointer:: my_vector=> null()
integer, private :: current =0

Type-Bound Procedures

procedure, public :: set_vector
procedure, public :: more
procedure, public :: next
procedure, public :: pos

type, private :: vector_item

Components

TypeVisibility AttributesNameInitial
class(*), public, pointer:: stuff=> null()

Functions

private function new_empty(verbose, initial_size) result(this)

Arguments

Type IntentOptional AttributesName
logical, intent(in), optional :: verbose
integer, intent(in), optional :: initial_size

Return Value type(vector_ref)

private function new_from_array(items, verbose, initial_size) result(this)

Arguments

Type IntentOptional AttributesName
class(*), intent(in), target:: items(:)
logical, intent(in), optional :: verbose
integer, intent(in), optional :: initial_size

Return Value type(vector_ref)

Description

Create a vector from a pre-existing array

private function at(this, idx)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this
integer, intent(in) :: idx

Return Value class(*), pointer

private function find(this, my_stuff, offset)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this
class(*), intent(in) :: my_stuff
integer, intent(in), optional :: offset

Return Value integer

private function get_verbose(this)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this

Return Value logical

private function length(this)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this

Return Value integer

private function capacity(this)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this

Return Value integer

private function includes(this, my_stuff)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this
class(*), intent(in) :: my_stuff

Return Value logical

private function iter(this)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this

Return Value type(vector_iterator)

private recursive function is_equal(this, that) result(equal)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this
class(*), intent(in) :: that

Return Value logical

private recursive function to_string(this)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this

Return Value character(len=:), allocatable

private function more(this)

Arguments

Type IntentOptional AttributesName
class(vector_iterator), intent(in) :: this

Return Value logical

private function next(this, item)

Arguments

Type IntentOptional AttributesName
class(vector_iterator), intent(inout) :: this
class(*), intent(out), pointer:: item

Return Value logical

private function pos(this)

Arguments

Type IntentOptional AttributesName
class(vector_iterator), intent(in) :: this

Return Value integer


Subroutines

private subroutine clone(this, copy)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(in) :: this
class(vector_ref), intent(inout) :: copy

private recursive subroutine destroy(this)

Arguments

Type IntentOptional AttributesName
type(vector_ref), intent(inout) :: this

private subroutine clear(this)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(inout) :: this

private subroutine extend(this)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(inout) :: this

private recursive subroutine add_item(this, new_stuff)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(inout) :: this
class(*), intent(in), target:: new_stuff

private subroutine add_array(this, items)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(inout) :: this
class(*), intent(in), target:: items(:)

private subroutine add_vector(this, that)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(inout) :: this
class(vector_ref), intent(in) :: that

private subroutine add_iter(this, iter)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(inout) :: this
class(vector_iterator) :: iter

private subroutine set(this, idx, my_stuff)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(inout) :: this
integer, intent(in) :: idx
class(*), intent(in), target:: my_stuff

private subroutine set_verbose(this, value)

Arguments

Type IntentOptional AttributesName
class(vector_ref), intent(inout) :: this
logical , optional :: value

private subroutine set_vector(this, my_vector)

Arguments

Type IntentOptional AttributesName
class(vector_iterator), intent(inout) :: this
type(vector_ref), intent(in), target:: my_vector


© 2016
self was developed by
Documentation generated by FORD