DIRECTORY TiogaNode, NameSymbolTable, Rope; NodeProps: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; true, false: REF BOOL; PutProp: PROCEDURE [n: TiogaNode.Ref, name: ATOM, value: REF]; GetProp: PROCEDURE [n: TiogaNode.Ref, name: ATOM] RETURNS [REF]; RemProps: PROCEDURE [n: TiogaNode.Ref]; -- remove all properties RemProp: PROCEDURE [n: TiogaNode.Ref, name: ATOM]; MapProps: PROC [ n: TiogaNode.Ref, action: MapPropsAction, formatFlag, 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, specsRope: ROPE, start, len: INT, n: TiogaNode.Ref] RETURNS [value: REF]; WriteSpecsProc: TYPE = PROC [ name: ATOM, value: REF, n: TiogaNode.Ref] RETURNS [specs: ROPE]; CopyInfoProc: TYPE = PROC [ name: ATOM, value: REF, from, to: TiogaNode.Ref] RETURNS [new: REF]; NullRead: ReadSpecsProc; -- returns NIL always NullWrite: WriteSpecsProc; -- returns NIL always NullCopy: CopyInfoProc; -- returns NIL always DoSpecs: ReadSpecsProc; HasWriter: PROC [name: ATOM] RETURNS [BOOL]; --returns true if there is a non-null writer GetSpecs: WriteSpecsProc; CopyInfo: CopyInfoProc; Object: TYPE = NameSymbolTable.Object; GetPrefixObject: PROC [n: TiogaNode.Ref] RETURNS [ob: Object]; PrefixName: PROC RETURNS [ROPE]; PrefixAtom: PROC RETURNS [ATOM]; GetPostfixObject: PROCEDURE [n: TiogaNode.Ref] RETURNS [ob: Object]; PostfixName: PROC RETURNS [ROPE]; PostfixAtom: PROC RETURNS [ATOM]; END. tNodeProps.Mesa; written by Paxton. January 1981 edited by McGregor. February 24, 1983 3:21 pm edited by Paxton. August 26, 1983 9:28 am ***** general access routines 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 formatFlag 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 start and len indicate where in the specsRope the information is actually stored. These parameters are included so that the file reader doesn't have to create a rope substring just to pass the specs to the get proc. 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 Κš˜Jšœ0™0Jšœ-™-Jšœ)™)J˜šΟk ˜ J˜ J˜J˜—J˜Jšœ œ˜J˜Jš˜J™šœ™J˜Jšœœœ˜J˜Jšœ œœ˜J˜šΟnœ œœ œ˜>JšœΛ™ΛJ˜—š žœ œœœœ˜@J˜—Jšžœ œΟc˜@J˜šžœ œœ˜2J˜—šžœœ˜JšœCœœ˜RJšœœ˜Jšœ7™7Jšœ+™+šœE™EJšœ1™1—Jšžœœœœ œœœ˜GJ˜——šœ™J˜šžœœœ˜J˜J˜J˜Jšœ,™,Jšœ7™7J˜—šž œœœ˜Jš œœ œœœ œ˜UIproc™Ψ—J˜šžœœœ˜Jš œœ œœ œ˜@—J˜šž œœœ˜Jš œœ œœœ˜D—J˜JšœŸ˜.J˜JšœŸ˜0J˜JšœŸ˜-J˜˜Jšœ™Jšœ2™2Jšœ(™(J˜—Jš ž œœœœœŸ,˜YJ˜˜Jšœ™Jšœ2™2JšœH™HJ˜—J˜Jšœ™Jšœ2™2Jšœ-™-J˜J˜—šœ-™-J˜Jšœœ˜&J˜šžœ˜Jšœœ˜(J˜—šž œœœœ˜ Jšœ™J˜—šž œœœœ˜ Jšœ)™)J˜—šžœ ˜Jšœœ˜(J˜—šž œœœœ˜!Jšœ ™ J˜—Jšž œœœœ˜!Jšœ'™'J˜—Jšœ˜J˜—…—R`