sortedtableextras/src/redblacktbl.tmpl


% Copyright (C) 1997 Digital Equipment Corporation.
% Distributed only by permission.
%
% Created on Tue Nov 18 17:45:11 PST 1997 by heydon
% Last modified on Wed Nov 19 11:52:24 PST 1997 by heydon

% Quake functions to instantiate generic red-black tables
% with domain interface "key" and range interface "value".
% The instantiation files are named "RedBlack<nm>Tbl.[im]3",
% where <nm> denotes the value of the "nm" parameter.

readonly proc _build_rbtbl(nm, key, value, vis) is
  local tbl = nm & "Tbl"
  local stbl = "Sorted" & tbl
  local rbtbl = "RedBlack" & tbl
  build_generic_intf (rbtbl, "RedBlackTbl", [key, value, stbl], vis)
  build_generic_impl (rbtbl, "RedBlackTbl", [key, value, tbl, stbl])
end

readonly proc redblack_table (nm, key, value) is
  _build_rbtbl(nm, key, value, HIDDEN)
end

readonly proc RedBlack_table (nm, key, value) is
  _build_rbtbl(nm, key, value, VISIBLE)
end