2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Iterate through a list of objects
8 #include <exec/types.h>
9 #include <exec/nodes.h>
12 /*****************************************************************************
15 #include <intuition/classes.h>
16 #include <proto/boopsi.h>
18 AROS_LH1(APTR
, NextObject
,
21 AROS_LHA(APTR
, objectPtrPtr
, A0
),
24 struct Library
*, BOOPSIBase
, 12, BOOPSI
)
27 Use this function to iterate through a list of BOOPSI objects.
28 You may do whatever you want with the object returned, even
29 remove it from the list or disposing it and then continue to
30 iterate thought the list.
33 objectPtrPtr - the pointer to a variable. This must be the same
34 variable, as long as you iterate though the same list. This
35 variable must initially be filled with the lh_Head of a list.
38 A BOOPSI object, which can be manipulated.
48 "Basic Object-Oriented Programming System for Intuition" and
49 "boopsi Class Reference" Dokument.
55 *****************************************************************************/
58 AROS_LIBBASE_EXT_DECL(struct Library
*,BOOPSIBase
)
61 struct _Object
*nextobject
;
63 nextobject
= (struct _Object
*)(*((struct _Object
**)objectPtrPtr
))->o_Node
.mln_Succ
;
66 oldobject
= (Object
*)BASEOBJECT(*((struct _Object
**)objectPtrPtr
));
67 *((struct _Object
**)objectPtrPtr
) = nextobject
;