<<>> <> <> <> <<>> DIRECTORY Rope; PropRegistry: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; Doc: TYPE = REF; Key: TYPE = ATOM; Target: TYPE = RECORD [v: Doc, targetData: REF]; -- class specific targetData RegistryClass: TYPE = REF RegistryClassObj; RegistryClassObj: TYPE = RECORD [ name: ATOM, getProp: PropGetProc, setProp: PropSetProc, remProp: PropRemProc, listProps: PropListProc, getTarget: GetTargetProc, setTarget: SetTargetProc, validTarget: ValidateTargetProc ]; PropGetProc: TYPE = PROC [key: Key, doc: Doc, hint: REF] RETURNS [prop, error: ROPE]; <> <<>> PropSetProc: TYPE = PROC [key: Key, doc: Doc, hint: REF, prop: ROPE, edited: BOOL]; <> PropRemProc: TYPE = PROC [key: Key, doc: Doc, hint: REF, edited: BOOL]; <> PropListProc: TYPE = PROC [doc: Doc, hint: REF] RETURNS [props: LIST OF Key]; <> <<>> GetTargetProc: TYPE = PROC [doc: Doc, hint: REF] RETURNS [success: BOOL, t: Target]; <> <<>> SetTargetProc: TYPE = PROC [doc: Doc, hint: REF, t: Target] RETURNS [success: BOOL, error: ROPE]; <> <<>> ValidateTargetProc: TYPE = PROC [doc: Doc, hint: REF, t: Target] RETURNS [success: BOOL, error: ROPE]; <> <<>> Register: PROC [class: RegistryClass]; <> <<>> GetRegistered: PROC [name: ATOM] RETURNS [class: RegistryClass]; <> END.