|
TacOS
0.2
|
#include <types.h>

Aller au code source de ce fichier.
Structures de données | |
| struct | list_t |
| Liste générique. Plus de détails... | |
Définitions de type | |
| typedef int(* | cmp_func_type )(void *, void *) |
| typedef int(* | id_func_type )(int, void *) |
Fonctions | |
| void | list_init (list_t *l, cmp_func_type cmp, size_t elements_size, int max_elements) |
| void * | list_get_top (list_t l) |
| int | list_add_element (list_t *l, void *element) |
| int | list_remove_top (list_t *l) |
| int | list_del_element (list_t *list, int id, id_func_type func) |
| void | print_list (list_t ma_liste) |
Copyright (C) 2010, 2011, 2012 - TacOS developers.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details at http://www.gnu.org/copyleft/gpl.html
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/licenses.
Structure de liste chainée générique.
| typedef int(* cmp_func_type)(void *, void *) |
Définition du type pour une fonction de comparaison entre 2 éléments.
| int list_add_element | ( | list_t * | l, |
| void * | element | ||
| ) |
Ajoute un élément à la fin de la liste.
| l | La liste manipulée. |
| element | Element à ajouter. |


| int list_del_element | ( | list_t * | list, |
| int | id, | ||
| id_func_type | func | ||
| ) |
Suppression d'un élément de la liste.
| list | La liste manipulée. |

| void* list_get_top | ( | list_t | l | ) |
Récupère le premier élément de la liste.
| l | La liste manipulée. |
| void list_init | ( | list_t * | l, |
| cmp_func_type | cmp, | ||
| size_t | elements_size, | ||
| int | max_elements | ||
| ) |
Initialisation d'un liste.
| l | La liste manipulée. |
| cmp | Fonction de comparaison. |
| elements_size | Taille d'un élément de la liste. |
| max_elements | Nombre max d'éléments dans la liste. |


| int list_remove_top | ( | list_t * | l | ) |
Retire le premier élément de la liste.
| l | La liste manipulée. |
| void print_list | ( | list_t | ma_liste | ) |
Affichage d'une liste (pour debug).
| ma_liste | Liste à afficher. |

1.8.7