TacOS  0.2
 Tout Structures de données Fichiers Fonctions Variables Définitions de type Énumérations Macros
Fonctions
Référence du fichier heap.c
#include <heap.h>
#include <klibc/string.h>
#include <debug.h>
Graphe des dépendances par inclusion de heap.c:

Fonctions

void initHeap (heap_t *h, cmp_func_type cmp, void *heap, size_t elements_size, int max_elements)
 
void * getTop (heap_t *h)
 
int addElement (heap_t *h, void *element)
 
int removetop (heap_t *h)
 
int delElement (heap_t *heap, int id, id_func_type func)
 

Description détaillée

Auteur
TacOS developers

LICENSE

Copyright (C) 2010-2014 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.

DESCRIPTION

Description de ce que fait le fichier

Documentation des fonctions

int addElement ( heap_t h,
void *  element 
)

Ajoute un element au tas.

Paramètres
hpointeur vers le tas.
elementpointeur vers l'élément à ajouter au tas.
Renvoie
0 en cas de succes

Voici le graphe d'appel pour cette fonction :

void* getTop ( heap_t h)

Recupere le premier élément du tas.

@param h pointeur vers le tas.

@return pointeur vers le premier élément du tas, NULL si aucun.
void initHeap ( heap_t h,
cmp_func_type  cmp,
void *  heap,
size_t  elements_size,
int  max_elements 
)

Initialise le tas à vide et regle la fonction de comparaison

int removetop ( heap_t h)

Retire le sommet.

Paramètres
hpointeur vers le tas.
Renvoie
0 en cas de succes.

Voici le graphe d'appel pour cette fonction :