move delay code into separate function.
[AROS.git] / rom / oop / obtainmethodbasesarray.c
blob037d1375d5e2f3202f56c1dffc57843a2dc74785
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Obtain array of method ID bases
6 Lang: english
7 */
9 /*****************************************************************************
11 NAME */
13 #include <proto/oop.h>
14 #include <oop/oop.h>
16 AROS_LH2(ULONG, OOP_ObtainMethodBasesArray,
18 /* SYNOPSIS */
19 AROS_LHA(OOP_MethodID *, bases, A0),
20 AROS_LHA(CONST_STRPTR const *, ids, A1),
22 /* LOCATION */
23 struct Library *, OOPBase, 25, OOP)
25 /* FUNCTION
26 Obtain several method ID bases, storing them in linear array.
28 INPUTS
29 bases - a pointer to array to fill in
30 ids - a NULL-terminated array of interface IDs
32 RESULT
33 Zero on success or number of failed bases on failure. Failed array
34 entries will be set to -1.
36 NOTES
37 Method IDs are owned by particular class, and are released when
38 the class is destroyed. Thus, there is no ReleaseMethodBasesArray()
39 function.
41 EXAMPLE
43 BUGS
45 SEE ALSO
47 INTERNALS
49 HISTORY
51 ******************************************************************************/
53 AROS_LIBFUNC_INIT
55 ULONG failed = 0;
57 while (*ids)
59 *bases = OOP_GetMethodID(*ids, 0);
61 if (*bases == -1)
62 failed++;
64 bases++;
65 ids++;
68 return failed;
70 AROS_LIBFUNC_EXIT