8 Object Interface Library

The Object Interface Library is a collection of patterns that forms a lowlevel runtime interface to objects. It allows the user to read and manipulate the runtime state of objects and prototypes.

This is a short description of the functionality. Please refer to the interface file for parameters etc.

8.1 ProtoTypes

Each object-descriptor in a BETA fragments gives rise to a prototype.
The library defines the following patterns for dealing with prototypes:

ScanRefs: The ScanRefs scans a prototype for references. You can use it to investigate the references in a object. It calls INNER for every reference. IsStatic is true if the reference is static. thisProto is the prototype address of static inlined objects. refType is the type of the dynamic reference.

Here is an example from the sysutils/demo/objectinterface/objint.bet demo:

  do (if isStatic then
         '\tStatic reference at offset  ' -> puttext
         '\tDynamic reference at offset ' -> puttext
     thisOffset -> putint; newline

8.2 BETA Components

The library defines the following patterns for ObjectToComponent is often needed in situation where the THIS construct is used on components. Eg:
(# mySystem:System
   (# ...
        do THIS(system)[]->objectToComponent->fork;
                (* fork is in basicsystemenv.bet *)
"THIS(System)" is a object reference and fork needs a component reference.

8.3 Objects

The library defines the following patterns for

8.4 Groups

The library defines the following patterns for handling groups.
These are only for very advanced use.

8.5 Miscellaneous

The library also contains this pattern:

System Utilities - Reference Manual
© 1994-2002 Mjølner Informatics
[Modified: Tuesday October 17th 2000 at 22:02]