-- File DBStorageField.mesa
-- Last edited by MBrown on June 10, 1980  3:36 PM


  DIRECTORY
    DBStorage USING[FieldHandle],
    DBStorageConcrete USING[FieldType],
    DBStorageTID USING[TID];

DBStorageField: DEFINITIONS = BEGIN
  -- This interface defines a collection of operations on DBStorage.FieldObjects that
  --may be used by storage-level modules that don't export DBStorage.FieldObject.


  CopyFieldObject: PROC[fh: DBStorage.FieldHandle] RETURNS[DBStorage.FieldHandle];
    -- Copies the field object pointed to by fh, and returns a field handle for the copy.

  FreeFieldObject: PROC[fh: DBStorage.FieldHandle];
    -- Frees the storage occupied by the field object pointed to by fh; fh becomes "dangling".

  TuplesetFieldHandle: PROC[] RETURNS[DBStorage.FieldHandle];
    -- Returns a field handle that may be used to access the tupleset object of a tuple.
    --The caller MUST NOT attempt to deallocate the handle!

  IndexFieldHandle: PROC[] RETURNS[DBStorage.FieldHandle];
    -- Returns a field handle that may be used to access the index object of a tuple.
    --The caller MUST NOT attempt to deallocate the handle!

  CheckFieldHandleType: PROC[fh: DBStorage.FieldHandle, t: DBStorageConcrete.FieldType];
    -- Generates an ERROR if fh's fieldType is not t.

  FieldOffset: PROC[fh: DBStorage.FieldHandle] RETURNS[CARDINAL];

  NWordsInField: PROC[fh: DBStorage.FieldHandle] RETURNS[CARDINAL];

  GroupIDOfField: PROC[fh: DBStorage.FieldHandle] RETURNS[DBStorageTID.TID];

END.--DBStorageField


CHANGE LOG

Created by MBrown on June 8, 1980  10:34 PM
-- Moved all field handle definitions here from DBStoragePrivateA.  This seems to be the cheapest
--available experiment with exported types and machine-dependent enmumerations, since the field handle
--stuff is well localized in the implementation.  Moved CopyFieldObject here from StorageImplB.
--Added FreeFieldObject.  (This "cheap" experiment involves changes to 7 modules!)

Changed by MBrown on June 10, 1980  3:35 PM
-- Moved all type definitions to DBStorageConcreteField.