Overriding OM GET()

From MorphOS Library

Revision as of 21:24, 3 January 2011 by Krashan (talk | contribs) (Added code.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Grzegorz Kraszewski


IPTR MyClassGet(Class *cl, Object *obj, struct opGet *msg)
{
  switch (msg->opg_AttrID)
  {
    case Some_Integer_Tag:
      *msg->opg_Storage = /* value of the tag */;
    return TRUE;

    case Some_String_Tag:
      *(char**)msg->opg_Storage = "a fixed string value";
    return TRUE;
  }

  return DoSuperMethodA(cl, obj, (Msg)msg);
}