home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
RefDict.4gh
< prev
next >
Wrap
Text File
|
1996-07-02
|
1KB
|
43 lines
-----------------------------------------------------------------------------
--
-- (c) Westmount Technology 1994
--
-- File: @(#)RefDict.4gh 1.1
-- Author:
-- Description: A simple RefDict (map of key-value pairs)
-- Both key and value are ixObject references
--
-----------------------------------------------------------------------------
INCLUDE "ORefSet.4gh"
CLASS DictSlot
PRIVATE VARIABLE key, value ixObject
FUNCTION DictSlot(aKey ixObject, aValue ixObject)
FUNCTION isEqualTo(other ixObject) RETURNING BOOLEAN
FUNCTION getKey() RETURNING ixObject
FUNCTION getValue() RETURNING ixObject
FUNCTION setValue(newValue ixObject) RETURNING VOID
END CLASS
CLASS RefDict
PRIVATE VARIABLE s ORefSet
FUNCTION RefDict()
FUNCTION find(key ixObject) RETURNING DictSlot
FUNCTION set(key ixObject, value ixObject) RETURNING VOID
FUNCTION get(key ixObject) RETURNING ixObject
FUNCTION remove(key ixObject) RETURNING VOID
FUNCTION isPresent(key ixObject) RETURNING BOOLEAN
FUNCTION size() RETURNING INTEGER
FUNCTION firstKey() RETURNING ixObject
FUNCTION nextKey() RETURNING ixObject
FUNCTION firstValue() RETURNING ixObject
FUNCTION nextValue() RETURNING ixObject
END CLASS