Module gt_vartable

module gt_vartable

        ! Uses
    use dc_types, only: STRING

        ! Types
    private type VAR_TABLE_ENTRY

        ! Variables
    integer, public, parameter :: vid_invalid = -1
    integer, public, parameter :: VTB_CLASS_UNUSED = 0
    integer, public, parameter :: VTB_CLASS_MEMORY = 1
    integer, public, parameter :: VTB_CLASS_NETCDF = 2
    integer, public, parameter :: CLASSES_MAX = 2
    type (VAR_TABLE_ENTRY), private, save, allocatable, dimension (:) :: table
    integer, private, parameter :: table_ini_size = 16

        ! Subroutines and functions
    public subroutine vartable_dump (vid)
    private subroutine entry_cleanup (vtb_entry)
    public subroutine VarTableAdd (vid, class, cid)
    public subroutine VarTableDelete (vid, action, err)
    public subroutine VarTableLookup (vid, class, cid)
    public subroutine VarTableMore (vid, err)

end module gt_vartable

Description of Types

VAR_TABLE_ENTRY

private type VAR_TABLE_ENTRY
    integer :: class
    integer :: cid
    integer :: refcount
end type VAR_TABLE_ENTRY

Description of Variables

vid_invalid

integer, public, parameter :: vid_invalid = -1

VTB_CLASS_UNUSED

integer, public, parameter :: VTB_CLASS_UNUSED = 0

VTB_CLASS_MEMORY

integer, public, parameter :: VTB_CLASS_MEMORY = 1

VTB_CLASS_NETCDF

integer, public, parameter :: VTB_CLASS_NETCDF = 2

CLASSES_MAX

integer, public, parameter :: CLASSES_MAX = 2

table

type (VAR_TABLE_ENTRY), private, save, allocatable, dimension (:) :: table

table_ini_size

integer, private, parameter :: table_ini_size = 16

Description of Subroutines and Functions

vartable_dump

public subroutine vartable_dump (vid)
    integer, intent(in) :: vid
    ! Calls: DbgMessage
end subroutine vartable_dump

entry_cleanup

private subroutine entry_cleanup (vtb_entry)
    type (VAR_TABLE_ENTRY), intent(out), dimension (:) :: vtb_entry
end subroutine entry_cleanup

VarTableAdd

public subroutine VarTableAdd (vid, class, cid)
    integer, intent(out) :: vid
    integer, intent(in) :: class
    integer, intent(in) :: cid
    ! Calls: DbgMessage, entry_cleanup
end subroutine VarTableAdd

VarTableDelete

public subroutine VarTableDelete (vid, action, err)
    integer, intent(in) :: vid
    logical, intent(out) :: action
    logical, optional, intent(out) :: err
end subroutine VarTableDelete

VarTableLookup

public subroutine VarTableLookup (vid, class, cid)
    integer, intent(in) :: vid
    integer, optional, intent(out) :: class
    integer, optional, intent(out) :: cid
end subroutine VarTableLookup

VarTableMore

public subroutine VarTableMore (vid, err)
    integer, intent(in) :: vid
    logical, optional, intent(out) :: err
end subroutine VarTableMore