DIRECTORY LoganBerry; LoganBerryClass: CEDAR DEFINITIONS ~ BEGIN OPEN LoganBerry; OpenProc: TYPE ~ PROC [conv: Conv, dbName: ROPE] RETURNS [db: OpenDB]; DescribeProc: TYPE ~ PROC [conv: Conv, db: OpenDB] RETURNS [info: SchemaInfo]; ReadEntryProc: TYPE ~ PROC [conv: Conv, db: OpenDB, key: AttributeType, value: AttributeValue] RETURNS [entry: Entry, others: BOOLEAN]; EnumerateEntriesProc: TYPE ~ PROC [db: OpenDB, key: AttributeType, start: AttributeValue, end: AttributeValue, proc: EntryProc] RETURNS []; GenerateEntriesProc: TYPE ~ PROC [conv: Conv, db: OpenDB, key: AttributeType, start: AttributeValue, end: AttributeValue] RETURNS [cursor: Cursor]; NextEntryProc: TYPE ~ PROC [conv: Conv, cursor: Cursor, dir: CursorDirection] RETURNS [entry: Entry]; EndGenerateProc: TYPE ~ PROC [conv: Conv, cursor: Cursor] RETURNS []; WriteEntryProc: TYPE ~ PROC [conv: Conv, db: OpenDB, entry: Entry, log: LogID, replace: BOOLEAN] RETURNS []; DeleteEntryProc: TYPE ~ PROC [conv: Conv, db: OpenDB, key: AttributeType, value: AttributeValue] RETURNS [deleted: Entry]; CloseProc: TYPE ~ PROC [conv: Conv, db: OpenDB] RETURNS []; BuildIndicesProc: TYPE ~ PROC [conv: Conv, db: OpenDB] RETURNS []; CompactLogsProc: TYPE ~ PROC [conv: Conv, db: OpenDB] RETURNS []; RegisterWriteProcProc: TYPE ~ PROC [proc: WriteProc, db: OpenDB, ident: ATOM, clientData: REF] RETURNS []; UnregisterWriteProcProc: TYPE ~ PROC [db: OpenDB, ident: ATOM] RETURNS []; IsLocalProc: TYPE ~ PROC [db: OpenDB] RETURNS [local: BOOL]; StartTransactionProc: TYPE ~ PROC [db: OpenDB, wantAtomic: BOOLEAN ¬ FALSE]; EndTransactionProc: TYPE ~ PROC [db: OpenDB, commit: BOOLEAN ¬ TRUE] RETURNS [committed: BOOLEAN]; FlushDBCacheProc: TYPE ~ PROC [db: OpenDB ¬ nullDB]; Class: TYPE ~ REF ClassObject; ClassObject: TYPE ~ RECORD [ name: ATOM ¬ NIL, open: OpenProc ¬ NIL, describe: DescribeProc ¬ NIL, readEntry: ReadEntryProc ¬ NIL, enumerateEntries: EnumerateEntriesProc ¬ NIL, generateEntries: GenerateEntriesProc ¬ NIL, nextEntry: NextEntryProc ¬ NIL, endGenerate: EndGenerateProc ¬ NIL, writeEntry: WriteEntryProc ¬ NIL, deleteEntry: DeleteEntryProc ¬ NIL, close: CloseProc ¬ NIL, buildIndices: BuildIndicesProc ¬ NIL, compactLogs: CompactLogsProc ¬ NIL, isLocal: IsLocalProc ¬ NIL, startTransaction: StartTransactionProc ¬ NIL, endTransaction: EndTransactionProc ¬ NIL, flushDBCache: FlushDBCacheProc ¬ NIL, classData: REF ¬ NIL ]; Register: PROC [name: ATOM, class: Class, tryLast: BOOLEAN ¬ FALSE] RETURNS []; Lookup: PROC [name: ATOM] RETURNS [class: Class]; List: PROC [] RETURNS [classes: LIST OF Class]; GetDBSpecifics: PROC [db: LoganBerry.OpenDB] RETURNS [class: ATOM, dbhandle: LoganBerry.OpenDB]; END. τ LoganBerryClass.mesa Copyright Σ 1989, 1992 by Xerox Corporation. All rights reserved. Doug Terry, October 24, 1990 12:29 pm PDT Willie-s, April 23, 1992 3:06 pm PDT Mechanisms for registering new LoganBerry classes. A LoganBerry class is a collection of routines that implement the LoganBerry interface. In addition to the standard LoganBerry implementation, examples of LoganBerry classes include stubs for performing RPC calls to remote LoganBerry servers and "veneers" that enable other databases, such as Cypress, to be accessed as LoganBerry databases. A specific class is bound to a database handle during the Open call. On Open, each registered LoganBerry class is given the opportunity to Open the named database. The first class that returns a non-null open database handle is used for subsequent calls on that handle. Thus, the Open routine for each class should first check that the named database is one that is managed by the particular class. Methods See LoganBerry.mesa for a description of the various LoganBerry operations. Record for class-specific methods and state. Registration Registers the given LoganBerry class with the given name. Any class already registered with the name is replaced. class=NIL unregisters the named class. If tryLast=TRUE then this class is given the last opportunity to open a named database (this is intended for use by the main LoganBerry implementation); otherwise, newly registered classes are placed at the front of the line. Returns the named class or NIL if a class is not registered under the given name. Returns a list of all currently registered classes. Advanced operations Returns the name of the class that implements operations on the specified database and the class-specific database handle. Κ•NewlineDelimiter –(cedarcode) style™code•Mark outsideHeaderšœ™Kšœ Οeœ7™BKšœ)™)K™$K™K™K™—šΟk ˜ K˜ —K˜KšΠblœžœž ˜"Kšœž˜˜Kšžœ ˜—head™K™KK˜Kš œ žœžœžœžœ˜FK˜Kšœžœžœžœ˜NK˜Kš œžœžœEžœžœ˜‡K˜Kšœžœžœ_žœ˜‹K˜KšœžœžœZžœ˜“K˜Kšœžœžœ4žœ˜eK˜Kšœžœžœžœ˜EK˜Kš œžœžœ=žœžœ˜lK˜KšœžœžœEžœ˜zK˜Kšœ žœžœžœ˜;K˜Kšœžœžœžœ˜BK˜Kšœžœžœžœ˜AK˜Kš œžœžœ&žœžœžœ˜jK˜Kš œžœžœžœžœ˜JK˜Kš œ žœžœžœ žœ˜