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

The rkmmodel only has one "gettable" attribute: RKMMOD_CurrVal, which
makes processing it easy.  The OM_GET message looks like this (defined in
<intuition/classusr.h>):

    struct opGet {
        ULONG MethodID;     /* OM_GET */
        ULONG opg_AttrID;   /* The attribute to retrieve */
        ULONG *opg_Storage; /* a place to put the attribute's value */
    };

When the rkmmodelclass dispatcher receives an OM_GET message with an
opg_AttrID equal to RKMMOD_CurrVal, it copies the current value
(RKMModData).currval to the memory location opg_Storage points to and
returns a value of TRUE.  The TRUE indicates that there was no error.  If
opg_AttrID is not RKMMOD_CurrVal, the dispatcher should let its superclass
handle this message.

The rkmmodelclass dispatcher can take advantage of the fact that the only
"gettable" attribute available to an rkmmodel is RKMMOD_CurrVal (the
attributes defined by modelclass and icclass are not gettable--see the
Boopsi Class Reference in the Appendix B of this manual for more details
on which attributes are "settable", "gettable", etc.).  If opg_AttrID is
not RKMMOD_CurrVal, the rkmmodelclass dispatcher can return FALSE,
indicating that the attribute was not "gettable".

If the rkmmodelclass dispatcher comes across any other messages besides
OM_NEW, OM_SET, OM_UPDATE, and OM_GET message, it blindly passes them on
to its superclass for processing.