2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Autodoc for the Meta interface.
15 Specifies the class ID for the class.
17 ---------------------------
19 aMeta_SuperID [I], STRPTR
22 ID of public class that will be superclass of class to be created.
26 ---------------------------
28 aMeta_SuperPtr [I], Class *
31 Pointer to private class that will be superclass to
35 aMeta_InstSize [I], ULONG
38 Size of the instance data for this class.
39 Note, this is not necessarily the same as the size of the whole
42 ---------------------------
44 aMeta_InterfaceDescr [I], struct InterfaceDescr *
46 Pointer to an array struct InterfaceDescr.
47 This array has to be nullterminated. Each
51 struct MethodDescr *MethodTable;
53 ULONG NumMethods; /* Number of methods in the methodtable */
56 describes an interface of the class.
57 The MethodTable is an array of
65 which describes each method's implemtation.
69 struct MethodDescr root_mdescr[NUM_ROOT_METHODS + 1] =
71 { (IPTR (*)())unixio_new, MIDX_Root_New },
72 { (IPTR (*)())unixio_dispose, MIDX_Root_Dispose },
76 struct MethodDescr unixio_mdescr[NUM_UNIXIO_METHODS + 1] =
78 { (IPTR (*)())unixio_wait, HIDDMIDX_UnixIO_Wait },
82 struct InterfaceDescr ifdescr[] =
84 {root_mdescr, IID_Root, NUM_ROOT_METHODS},
85 {unixio_mdescr, IID_UnixIO, NUM_UNIXIO_METHODS},
90 struct TagItem tags[] =
92 {aMeta_SuperID, (IPTR)CLID_Hidd},
93 {aMeta_InterfaceDescr, (IPTR)ifdescr},
94 {aMeta_ID, (IPTR)CLID_UnixIO_Hidd},
95 {aMeta_InstSize, (IPTR)sizeof (struct UnixIOData) },
102 cl = NewObjectA(NULL, CLID_HIDDMeta, tags);
106 This API to class creation is not good, as it's not flexible
107 nor "future-compatible" One should probably use tags for everything.
108 For example there is no way to specify attribute
109 types, method parameter struct types/stubs etc.
111 Suggestions are welcome.