DIRECTORY TextNode, PGSupport, NameSymbolTable, Rope; NodeProps: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; true, false: REF BOOLEAN; PutProp: PROCEDURE [n: TextNode.Ref, name: ATOM, value: REF]; GetProp: PROCEDURE [n: TextNode.Ref, name: ATOM] RETURNS [REF]; RemProp: PROCEDURE [n: TextNode.Ref, name: ATOM]; MapProps: PROC [n: TextNode.Ref, action: MapPropsAction, typeFlag, commentFlag: BOOLEAN _ TRUE] RETURNS [BOOLEAN]; MapPropsAction: TYPE = PROC [name: ATOM, value: REF] RETURNS [BOOLEAN]; Register: PROC [name: ATOM, reader: ReadSpecsProc, writer: WriteSpecsProc, copier: CopyInfoProc]; ReadSpecsProc: TYPE = PROC [name: ATOM, specs: ROPE] RETURNS [value: REF]; WriteSpecsProc: TYPE = PROC [name: ATOM, value: REF] RETURNS [specs: ROPE]; CopyInfoProc: TYPE = PROC [name: ATOM, value: REF] RETURNS [new: REF]; NullRead: ReadSpecsProc; -- returns NIL always NullWrite: WriteSpecsProc; -- returns NIL always NullCopy: CopyInfoProc; -- returns NIL always DoSpecs: ReadSpecsProc; GetSpecs: WriteSpecsProc; CopyInfo: CopyInfoProc; Object: TYPE = NameSymbolTable.Object; GetPrefixObject: PROC [n: TextNode.Ref] RETURNS [ob: Object]; PrefixName: PROC RETURNS [ROPE]; PrefixAtom: PROC RETURNS [ATOM]; GetPostfixObject: PROCEDURE [n: TextNode.Ref] RETURNS [ob: Object]; PostfixName: PROC RETURNS [ROPE]; PostfixAtom: PROC RETURNS [ATOM]; StartNodeProps: PROC; -- for initialization only END. ´-- NodeProps.Mesa -- written by Paxton. January 1981 -- last written by Paxton. December 28, 1982 11:11 am NIL is a valid value. Use RemProp to remove property. (Although GetProp will not distinguish between property value NIL and no property present, it is useful to be able to have NIL values to avoid creating garbage. Setting to NIL doesn't release the property record, so don't need to reallocate when next set to a non-NIL value. -- apply the action to each name & value pair for the node -- returns true if&when an action returns true -- if commentFlag is false, skips Comment property; ditto for typeFlag -- hack to accelerate Inherit and PutFile operations -- ***** read, write, copy props -- registers these procs for this property name -- they will be called by DoSpecs, GetSpecs, and CopyInfo -- used when reading files -- calls the registered reader for this property name -- returns specs if no reader is registered -- used when writing files -- calls the registered writer for this property name -- if no writer is registered, returns value if it is a rope, NIL otherwise -- used when copying nodes -- calls the registered copier for this property name -- if no copier is registered, returns old value -- ***** special procs for internal use by Tioga -- the name of the prefix property -- the atom used as name for prefix property -- the name of the postfix property -- the atom used as name for postfix prop -- ***** Initialization ĘQ˜JšĎc™Jš#™#Jš5™5J˜JšĎk ˜ J˜ J˜ J˜J˜J˜Jšœ žœ˜J˜Jšž˜J˜Jšžœžœžœ˜J˜Jšœ žœžœ˜J˜šĎnœž œžœ žœ˜=JšœË™ËJ˜—š Ÿœž œžœžœžœ˜?J˜—šŸœž œžœ˜1J˜—šŸœžœBžœžœ˜_Jšžœžœ˜Jš:™:Jš.™.šF™FJš4™4—JšŸœžœžœžœ žœžœžœ˜GJ˜—Jš ™ J˜šŸœžœžœ˜J˜J˜J˜Jš/™/Jš:™:J˜—JšŸ œžœžœžœ žœžœ žœ˜JJ˜JšŸœžœžœžœ žœžœ žœ˜KJ˜JšŸ œžœžœžœ žœžœžœ˜FJ˜Jšœ˜.J˜Jšœ˜0J˜Jšœ˜-J˜˜Jš™Jš5™5Jš+™+J˜—˜Jš™Jš5™5JšK™KJ˜—˜Jš™Jš5™5Jš0™0J˜J˜—Jš0™0J˜Jšœžœ˜&J˜šŸœž˜Jšœžœ˜'J˜—šŸ œžœžœžœ˜ Jš"™"J˜—šŸ œžœžœžœ˜ Jš,™,J˜—šŸœž ˜Jšœžœ˜'J˜—šŸ œžœžœžœ˜!Jš#™#J˜—šŸ œžœžœžœ˜!Jš*™*J˜—Jš™J˜JšŸœžœ˜0J˜Jšžœ˜J˜—…—˜