equal
deleted
inserted
replaced
|
1 #ifndef TEAMLIST_H_ |
|
2 #define TEAMLIST_H_ |
|
3 |
|
4 #include "team.h" |
|
5 |
|
6 typedef struct { |
|
7 int teamCount; |
|
8 flib_team **teams; |
|
9 } flib_teamlist; |
|
10 |
|
11 flib_teamlist *flib_teamlist_create(); |
|
12 |
|
13 void flib_teamlist_destroy(flib_teamlist *list); |
|
14 |
|
15 /** |
|
16 * Insert a team into the list. Returns 0 on success. |
|
17 */ |
|
18 int flib_teamlist_insert(flib_teamlist *list, flib_team *team, int pos); |
|
19 |
|
20 /** |
|
21 * Delete the item with the name [name] from the list. |
|
22 * Returns 0 on success. |
|
23 */ |
|
24 int flib_teamlist_delete(flib_teamlist *list, const char *name); |
|
25 |
|
26 /** |
|
27 * Returns the team with the name [name] from the list if it exists, NULL otherwise |
|
28 */ |
|
29 flib_team *flib_teamlist_find(const flib_teamlist *list, const char *name); |
|
30 |
|
31 /** |
|
32 * Removes all items from the list and frees "teams". |
|
33 */ |
|
34 void flib_teamlist_clear(flib_teamlist *list); |
|
35 |
|
36 #endif |