The MultiIndexTable stores an FTObject pointer associated
with any number of integer keys(:) as a hash table.
Usage
Definition (Subclass of FTObject)
TYPE(FTMultiIndexTable) :: multiIndexTable
Initialization
CALL MultiIndexTable % initWithSize(N)
The size, N = the maximum value of all of the keys.
Destruction
CALL release(MultiIndexTable) ... Pointers
call MultiIndexTable % destruct() ... non Pointers
Adding an object
CLASS(FTObject), POINTER :: obj
INTEGER, DIMENSION(dim) :: keys
CALL MultiIndexTable % addObjectForKeys(obj,keys)
Retrieving an object
CLASS(FTObject), POINTER :: obj
INTEGER, DIMENSION(dim) :: keys
obj => MultiIndexTable % objectForKeys(keys)
Be sure to retain the object if you want it to live
beyond the life of the table.
Testing the presence of keys
LOGICAL :: exists
exists = MultiIndexTable % containsKeys(keys)
Interfaces
-
Public, generic name: release(self)
Call release(self) on an object to release control
of an object. If its reference count is zero, then
it is deallocated.
Arguments
Derived Types
Components
Type |
Visibility | Attributes |
|
Name |
| Initial | |
class(FTLinkedList),
|
public, |
DIMENSION(:), ALLOCATABLE
|
:: |
table |
|
|
|
Type-Bound Procedures
procedure, public ::
init => initFTObject |
|
procedure, public ::
description => FTObjectDescription |
|
procedure, public ::
className |
|
procedure, public, non_overridable ::
copy => copyFTObject |
|
procedure, public, non_overridable ::
retain => retainFTObject |
|
procedure, public, non_overridable ::
isUnreferenced |
|
procedure, public, non_overridable ::
refCount |
|
procedure, public ::
initWithSize => initMultiIndexTableWithSize |
|
procedure, public ::
destruct => destructMultiIndexTable |
|
procedure, public ::
containsKeys => MultiIndexTableContainsKeys |
|
procedure, public ::
addObjectForKeys => addObjectToMultiIndexTableForKeys |
|
procedure, public ::
objectForKeys => objectInMultiIndexTableForKeys |
|
procedure, public ::
printDescription => printMultiIndexTableDescription |
|
procedure, public ::
MultiIndexTableSize |
|
Functions
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(FTMultiIndexTable)
|
|
|
|
:: |
self |
|
integer
|
|
|
|
:: |
keys(:) |
|
Return Value
class(FTObject), POINTER
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(FTMultiIndexTable)
|
|
|
|
:: |
self |
|
integer
|
|
|
|
:: |
keys(:) |
|
Return Value
logical
Arguments
Return Value
integer
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(FTObject),
|
|
|
POINTER
|
:: |
obj |
|
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
integer,
|
|
|
DIMENSION(:)
|
:: |
key1 |
|
integer,
|
|
|
DIMENSION(:)
|
:: |
key2 |
|
Return Value
logical
Subroutines
Public, generic name: release(self)
Read more…
Arguments
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
integer,
|
|
|
DIMENSION(:)
|
:: |
keys |
|
Arguments
Type |
Intent | Optional | Attributes |
|
Name |
|
class(FTMultiIndexTable)
|
|
|
|
:: |
self |
|
integer
|
|
|
|
:: |
iUnit |
|