-- File WalnutDBAccess.mesa
-- Contents:
-- (private) access to Walnut's database & log
-- Created by: Willie-Sue November 3, 1982
-- Last edited by:
-- Rick on XXX
-- Willie-Sue on March 4, 1983 1:57 pm
DIRECTORY
DB,
WalnutDB;
WalnutDBAccess: CEDAR DEFINITIONS
IMPORTS DB, WalnutDB =
BEGIN OPEN WalnutDB;
WalnutUpdateInfo: TYPE = REF WalnutUpdateObject;
WalnutUpdateObject: TYPE = RECORD[msg: Msg, msgSet: MsgSet];
DoInitializeDBVars: PROC;
DoMsgRecToMsg: PROC[mr: MsgRec] RETURNS[msg: Msg, existed: BOOL];
DoDeclareMsg: PROC[mName: ROPE] RETURNS [msg: Msg, existed: BOOL];
DoDeclareMsgSet: PROC[mName: ROPE] RETURNS [msgSet: MsgSet, existed: BOOL];
DoEraseP: PROC[m: Msg, prop: Attribute, v: Entity];
-- DoErasePList: PROC[m: Msg, first: Attribute];
-- DoResetP: PROC[m: Msg, first: Attribute, prop: Attribute, v: Value] RETURNS [rel: Relship];
DoNameToEntity: PROC[d: Domain, name: ROPE, oldOnly: BOOL] RETURNS[e: Entity];
DoGetEntitiesInDomain: PROC[d: Domain, alphaOrder: BOOL] RETURNS[eL: LIST OF Entity];
DoNumInMsgSet: PROC[msgSet: MsgSet] RETURNS[num: INT] = INLINE
{RETURN[DB.V2I[DB.GetP[msgSet, msNumInSetIs]]]};
DoRelationSubsetList: PROC[r: Relation, constraint: AttributeValueList← NIL]
RETURNS[relList: LIST OF Relship];
GetFE: PROC[rel: Relship, a: Attribute] RETURNS [Entity] = INLINE
{RETURN[V2E[DB.GetF[rel, a]]]};
DoGetName: PROC[e: Entity] RETURNS [ROPE] = INLINE
{RETURN[DB.GetName[e]]};
EntityInList: PROC[e: Entity, el: LIST OF Value] RETURNS [BOOL];
EntityListToNameList: PROC [el: LIST OF Value] RETURNS [nl: LIST OF RName];
-- Turns a list of entities into a list of names
END.