<> <> <> <> DIRECTORY CD; CDValue: CEDAR DEFINITIONS = BEGIN <> <> 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.