type_unidic Module

(in libkernel) the module to return a unidic positive int for each string



Contents


Derived Types

type, public :: unidic

the class to hold key-index pairs, keys are strings, indices are unique ints

Finalizations Procedures

final :: clean_dic

clean the object to avoid memory leak

Type-Bound Procedures

procedure, public :: num

the number of items in a unidic

procedure, public :: add

add a key to a unidic, return its index

procedure, public :: del

delete a key in a unidic, return its index

procedure, public :: val

find a key in a unidic, return its index

procedure, public :: show

show a unidic

procedure, public :: rename

rename a key in a unidic

procedure, public :: clean

clean a unidic

procedure, public :: print

print a unidic to a file

procedure, public :: read

read a unidic from a file

procedure, public :: iterate

iterate a unidic. Use it in this way: do while(U%iterate(key,val))

generic, public :: assignment(=) => copy

assignment of a unidic