[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

The C prototype for a Boopsi dispatcher looks like this:

    ULONG dispatchRKMModel(Class *cl, Object *recvobject, Msg msg);

where cl points to the Class (defined in <intuition/classes.h>) of the
dispatcher, recvobject points to the object that received the message, and
msg is that Boopsi message.  The format of the message varies according to
the method.  The default Boopsi message is an Msg (from
<intuition/classusr.h>):

    typedef struct {
        ULONG MethodID;
    } *Msg;

Boopsi methods that require parameters use custom message structures. The
first field of any message structure is always the method's methodID.
This makes custom messages look like an Msg.  The dispatcher looks at an
incoming message's first field to tell what its method is.  Rkmmodelclass
objects respond to several rootclass methods:

OM_NEW
    This method creates a new rkmmodelclass object.  It uses an opSet
    structure as its Boopsi message.

OM_DISPOSE
    This method tells an object to dispose of itself.  It uses an Msg as
    its Boopsi message.

OM_SET
    This method tells an object to set one or more of its attribute
    values.  It uses an opSet structure as its Boopsi message.

OM_UPDATE
    This method tells an object to update one or more of its attribute
    values.  It uses an opUpdate structure as its Boopsi message.

OM_GET
    This method tells an object to report an attribute value.  It uses an
    opGet structure as its Boopsi message.

OM_ADDTAIL
    This method tells an object to add itself to the end of an Exec list.
    It uses an opAddTail structure as its Boopsi message.

OM_REMOVE
    This method tells an object to remove itself from an Exec list.  It
    uses an Msg as its Boopsi message.

OM_ADDMEMBER
    This method tells an object to add an object to its broadcast list.
    It uses an opMember structure as its Boopsi message.

OM_REMMEMBER
    This method tells an object to remove an object from its broadcast
    list.  It uses an opMember structure as its Boopsi message.

OM_NOTIFY
    This method tells an object to broadcast an attribute change to its
    broadcast list.  It uses an opSet structure as its Boopsi message.

Of these, rkmmodelclass has to process OM_NEW, OM_SET, OM_UPDATE, and
OM_GET.

 OM_NEW              OM_GET                  RKMModel.c 
 OM_SET/OM_UPDATE    Making the New Class