project_files/frontlib/model/teamlist.h
changeset 7275 15f722e0b96f
child 7314 6171f0bad318
equal deleted inserted replaced
7273:8eed495fd8da 7275:15f722e0b96f
       
     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