## hash-xid.api
#
# A hashtable package for hashing on xids,
# which are by definition unique.
# Compiled by:
#
src/lib/x-kit/xclient/xclient-internals.sublib# This api is implemented in:
#
#
src/lib/x-kit/xclient/src/stuff/hash-xid.pkgstipulate
package xt = xtypes; # xtypes is from
src/lib/x-kit/xclient/src/wire/xtypes.pkgherein
api Hash_Xid {
#
Xid_Map(X);
make_map: Void -> Xid_Map(X); # Create a new table.
set: Xid_Map(X) -> (xt::Xid, X) -> Void; # Insert an item.
get: Xid_Map(X) -> xt::Xid -> X; # Find an item, the exception lib_base::NOT_FOUND is raised if the item doesn't exist.
get_and_drop: Xid_Map(X) -> xt::Xid -> Null_Or(X); # Remove a value by key, return (THE value) if key is found, else NULL.
drop: Xid_Map(X) -> xt::Xid -> Void; # Remove a value by key. This is a no-op if the key is not found.
keyvals_list: Xid_Map(X) -> List( (xt::Xid, X) ); # Return a list of the (key,val) pairs in the table.
};
end;
## COPYRIGHT (c) 1990, 1991 by John H. Reppy. See SMLNJ-COPYRIGHT file for details.
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.