PropertiesDoc.tioga
Copyright © 1986 by Xerox Corporation. All rights reserved.
Created by: Christian Jacobi, September 19, 1985 6:08:41 pm PDT
gbb May 17, 1986 5:25:11 pm PDT
Last Edited by: Jacobi June 13, 1986 10:33:40 am PDT
PROPERTIES
CEDAR 6.1 — FOR INTERNAL XEROX USE ONLY
Properties
Christian Jacobi
© Copyright 1985, 1986 Xerox Corporation. All rights reserved.
Abstract: Implements re-ordering property lists, similar to Atom. Its property lists use less memory. Consider using module PropertyLists instead.
Created by: Christian Jacobi
Maintained by: Christian Jacobi <Jacobi.pa>
Keywords: properties
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
This module is withdrawn for the benefit of module PropertyLists.
However, it is still usefull for clients which depend on reordering property lists.
Consider carefully whether reordering property lists is the right approach for your application, otherwise use PropertyLists.
Properties
Implements property list. Uses less memory than Atom's implementation. This module has no protection against concurrent calls of PutProp. Usage is either in sequential applications or with a higher level application monitor giving protection. Other modules must not modify any PropList; a modification of a PropList while Properties is inside its monitor lock can cause disaster.
PropList: TYPE = LIST OF KeyVal;
KeyVal: TYPE = RECORD [key, val: REF];
GetProp: PROC [propList: PropList, prop: REF] RETURNS [REF];
Fetches a value from a property list; NIL if not found
Reorders list partially; next GetProp of the same prop may be faster
PutProp: PROC [propList: PropList, prop: REF, val: REF ← NIL] RETURNS [PropList];
Puts a property key value pair on a property list; The property list must be written back.
A nil val value removes the property