CDValue.mesa a ChipNDale module
Copyright © 1983, 1986 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, August 16, 1983 4:09 pm
Last edited by: Christian Jacobi, September 19, 1986 11:19:09 am PDT
CDValue: CEDAR DEFINITIONS =
BEGIN
Value storage for design, technology and global values.
Values are not saved on files.
RegisterKey:
PROC [key:
REF, boundTo:
CD.Technology ←
NIL, registrationKey:
REF ← NIL];
--Register key to be used with CDValue
--If boundTo=NIL enregister in all tables else in boundTo's(Technology) table.
--registrationKey#NIL allows re-registration of the same key if the previous registration
--used same registrationKey. Other re-registration raises CD.Error[doubleRegistration].
Propagation:
TYPE = {design, technology, global};
--on fetch: search starts at most local possible unit, if entry is not found,
--search proceeds until unit is more global then SearchType
--Store: says explicitely where to store
Fetch:
PROC [boundTo:
REF ←
NIL, key:
REF, propagation: Propagation ← design]
RETURNS [
REF];
--returns NIL if not found
--boundTo either design, technology or NIL (global table)
Store:
PROC [boundTo:
REF←
NIL, key:
REF, value:
REF];
--value=NIL means remove entry
--boundTo either design, technology or NIL (global table)
StoreConditional:
PROC [boundTo:
REF ←
NIL, key:
REF, value:
REF]
RETURNS [done:
BOOL];
--value=NIL means remove entry
--boundTo either design, technology or NIL (global table)
--stores new value (#NIL) only if no other value is stored.
FetchInt:
PROC [boundTo:
REF ←
NIL, key
: REF, propagation: Propagation ← design, ifNotFound:
INT ← 0]
RETURNS [
INT];
--boundTo either design, technology or NIL (global table)
--returns ifNotFound if not found
StoreInt:
PROC [boundTo:
REF ←
NIL, key:
REF, value:
INT];
--boundTo either design, technology or NIL (global table)
END.