<> <> <> <<>> <> <<>> DIRECTORY ChoiceButtons USING [EnumTypeRef], Containers USING [Container], Icons USING [IconFlavor], IO USING [STREAM], Labels USING [Label], LoganBerryStub USING [Attribute, AttributeType, Entry, EntryProc, OpenDB], LoganBerryStubExtras USING [SchemaInfo], Menus USING [Menu], RefID USING [nullID], RefTab USING [Ref], Rope USING [ROPE], ViewerClasses USING [Viewer, ViewerFlavor]; LoganBerryBrowser: CEDAR DEFINITIONS ~ BEGIN <> <> <<>> <: In this case, since a pattern is not explicitly specified, the value is taken to be the exact value of the attribute. That is, a missing pattern defaults to "exact". The attribute value may be either a token or a rope literal. An explicit pattern type may be given in parenthesis immediately following the attribute type. Thus, an attribute pattern is given in the form (): Several of these may be concatenated together to get a list of attribute patterns. For example, Name: "Douglas B. Terry" Phone(prefix): 494-44 Office(wildcard): 35-2*>> AttributePattern: TYPE = REF AttributePatternRec; AttributePatternRec: TYPE = RECORD [ attr: LoganBerryStub.Attribute, ptype: Rope.ROPE _ NIL ]; AttributePatterns: TYPE = LIST OF AttributePattern; SyntaxError: ERROR [explanation: Rope.ROPE _ NIL]; QueryWarning: SIGNAL; <<>> ReadAttributePatterns: PROC [s: IO.STREAM] RETURNS [ap: AttributePatterns]; <> <<>> WriteAttributePatterns: PROC [s: IO.STREAM, ap: AttributePatterns] RETURNS []; <> <<>> PatternsToEntry: PROC [ap: AttributePatterns] RETURNS [entry: LoganBerryStub.Entry]; <> <<>> EntryToPatterns: PROC [entry: LoganBerryStub.Entry] RETURNS [ap: AttributePatterns]; <> <<>> FilteredQuery: PROC [db: LoganBerryStub.OpenDB, patterns: AttributePatterns, proc: LoganBerryStub.EntryProc, baseIndex: LoganBerryStub.AttributeType _ NIL, feedback: FeedbackProc _ NIL] RETURNS []; <> <<>> FeedbackProc: TYPE = PROC [category: ATOM, info: Rope.ROPE] RETURNS []; <> <> <> Tool: TYPE = REF ToolBody; ToolBody: TYPE = RECORD[ db: LoganBerryStub.OpenDB _ RefID.nullID, -- open database handle (*) dbInfo: LoganBerryStubExtras.SchemaInfo _ NIL, -- database schema (*) menu: Menus.Menu _ NIL, -- command menu (default is standard menu) innerFlavor: ViewerClasses.ViewerFlavor _ NIL, -- flavor for inner viewer inner: ViewerClasses.Viewer _ NIL, -- viewer for retrieved database entries (*) outer: Containers.Container _ NIL, -- main container (*) icon: Icons.IconFlavor _ unInit, -- icon used fields: LIST OF LoganBerryStub.AttributeType _ NIL, -- fields that should be present in the entry form (default is set of indexed attributes) entryform: RefTab.Ref _ NIL, -- set of "FormField"s (*) inputArea: ViewerClasses.Viewer _ NIL, -- area for type in (*) sortButton: ChoiceButtons.EnumTypeRef _ NIL, -- order of retrieval (*) queryFeedback: Labels.Label _ NIL, -- area for feedback about query processing (*) details: Containers.Container _ NIL, -- container for choice buttons (*) historyData: REF ANY _ NIL, -- log of executed queries (*) history: ViewerClasses.Viewer _ NIL, -- viewer for history data (*) height: CARDINAL _ 0, -- current height of tool (excluding inner viewer) (*) process: PROCESS _ NIL, -- process currently executing a query clientData: REF _ NIL -- client-specific data ]; <> CreateTool: PROC [db: LoganBerryStub.OpenDB, tool: Tool] RETURNS []; <> <<>> <> ReadEntryForm: PROC [tool: Tool] RETURNS [form: AttributePatterns, orderBy: LoganBerryStub.AttributeType]; <> PrintEntry: PROC [entry: LoganBerryStub.Entry, tool: Tool]; <> <<>> ReportFeedback: PROC [category: ATOM, info: Rope.ROPE, tool: Tool] RETURNS []; <> END. <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<>>