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.