2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
6 Iterate through a list of objects.
9 #include <exec/types.h>
10 #include <exec/nodes.h>
11 #include "intuition_intern.h"
13 /*****************************************************************************
16 #include <intuition/classes.h>
17 #include <proto/intuition.h>
19 AROS_LH1(APTR
, NextObject
,
22 AROS_LHA(APTR
, objectPtrPtr
, A0
),
25 struct IntuitionBase
*, IntuitionBase
, 111, Intuition
)
28 Use this function to iterate through a list of BOOPSI objects.
29 You may do whatever you want with the object returned, even
30 remove it from the list or dispose it, and then continue to
31 iterate through the list.
34 objectPtrPtr - the pointer to a variable. This must be the same
35 variable, as long as you iterate though the same list. This
36 variable must initially be filled with the lh_Head of a list.
39 A BOOPSI object, which can be manipulated.
49 "Basic Object-Oriented Programming System for Intuition" and
50 "Boopsi Class Reference" Document.
54 *****************************************************************************/
58 struct _Object
*nextobject
;
61 DEBUG_NEXTOBJECT(dprintf("NextObject: optr 0x%lx\n",
64 IntuitionBase
= IntuitionBase
; /* shut up the compiler */
66 SANITY_CHECKR(objectPtrPtr
,FALSE
)
68 nextobject
= (struct _Object
*)(*((struct _Object
**)objectPtrPtr
))->o_Node
.mln_Succ
;
71 oldobject
= (Object
*)BASEOBJECT(*((struct _Object
**)objectPtrPtr
));
72 *((struct _Object
**)objectPtrPtr
) = nextobject
;