2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
6 Makes a class publically available.
9 #include <proto/exec.h>
10 #include "intuition_intern.h"
12 /*****************************************************************************
15 #include <intuition/classes.h>
16 #include <proto/intuition.h>
18 AROS_LH1(void, AddClass
,
21 AROS_LHA(struct IClass
*, classPtr
, A0
),
24 struct IntuitionBase
*, IntuitionBase
, 114, Intuition
)
27 Makes a class publically usable. This function must not be called
31 class - The result of MakeClass()
37 Do not use this function for private classes.
42 There is no protection against creating multiple classes with
43 the same name yet. The operation of the system is undefined
47 MakeClass(), FreeClass(), RemoveClass(), "Basic Object-Oriented
48 Programming System for Intuition" and "boopsi Class Reference"
52 *****************************************************************************/
56 DEBUG_ADDCLASS(dprintf("AddClass: class 0x%lx super 0x%lx dispatcher 0x%lx ID <%s>\n",
57 classPtr
, classPtr
->cl_Super
, classPtr
->cl_Dispatcher
, classPtr
->cl_ID
));
59 SANITY_CHECK(classPtr
)
61 ObtainSemaphore (&GetPrivIBase(IntuitionBase
)->ClassListLock
);
62 AddHead((struct List
*)&GetPrivIBase(IntuitionBase
)->ClassList
, (struct Node
*)classPtr
);
63 classPtr
->cl_Flags
|= CLF_INLIST
;
64 ReleaseSemaphore (&GetPrivIBase(IntuitionBase
)->ClassListLock
);