<> <> <> <> DIRECTORY CD, CDGenerate, Rope, SymTab; CDGenerateBackdoor: CEDAR DEFINITIONS = BEGIN <> Context: TYPE = CDGenerate.Context; IGeneratorProc: TYPE = PROC [design: CD.Design, key: Rope.ROPE, passContext, realContext: Context] RETURNS [ob: CD.Object_NIL]; SelectorProc: TYPE = PROC [context: Context, label: Rope.ROPE] RETURNS [key: Rope.ROPE_NIL]; CreateIndirect: PROC [onTopOf: Context, iGenerator: IGeneratorProc, selector: SelectorProc _ NIL, cache: BOOL _ TRUE, flushThrough: BOOL _ TRUE, clearThrough: BOOL _ TRUE, registerThrough: BOOL _ TRUE] RETURNS [context: Context]; <<--calls to context will be indirected to calls of iGenerator.>> <<--iGenerator will get onTopOf as realContext field, so it can call again using FetchIndirect...>> <<--set selector to CDGenerate.SelectOneOf if selector should propagate indirectly to onTopOf >> Indiretee: PROC [context: Context] RETURNS [Context]; <<--NIL if not indirect>> FetchIndirect: PROC [passContext, realContext: Context, design: CD.Design, key: Rope.ROPE, cache: BOOL _ FALSE] RETURNS [ob: CD.Object]; <<--Like FetchNCall except: >> <<--passContext: will be passed trough as parameter to generator only >> <<--realContext: context to be really called. >> <<--To be called from indirection generators>> publicContexts: SymTab.Ref; <<--space for contexts to be returned or created using AssertContext>> END.