Oberon || Library || Module Index || Search Engine || Definition || Module


Ulm's Oberon Library:
NamedObjects


NAME

NamedObjects - add Names functionality to arbitrary objects

SYNOPSIS

TYPE Object = Services.Object;
TYPE ErrorEvent = POINTER TO ErrorEventRec;
TYPE ErrorEventRec =
   RECORD
      (Events.EventRec)
      errorcode: SHORTINT;
   END;
VAR errormsg: ARRAY errorcodes OF Events.Message;
VAR error: Events.EventType;


PROCEDURE Create(VAR node: Names.Node; object: Object); PROCEDURE Destroy(node: Names.Node): BOOLEAN; PROCEDURE Get(node: Names.Node; VAR object: Object; errors: RelatedEvents.Object): BOOLEAN; PROCEDURE GuardedGet(node: Names.Node; guard: Services.Type; VAR object: Object; errors: RelatedEvents.Object): BOOLEAN;

DESCRIPTION

NamedObjects allows to supply arbitrary extensions of Services.Object with functionality of Names.Node by way of attaching filter objects.

Create creates a node representing object, i.e., messages sent to node will reach object, too. If object is NIL Create creates a node representing itself.

In order not to introduce a new termination method for the original object via Names.Destroy, destroy permission of node is especially restricted. A filter object node can however be revoked with Destroy.

Get assigns object the object which is represented by node. GuardedGet does the same, but only if the object's type is an extension of guard.

DIAGNOSTICS

All procedures with BOOLEAN results return TRUE on succes, otherwise FALSE. Following error codes are implemented:
noObject
node is not representing a named object
objectNamed
object is already represented by another node
typeGuardFailure
GuardedGet failed due to type guard violation

SEE ALSO

Names
abstraction for name hierarchies
Services
type-independent definition of extensions
Shards
abstraction for authorization protocols
RelatedEvents
error event handling

BUGS

Does not yet use Forwarders, for historical reasons.

AUTHOR

Martin Hasch, University of Ulm
Edited by: martin, last change: 1996/07/22, revision: 1.1, converted to HTML: 1997/04/28

Oberon || Library || Module Index || Search Engine || Definition || Module