			-*- Indented-Text -*-

			  The BOS interface


If you are using Scheme 48, then the file `package.scm' provides an
easy way to encapsulate your use of BOS.  You can simply do the
following from the top-level REPL to get started:
  ,config ,load package.scm
Then, if you are a Safety Person, type
  ,open bos-safe
Otherwise, type
  ,open bos
and away you go.

The difference between the `safe' and `unsafe' modules (unsafe
functions are tagged as such in the decsription below) is that the
former conceptually provides you with more security, by not exporting
functions which permit any old function to tweak an object's members.
I prefer the latter approach myself, but there is no accounting for
taste.

The interface provided by BOS goes as follows:

(define-class class-name (superclasses ...) (member-names ...))

(make-class (superclasses ...) (member-names ...))

  creates a `class object' which inherits members from the given
  superclasses and includes the given members

(define-generic generic-name)

(make-generic)

  defines a new generic function

(specialise! generic class procedure)

  defines a specialisation of GENERIC for CLASS

(define-object object-name class arguments ...)

(make-object class arguments ...)

  creates an object of class CLASS, passing its INITIALISE method
  the given ARGUMENTS

(get-arg arg-list arg-name . default-value)

  given a Common Lisp style keyword argument list, this returns the
  value of ARG-NAME in ARG-LIST, or DEFAULT-VALUE if no such value
  appears in the list

<class>

  the root class; all classes *must* inherit from this

(class-of object)

  returns the class of an object

(is-a? object class)

  returns #t if OBJECT is of type CLASS or inherits from it

(slot-ref object slot-name)			*** unsafe ***

  returns the value of OBJECT's SLOT-NAME member

(slot-set! object slot-name new-value)		*** unsafe ***

  sets OBJECT's SLOT-NAME member to NEW-VALUE

(member-accessor class slot-name)

  returns a function of one argument which, when passed an object of
  type CLASS, returns its SLOT-NAME member

(member-mutator class slot-name)

  returns a function of two arguments which, when passed an objecy of
  type CLASS, modifies its SLOT-NAME member to the value of its second
  argument

initialise

  this method must be specialised to each class you define, *before*
  you create any objects of that class

All methods are expected to look like the following:

  (lambda (call-next-method self . other-parameters)
    ...)

The CALL-NEXT-METHOD parameter is a thunk which you call, preferably
before you do anything yourself, to run overridden methods.  You
probably shouldn't call CALL-NEXT-METHOD if you are inheriting
directly from the root class (unless you have methods specialised on
that, bleurgh).  The SELF parameter is a pointer to `this' object.
The other parameters are up to you.
