2001-11-26 11:17:44 +01:00
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
2003-07-16 02:20:53 +02:00
|
|
|
|
/* $RCSfile: node.h,v $ */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
2003-07-16 02:20:53 +02:00
|
|
|
|
/* $Revision: 2.6 $ */
|
|
|
|
|
/* $Name: $ */
|
|
|
|
|
/* $Date: 2003/07/16 00:20:53 $ */
|
|
|
|
|
/* $Author: agibert $ */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
|
|
2002-02-28 20:02:32 +01:00
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
|
/* This file is part of LibNode */
|
|
|
|
|
/* */
|
|
|
|
|
/* LibNode is free software; you can redistribute it and/or modify */
|
2002-02-28 22:53:47 +01:00
|
|
|
|
/* it under the terms of the GNU Lesser General Public Licence as published by */
|
2002-02-28 20:02:32 +01:00
|
|
|
|
/* the Free Software Foundation; either version 2.1 of the License, or */
|
|
|
|
|
/* (at your option) any later version. */
|
|
|
|
|
/* */
|
|
|
|
|
/* LibNode 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 Lesser General Public License for more details. */
|
|
|
|
|
/* */
|
2002-02-28 22:53:47 +01:00
|
|
|
|
/* You should have received a copy of the GNU Lesser General Public License */
|
2002-02-28 20:02:32 +01:00
|
|
|
|
/* along with Foobar; if not, write to the Free Software */
|
|
|
|
|
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
|
/*---------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2002-02-27 17:04:10 +01:00
|
|
|
|
#ifndef _LIBNODE_H_
|
|
|
|
|
#define _LIBNODE_H_
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <signal.h>
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#ifdef _LIBVER_SUPPORT
|
|
|
|
|
# include <ver.h>
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define NDD_TRUE 1
|
|
|
|
|
|
|
|
|
|
#define NDD_FALSE 0
|
|
|
|
|
|
|
|
|
|
#define NDD_MIN(A,B) ((A > B) ? B : A)
|
|
|
|
|
|
|
|
|
|
#define NDD_MAX(A,B) ((A < B) ? B : A)
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Diff<EFBFBD>rence de profondeur entre la branche la plus courte et
|
|
|
|
|
la plus longue d'un arbre.
|
|
|
|
|
Le d<EFBFBD>passement de ce seuil provoque le r<EFBFBD><EFBFBD>quilibrage de l'arbre
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#define DEF_MAX_DIF 100
|
|
|
|
|
|
|
|
|
|
/* Types de structure */
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
typedef short NDT_Root_Type;
|
|
|
|
|
|
|
|
|
|
typedef int NDT_Index_Type;
|
|
|
|
|
|
|
|
|
|
#define NDD_INDEX_MSK 0xffff
|
|
|
|
|
#define NDD_INDEX_RMSK 0x0000
|
|
|
|
|
|
|
|
|
|
#define NDD_INDEX_STATUS_UNKNOWN 0x0000
|
|
|
|
|
#define NDD_INDEX_STATUS_OPENED 0x0001
|
|
|
|
|
#define NDD_INDEX_STATUS_CLOSED 0x0002
|
|
|
|
|
#define NDD_INDEX_STATUS_MSK (NDD_INDEX_STATUS_UNKNOWN | NDD_INDEX_STATUS_OPENED | NDD_INDEX_STATUS_CLOSED)
|
|
|
|
|
#define NDD_INDEX_STATUS_RMSK (NDD_INDEX_MSK ^ NDD_INDEX_STATUS_MSK)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_STATUS_VALUE_UNKNOWN_IS( v) ( ( (v) & NDD_INDEX_STATUS_MSK) == NDD_INDEX_STATUS_UNKNOWN)
|
|
|
|
|
#define ND_INDEX_STATUS_VALUE_OPENED_IS( v) ( ( (v) & NDD_INDEX_STATUS_MSK) == NDD_INDEX_STATUS_OPENED)
|
|
|
|
|
#define ND_INDEX_STATUS_VALUE_CLOSED_IS( v) ( ( (v) & NDD_INDEX_STATUS_MSK) == NDD_INDEX_STATUS_CLOSED)
|
|
|
|
|
#define ND_INDEX_STATUS_UNKNOWN_IS( r, i) ND_INDEX_STATUS_VALUE_UNKNOWN_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_STATUS_OPENED_IS( r, i) ND_INDEX_STATUS_VALUE_OPENED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_STATUS_CLOSED_IS( r, i) ND_INDEX_STATUS_VALUE_CLOSED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_STATUS_VALUE_ASCII_GET( v) ( ND_INDEX_STATUS_VALUE_UNKNOWN_IS( (v)) ? "UNKNOWN" : ( ND_INDEX_STATUS_VALUE_OPENED_IS( (v)) ? "OPENED" : ( ND_INDEX_STATUS_VALUE_CLOSED_IS( (v)) ? "CLOSED" : "???")))
|
|
|
|
|
#define ND_INDEX_STATUS_ASCII_GET( r, i) ND_INDEX_STATUS_VALUE_ASCII_GET( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_INDEX_TYPE_UNKNOWN 0x0000
|
|
|
|
|
#define NDD_INDEX_TYPE_LIST 0x0010
|
|
|
|
|
#define NDD_INDEX_TYPE_TREE 0x0020
|
|
|
|
|
#define NDD_INDEX_TYPE_MSK (NDD_INDEX_TYPE_UNKNOWN | NDD_INDEX_TYPE_LIST | NDD_INDEX_TYPE_TREE)
|
|
|
|
|
#define NDD_INDEX_TYPE_RMSK (NDD_INDEX_MSK ^ NDD_INDEX_TYPE_MSK)
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_INDEX_TYPE_VALUE_UNKNOWN_IS( v) ( ( (v) & NDD_INDEX_TYPE_MSK) == NDD_INDEX_TYPE_UNKNOWN)
|
|
|
|
|
#define ND_INDEX_TYPE_VALUE_LIST_IS( v) ( ( (v) & NDD_INDEX_TYPE_MSK) == NDD_INDEX_TYPE_LIST)
|
|
|
|
|
#define ND_INDEX_TYPE_VALUE_TREE_IS( v) ( ( (v) & NDD_INDEX_TYPE_MSK) == NDD_INDEX_TYPE_TREE)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_TYPE_UNKNOWN_IS( r, i) ND_INDEX_TYPE_VALUE_UNKNOWN_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_TYPE_LIST_IS( r, i) ND_INDEX_TYPE_VALUE_LIST_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_TYPE_TREE_IS( r, i) ND_INDEX_TYPE_VALUE_TREE_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_TYPE_VALUE_ASCII_GET( v) ( ND_INDEX_TYPE_VALUE_UNKNOWN_IS( (v)) ? "UNKNOWN" : ( ND_INDEX_TYPE_VALUE_LIST_IS( (v)) ? "LIST" : ( ND_INDEX_TYPE_VALUE_TREE_IS( (v)) ? "TREE" : "???")))
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_TYPE_ASCII_GET( r, i) ND_INDEX_TYPE_VALUE_ASCII_GET( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_UNKNOWN 0x0000
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_FIFO 0x0100 /* principe de la file d'attente (First In First Out) */
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_LILO NDD_INDEX_SUBTYPE_FIFO
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_LIFO 0x0200 /* principe de la pile (First In Last Out) */
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_FILO NDD_INDEX_SUBTYPE_LIFO
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_SORTED 0x0300 /* liste tri<72>e */
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_UNBALANCED 0x0400
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_BALANCED 0x0500 /* arbre auto-<2D>quilibr<62> */
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_MSK ( NDD_INDEX_SUBTYPE_UNKNOWN | NDD_INDEX_SUBTYPE_FIFO | NDD_INDEX_SUBTYPE_FILO | NDD_INDEX_SUBTYPE_SORTED | NDD_INDEX_SUBTYPE_UNBALANCED | NDD_INDEX_SUBTYPE_BALANCED)
|
|
|
|
|
#define NDD_INDEX_SUBTYPE_RMSK (NDD_INDEX_MSK ^ NDD_INDEX_SUBTYPE_MSK)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_UNKNOWN_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_UNKNOWN)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_FIFO)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_LILO_IS( v) ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_LIFO_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_LIFO)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_FILO_IS( v) ND_INDEX_SUBTYPE_LIFO_IS( r, i)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_SORTED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_SORTED)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_UNBALANCED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_UNBALANCED)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_BALANCED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_BALANCED)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_SUBTYPE_UNKNOWN_IS( r, i) ND_INDEX_SUBTYPE_VALUE_UNKNOWN_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_FIFO_IS( r, i) ND_INDEX_SUBTYPE_VALUE_FIFO_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_LILO_IS( r, i) ND_INDEX_SUBTYPE_VALUE_LILO_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_LIFO_IS( r, i) ND_INDEX_SUBTYPE_VALUE_LIFO_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_FILO_IS( r, i) ND_INDEX_SUBTYPE_VALUE_FILO_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_SORTED_IS( r, i) ND_INDEX_SUBTYPE_VALUE_SORTED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_UNBALANCED_IS( r, i) ND_INDEX_SUBTYPE_VALUE_UNBALANCED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
#define ND_INDEX_SUBTYPE_BALANCED_IS( r, i) ND_INDEX_SUBTYPE_VALUE_BALANCED_IS( (r)->Index_Tab[(i)].Type)
|
|
|
|
|
|
|
|
|
|
#define ND_INDEX_SUBTYPE_VALUE_ASCII_GET( v) ( ND_INDEX_SUBTYPE_VALUE_UNKNOWN_IS( v) ? "UNKNOWN" : ( ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v) ? "FIFO" : ( ND_INDEX_SUBTYPE_VALUE_LIFO_IS( v) ? "LIFO" : ( ND_INDEX_SUBTYPE_VALUE_SORTED_IS( v) ? "SORTED" : ( ND_INDEX_SUBTYPE_VALUE_UNBALANCED_IS( v) ? "UNBALANCED" : ( ND_INDEX_SUBTYPE_VALUE_BALANCED_IS( v) ? "BALANCED" : "???"))))))
|
|
|
|
|
#define ND_INDEX_SUBTYPE_ASCII_GET( r, i) ND_INDEX_SUBTYPE_VALUE_ASCII_GET( (r)->Index_Tab[(i)].Type)
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Commandes du manager */
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
typedef int NDT_Command;
|
|
|
|
|
|
|
|
|
|
#define NDD_CMD_UNKNOWN (NDT_Command)0
|
|
|
|
|
#define NDD_CMD_MANAGER_VERSION (NDT_Command)1
|
|
|
|
|
#define NDD_CMD_INDEX_GET (NDT_Command)2
|
|
|
|
|
#define NDD_CMD_VALUE_ALLOC (NDT_Command)3
|
|
|
|
|
#define NDD_CMD_VALUE_FREE (NDT_Command)4
|
|
|
|
|
#define NDD_CMD_VALUE_COMP (NDT_Command)5
|
|
|
|
|
#define NDD_CMD_VALUE_ADD (NDT_Command)6
|
|
|
|
|
#define NDD_CMD_VALUE_REMOVE (NDT_Command)7
|
|
|
|
|
#define NDD_CMD_VALUE_PRINT (NDT_Command)8
|
|
|
|
|
#define NDD_CMD_VALUE_FIND (NDT_Command)9
|
|
|
|
|
#define NDD_CMD_INFO_PRINT (NDT_Command)10
|
|
|
|
|
|
|
|
|
|
#define NDD_CMD_USER_TRAVERSE (NDT_Command)17
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef char *NDT_Command_Name;
|
|
|
|
|
typedef char *NDT_Version_Name;
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Types de r<>ponse du manager ou code retour des diverses fonctions */
|
|
|
|
|
|
|
|
|
|
typedef int NDT_Status;
|
|
|
|
|
|
2001-11-28 14:43:50 +01:00
|
|
|
|
#define ND_ERROR(s) ((s) <= 0) /* All negative or 0 status are errors */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
#define NDS_OK 1
|
|
|
|
|
#define NDS_KO 0
|
|
|
|
|
|
|
|
|
|
#define NDS_YES 1
|
|
|
|
|
#define NDS_NO 0
|
|
|
|
|
|
|
|
|
|
#define NDS_EQUAL 1
|
|
|
|
|
#define NDS_GREATER 2
|
|
|
|
|
#define NDS_LOWER 3
|
|
|
|
|
|
|
|
|
|
#define NDS_ERRMEM -1 /* Probl<62>me d'allocation m<>moire */
|
|
|
|
|
#define NDS_ERRAPI -2 /* Utilisation incorrecte des API */
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef short NDT_Index_Id;
|
|
|
|
|
typedef short NDT_Index_Nb;
|
|
|
|
|
|
|
|
|
|
#define NDD_INDEX_UNKNOWN (NDT_Index_Id)-1
|
|
|
|
|
#define NDD_INDEX_PRIMARY (NDT_Index_Id)0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct NDT_Root;
|
|
|
|
|
struct NDT_Node;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/* Pointeur de fonction sur le manager */
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_MANAGER_NAME_LEN_MAX 64
|
|
|
|
|
#define NDD_MANAGER_NAME_SIZE_MAX (NDD_MANAGER_NAME_LEN_MAX + 1)
|
|
|
|
|
|
|
|
|
|
typedef char *NDT_Manager_Name;
|
|
|
|
|
|
|
|
|
|
typedef NDT_Status NDT_Manager( struct NDT_Root *, NDT_Index_Id, struct NDT_Node *, NDT_Command, va_list);
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/* Pointeur de fonction sur l'allocateur */
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_ALLOCATOR_NAME_LEN_MAX 64
|
|
|
|
|
#define NDD_ALLOCATOR_NAME_SIZE_MAX (NDD_ALLOCATOR_NAME_LEN_MAX + 1)
|
|
|
|
|
|
|
|
|
|
typedef char *NDT_Allocator_Name;
|
|
|
|
|
|
|
|
|
|
typedef NDT_Status NDT_Allocator(size_t, void **, void *);
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/* Pointeur de fonction sur le d<>sallocateur */
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define NDD_DESALLOCATOR_NAME_LEN_MAX 64
|
|
|
|
|
#define NDD_DESALLOCATOR_NAME_SIZE_MAX (NDD_DESALLOCATOR_NAME_LEN_MAX + 1)
|
|
|
|
|
|
|
|
|
|
typedef char *NDT_Desallocator_Name;
|
|
|
|
|
|
|
|
|
|
typedef NDT_Status NDT_Desallocator(void *, void *);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct NDT_Index
|
|
|
|
|
{
|
|
|
|
|
NDT_Index_Type Type; /* Type de la structure (liste, arbre ... ) */
|
|
|
|
|
|
|
|
|
|
long Node_Number; /* Nombre de noeuds dans la structure */
|
|
|
|
|
long Min_Depth; /* Profondeur minimale de l'arbre */
|
|
|
|
|
long Max_Depth; /* Profondeur maximale de l'arbre */
|
|
|
|
|
long Max_Dif; /* Diff<66>rence maximale autoris<69>e entre la branche la plus courte et la plus longue */
|
|
|
|
|
long Nb_Equ; /* Nombre de r<>quilibrages r<>alis<69>s sur l'arbre */
|
|
|
|
|
struct NDT_Node * Head; /* Noeud de t<>te */
|
|
|
|
|
struct NDT_Node * Tail; /* Noeud de queue */
|
|
|
|
|
struct NDT_Node * Save; /* Pointeur de sauvegarde (utile pour la fonction de restauration) */
|
|
|
|
|
|
|
|
|
|
} NDT_Index;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct NDT_Root
|
|
|
|
|
{
|
|
|
|
|
// NDT_Root_Type Type; /* Root Structure Type */
|
|
|
|
|
// NDT_DataStruct_Type DS_Type; /* Type de la structure (liste, arbre ... ) */
|
|
|
|
|
|
|
|
|
|
NDT_Manager *Manager_Ptr; /* Pointeur sur la fonction manager */
|
|
|
|
|
char Manager_Name[NDD_MANAGER_NAME_SIZE_MAX]; /* Nom de la fonction manager */
|
|
|
|
|
NDT_Allocator *Allocator_Ptr; /* Pointeur sur la fonction d'allocation */
|
|
|
|
|
char Allocator_Name[NDD_ALLOCATOR_NAME_SIZE_MAX]; /* Nom de la fonction d'allocation */
|
|
|
|
|
NDT_Desallocator *Desallocator_Ptr; /* Pointeur sur la fonction de d<>sallocation */
|
|
|
|
|
char Desallocator_Name[NDD_DESALLOCATOR_NAME_SIZE_MAX]; /* Nom de la fonction de d<>sallocation */
|
|
|
|
|
|
|
|
|
|
short Own_Value; /* Indique si la structure est propri<72>taire de ses valeurs */
|
|
|
|
|
void *User; /* Pointeur utilisable librement par l'utilisateur */
|
|
|
|
|
|
|
|
|
|
NDT_Index_Nb Index_Nb;
|
2002-02-26 00:34:36 +01:00
|
|
|
|
NDT_Index_Nb Index_Open_Count;
|
2001-11-26 11:17:44 +01:00
|
|
|
|
NDT_Index Index_Tab[0];
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
} NDT_Root;
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct NDT_DataStruct
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
NDT_Root *Root_Ptr;
|
|
|
|
|
|
|
|
|
|
NDT_Manager *Manager_Ptr; /* Manager function pointer */
|
|
|
|
|
NDT_Allocator *Allocator_Ptr; /* Allocator function pointer */
|
|
|
|
|
NDT_Desallocator *Desallocator_Ptr; /* Desallocator function pointer */
|
|
|
|
|
|
|
|
|
|
} NDT_DataStruct;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/* Structure de noeud */
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
typedef struct NDT_Node
|
|
|
|
|
{
|
|
|
|
|
NDT_Root *Root;
|
|
|
|
|
NDT_Index_Id Index;
|
|
|
|
|
struct NDT_Node *Parent;
|
|
|
|
|
struct NDT_Node *Left;
|
|
|
|
|
struct NDT_Node *Right;
|
|
|
|
|
void *Value;
|
2000-07-18 16:51:56 +02:00
|
|
|
|
} NDT_Node;
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
char ND_Error_Msg [512];
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef int NDT_Recursive_Mode;
|
|
|
|
|
typedef int NDT_Recursive_Depth;
|
|
|
|
|
typedef int NDT_Recursive_Offset;
|
|
|
|
|
|
|
|
|
|
#define NDD_RECURSIVE_MODE_UNKNOWN (NDT_Recursive_Mode)0x00
|
|
|
|
|
#define NDD_RECURSIVE_MODE_PARENT (NDT_Recursive_Mode)0x01
|
|
|
|
|
#define NDD_RECURSIVE_MODE_CHILD (NDT_Recursive_Mode)0x02
|
|
|
|
|
#define NDD_RECURSIVE_MODE_PARENT_CHILD (NDT_Recursive_Mode)0x03
|
|
|
|
|
|
|
|
|
|
#define ND_RECURSIVE_PARENT_IS(m) (m & NDD_RECURSIVE_MODE_PARENT)
|
|
|
|
|
#define ND_RECURSIVE_CHILD_IS(m) (m & NDD_RECURSIVE_MODE_CHILD)
|
|
|
|
|
|
|
|
|
|
#define ND_RECURSIVE_PRINT_OFFSET 8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/* D<>finition des alias de l'API */
|
|
|
|
|
|
|
|
|
|
#ifndef ND_MODE
|
|
|
|
|
#define ND_MODE 0
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ND_MODE == 1 /* API sans v<>rification des arguments */
|
|
|
|
|
|
|
|
|
|
#define ND_Library_Open ND_Library_Open_I
|
|
|
|
|
#define ND_Library_Close ND_Library_Close_I
|
|
|
|
|
#define ND_Library_Stderr_Set ND_Library_Stderr_Set_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Open ND_DataStruct_Open_I
|
|
|
|
|
#define ND_DataStruct_Close ND_DataStruct_Close_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Flush ND_DataStruct_Flush_I
|
|
|
|
|
#define ND_DataStruct_Check ND_DataStruct_Check_I
|
|
|
|
|
#define ND_DataStruct_Convert ND_DataStruct_Convert_I
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Reorg ND_DataStruct_Reorg_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Traverse_V ND_DataStruct_Traverse_VI
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Traverse ND_DataStruct_Traverse_I
|
|
|
|
|
#define ND_DataStruct_Info_Print ND_DataStruct_Info_Print_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Value_Add ND_DataStruct_Value_Add_I
|
|
|
|
|
#define ND_DataStruct_Value_Remove ND_DataStruct_Value_Remove_I
|
|
|
|
|
#define ND_DataStruct_Value_Print ND_DataStruct_Value_Print_I
|
|
|
|
|
#define ND_DataStruct_Value_Find ND_DataStruct_Value_Find_I
|
|
|
|
|
|
|
|
|
|
#define ND_Index_Open ND_Index_Open_I
|
|
|
|
|
#define ND_Index_Close ND_Index_Close_I
|
|
|
|
|
#define ND_Index_Flush ND_Index_Flush_I
|
|
|
|
|
#define ND_Index_Check ND_Index_Check_I
|
|
|
|
|
#define ND_Index_Convert ND_Index_Convert_I
|
|
|
|
|
#define ND_Index_Reorg ND_Index_Reorg_I
|
|
|
|
|
#define ND_Index_Traverse_V ND_Index_Traverse_VI
|
|
|
|
|
#define ND_Index_Traverse ND_Index_Traverse_I
|
|
|
|
|
#define ND_Index_Info_Print ND_Index_Info_Print_I
|
|
|
|
|
#define ND_Index_Value_Add ND_Index_Value_Add_I
|
|
|
|
|
#define ND_Index_Value_Remove ND_Index_Value_Remove_I
|
|
|
|
|
#define ND_Index_Value_Print ND_Index_Value_Print_I
|
|
|
|
|
#define ND_Index_Node_Add ND_Index_Node_Add_I
|
|
|
|
|
#define ND_Index_Node_Remove ND_Index_Node_Remove_I
|
|
|
|
|
#define ND_Index_Node_First_Get ND_Index_Node_First_Get_I
|
|
|
|
|
#define ND_Index_Node_Last_Get ND_Index_Node_Last_Get_I
|
|
|
|
|
#define ND_Index_Node_Next_Get ND_Index_Node_Next_Get_I
|
|
|
|
|
#define ND_Index_Node_Previous_Get ND_Index_Node_Previous_Get_I
|
|
|
|
|
#define ND_Index_Node_Find ND_Index_Node_Find_I
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Node_Root_Get ND_Node_Root_Get_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Value_Alloc ND_Value_Alloc_I
|
|
|
|
|
#define ND_Value_Free ND_Value_Free_I
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
#define ND_Manager_Exec_V ND_Manager_Exec_VI
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Manager_Exec ND_Manager_Exec_I
|
|
|
|
|
#define ND_Allocator_Exec ND_Allocator_Exec_I
|
|
|
|
|
#define ND_Desallocator_Exec ND_Desallocator_Exec_I
|
|
|
|
|
|
|
|
|
|
#else /* API avec v<>rification des arguments */
|
|
|
|
|
|
|
|
|
|
#define ND_Library_Open ND_Library_Open_C
|
|
|
|
|
#define ND_Library_Close ND_Library_Close_C
|
|
|
|
|
#define ND_Library_Stderr_Set ND_Library_Stderr_Set_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Open ND_DataStruct_Open_C
|
|
|
|
|
#define ND_DataStruct_Close ND_DataStruct_Close_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Flush ND_DataStruct_Flush_C
|
|
|
|
|
#define ND_DataStruct_Check ND_DataStruct_Check_C
|
|
|
|
|
#define ND_DataStruct_Convert ND_DataStruct_Convert_C
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Reorg ND_DataStruct_Reorg_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Traverse_V ND_DataStruct_Traverse_VC
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_DataStruct_Traverse ND_DataStruct_Traverse_C
|
|
|
|
|
#define ND_DataStruct_Info_Print ND_DataStruct_Info_Print_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
#define ND_DataStruct_Value_Add ND_DataStruct_Value_Add_C
|
|
|
|
|
#define ND_DataStruct_Value_Remove ND_DataStruct_Value_Remove_C
|
|
|
|
|
#define ND_DataStruct_Value_Print ND_DataStruct_Value_Print_C
|
|
|
|
|
#define ND_DataStruct_Value_Find ND_DataStruct_Value_Find_C
|
|
|
|
|
|
|
|
|
|
#define ND_Index_Open ND_Index_Open_C
|
|
|
|
|
#define ND_Index_Close ND_Index_Close_C
|
|
|
|
|
#define ND_Index_Flush ND_Index_Flush_C
|
|
|
|
|
#define ND_Index_Check ND_Index_Check_C
|
|
|
|
|
#define ND_Index_Convert ND_Index_Convert_C
|
|
|
|
|
#define ND_Index_Reorg ND_Index_Reorg_C
|
|
|
|
|
#define ND_Index_Traverse_V ND_Index_Traverse_VC
|
|
|
|
|
#define ND_Index_Traverse ND_Index_Traverse_C
|
|
|
|
|
#define ND_Index_Info_Print ND_Index_Info_Print_C
|
|
|
|
|
#define ND_Index_Value_Add ND_Index_Value_Add_C
|
|
|
|
|
#define ND_Index_Value_Remove ND_Index_Value_Remove_C
|
|
|
|
|
#define ND_Index_Value_Print ND_Index_Value_Print_C
|
|
|
|
|
#define ND_Index_Node_Add ND_Index_Node_Add_C
|
|
|
|
|
#define ND_Index_Node_Remove ND_Index_Node_Remove_C
|
|
|
|
|
#define ND_Index_Node_First_Get ND_Index_Node_First_Get_C
|
|
|
|
|
#define ND_Index_Node_Last_Get ND_Index_Node_Last_Get_C
|
|
|
|
|
#define ND_Index_Node_Next_Get ND_Index_Node_Next_Get_C
|
|
|
|
|
#define ND_Index_Node_Previous_Get ND_Index_Node_Previous_Get_C
|
|
|
|
|
#define ND_Index_Node_Find ND_Index_Node_Find_C
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Node_Root_Get ND_Node_Root_Get_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Value_Alloc ND_Value_Alloc_C
|
|
|
|
|
#define ND_Value_Free ND_Value_Free_C
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
#define ND_Manager_Exec_V ND_Manager_Exec_VC
|
2000-07-18 16:51:56 +02:00
|
|
|
|
#define ND_Manager_Exec ND_Manager_Exec_C
|
|
|
|
|
#define ND_Allocator_Exec ND_Allocator_Exec_C
|
|
|
|
|
#define ND_Desallocator_Exec ND_Desallocator_Exec_C
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2002-02-27 17:04:10 +01:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
# if defined(_MSC_VER) && !defined(LIBNODE_STATIC)
|
|
|
|
|
# ifndef _LIBNODE_C_
|
|
|
|
|
# define NDD_DLL_API __declspec(dllimport)
|
|
|
|
|
# else
|
|
|
|
|
# define NDD_DLL_API __declspec(dllexport)
|
|
|
|
|
# endif
|
|
|
|
|
# else
|
|
|
|
|
# define NDD_DLL_API
|
|
|
|
|
# endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Initialisation du contexte de la librairie */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Open_I ( int Debug_Mode );
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Open_C ( int Debug_Mode );
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Fermeture du contexte de la librairie */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Close_I( void);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Close_C( void);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* D<>finition de la sortie standard des messages d'erreur de la librairie */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Stderr_Set_I( FILE *Out);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Library_Stderr_Set_C( FILE *Out);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Cr<43>ation d'une nouvelle structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: adresse d'un pointeur sur la racine de la nouvelle structure */
|
|
|
|
|
/* (I) Type: type de la structure.de donn<6E>es (liste ou arbre binaire) */
|
|
|
|
|
/* (I) Allocator: pointeur vers la fonction d'allocation */
|
|
|
|
|
/* (I) Desallocator: pointeur vers la fonction de d<>sallocation */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es utiles <20> l'allocateur */
|
|
|
|
|
/* (I) Own_Value : indique si la structure est propri<72>taire de ses valeurs */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Open_I( NDT_Root **, NDT_Index_Nb, NDT_Index_Type *, NDT_Manager_Name, NDT_Manager *, NDT_Allocator_Name, NDT_Allocator *, NDT_Desallocator_Name, NDT_Desallocator *, short, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Open_C( NDT_Root **, NDT_Index_Nb, NDT_Index_Type *, NDT_Manager_Name, NDT_Manager *, NDT_Allocator_Name, NDT_Allocator *, NDT_Desallocator_Name, NDT_Desallocator *, short, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Destruction d'une structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Close_I( NDT_Root *Root);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Close_C( NDT_Root *Root);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Destruction d'une structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Flush_I( NDT_Root *Root);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Flush_C( NDT_Root *Root);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Function de r<>paration d'une structure : */
|
|
|
|
|
/* - v<>rifie que tous les noeuds sont correctement li<6C>s les uns aux autres */
|
|
|
|
|
/* - corrige les informations statistiques de la racine */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure */
|
|
|
|
|
/* (O) Nb_Detected : pointeur sur le nombre d'erreurs */
|
|
|
|
|
/* (O) Nb_Corrected : pointeur sur le nombre d'erreurs */
|
|
|
|
|
/* (I) Out : flux de sortie du rapport */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Check_I( NDT_Root *Root, int *Nb_Detected, int *Nb_Corrected, FILE *Out);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Check_C( NDT_Root *Root, int *Nb_Detected, int *Nb_Corrected, FILE *Out);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* R<>organisation d'une structure de donn<6E>es : */
|
|
|
|
|
/* - ordonnancement d'une liste non ordonn<6E>e */
|
|
|
|
|
/* - r<>quilibrage d'un arbre non auto-<2D>quilibr<62> */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Reorg_I( NDT_Root *Root);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Reorg_C( NDT_Root *Root);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Conversion d'une structure de donn<6E>es d'un type en un autre */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Target_Type: type de structure cible */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Convert_I( NDT_Root *, NDT_Index_Type *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Convert_C( NDT_Root *, NDT_Index_Type *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Parcours de tous les noeuds d'une structure de donn<6E>es et ex<65>cution d'une */
|
|
|
|
|
/* commande sur chacun d'eux */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Command: Commande <20> ex<65>cuter sur chaque noeud travers<72> */
|
|
|
|
|
/* (I) Data: pointeur de donn<6E>es utilisateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *, NDT_Command Command, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *, NDT_Command Command, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_I( NDT_Root *, NDT_Command Command, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_C( NDT_Root *, NDT_Command Command, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* Affichage d'informations sur une structure de donn<6E>es */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* (I) Out : flux de sortie */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_I( FILE *, NDT_Root *Root, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_C( FILE *, NDT_Root *Root, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* Ajout d'une valeur <20> une structure de donn<6E>es */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* (I) Value: pointeur sur la valeur <20> ajouter */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_I( NDT_Root *Root, void *Value);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_C( NDT_Root *Root, void *Value);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Suppression du premier noeud correspondant <20> une valeur donn<6E>e */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Reference_Value : pointeur sur la valeur de r<>f<EFBFBD>rence */
|
|
|
|
|
/* (I) Removed_Value : adresse d'un pointeur sur la valeur supprim<69>e */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_I( NDT_Root *Root, void *Value);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_C( NDT_Root *Root, void *Value);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Affichage de la valeur de tous les noeuds d'une structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Out : flux de sortie */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_VI( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_I( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_C( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Recherche un noeud <20> partir d'une valeur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de l'abre */
|
|
|
|
|
/* (O) Node : pointeur sur le noeud <20> r<>cuperer */
|
|
|
|
|
/* (I) Value : pointeur sur la valeur <20> rechercher */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VI( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VC( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_I( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_C( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Create a new index (not yet implemented !) */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: adresse d'un pointeur sur la racine de la nouvelle structure */
|
|
|
|
|
/* (I) Type: type de la structure.de donn<6E>es (liste ou arbre binaire) */
|
|
|
|
|
/* (I) Allocator: pointeur vers la fonction d'allocation */
|
|
|
|
|
/* (I) Desallocator: pointeur vers la fonction de d<>sallocation */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es utiles <20> l'allocateur */
|
|
|
|
|
/* (I) Own_Value : indique si la structure est propri<72>taire de ses valeurs */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Open_I( NDT_Root *, NDT_Index_Id, NDT_Index_Type);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Open_C( NDT_Root *, NDT_Index_Id, NDT_Index_Type);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Remove an Index (not yet implemented !) */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Close_I( NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Close_C( NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Remove an Index (not yet implemented !) */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Flush_I( NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Flush_C( NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Function de r<>paration d'une structure : */
|
|
|
|
|
/* - v<>rifie que tous les noeuds sont correctement li<6C>s les uns aux autres */
|
|
|
|
|
/* - corrige les informations statistiques de la racine */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure */
|
|
|
|
|
/* (O) Nb_Detected : pointeur sur le nombre d'erreurs */
|
|
|
|
|
/* (O) Nb_Corrected : pointeur sur le nombre d'erreurs */
|
|
|
|
|
/* (I) Out : flux de sortie du rapport */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Check_I( NDT_Root *Root, NDT_Index_Id, int *, int *, FILE *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Check_C( NDT_Root *Root, NDT_Index_Id, int *, int *, FILE *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* Conversion d'une structure de donn<6E>es d'un type en un autre */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Target_Type: type de structure cible */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Convert_I ( NDT_Root *, NDT_Index_Id Index_Id, NDT_Index_Type);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Convert_C ( NDT_Root *, NDT_Index_Id Index_Id, NDT_Index_Type);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* R<>organisation d'une structure de donn<6E>es : */
|
|
|
|
|
/* - ordonnancement d'une liste non ordonn<6E>e */
|
|
|
|
|
/* - r<>quilibrage d'un arbre non auto-<2D>quilibr<62> */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Reorg_I( NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Reorg_C( NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Parcours de tous les noeuds d'une structure de donn<6E>es et ex<65>cution d'une */
|
|
|
|
|
/* commande sur chacun d'eux */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Command: Commande <20> ex<65>cuter sur chaque noeud travers<72> */
|
|
|
|
|
/* (I) Data: pointeur de donn<6E>es utilisateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Traverse_VI( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Traverse_VC( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Traverse_I( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Traverse_C( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Parcours de tous les noeuds d'une structure de donn<6E>es et ex<65>cution d'une */
|
|
|
|
|
/* commande sur chacun d'eux */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Command: Commande <20> ex<65>cuter sur chaque noeud travers<72> */
|
|
|
|
|
/* (I) Data: pointeur de donn<6E>es utilisateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Info_Print_I( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Info_Print_C( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Ajout d'une valeur <20> une structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Value: pointeur sur la valeur <20> ajouter */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Add_I( NDT_Root *Root, NDT_Index_Id, void *Value);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Add_C( NDT_Root *Root, NDT_Index_Id, void *Value);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Suppression du premier noeud correspondant <20> une valeur donn<6E>e */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Reference_Value : pointeur sur la valeur de r<>f<EFBFBD>rence */
|
|
|
|
|
/* (I) Removed_Value : adresse d'un pointeur sur la valeur supprim<69>e */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Remove_I( NDT_Root *Root, NDT_Index_Id, void *Value);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Remove_C( NDT_Root *Root, NDT_Index_Id, void *Value);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Affichage de la valeur de tous les noeuds d'une structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/* (I) Out : flux de sortie */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_VI( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_I( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_C( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* Ajout d'un noeud <20> une structure de donn<6E>es */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2001-11-26 11:17:44 +01:00
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Node: pointeur sur le noeud <20> ajouter */
|
2000-07-18 16:51:56 +02:00
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Add_I( NDT_Root * Root, NDT_Index_Id Index_Id, NDT_Node * Node );
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Add_C( NDT_Root * Root, NDT_Index_Id Index_Id, NDT_Node * Node );
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Suppression d'un noeud dans une structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Node: pointeur sur le noeud <20> supprimer de la structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Remove_I( NDT_Node * Node);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Remove_C( NDT_Node * Node);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* R<>cup<75>ration du premier noeud d'une structure */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine dont on cherche le premier noeud */
|
|
|
|
|
/* (O) Node : pointeur sur le noeud <20> r<>cup<75>rer */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_First_Get_I( NDT_Node **, NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_First_Get_C( NDT_Node **, NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* R<>cup<75>ration du dernier noeud d'une structure */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine dont on cherche le dernier noeud */
|
|
|
|
|
/* (O) Node : pointeur sur le noeud <20> r<>cup<75>rer */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Last_Get_I( NDT_Node **, NDT_Root *, NDT_Index_Id);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Last_Get_C( NDT_Node **, NDT_Root *, NDT_Index_Id);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* R<>cup<75>ration du noeud suivant */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Node: pointeur sur le noeud dont on cherche le suivant */
|
|
|
|
|
/* (O) Next_Node : pointeur sur le noeud suivant */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Next_Get_I( NDT_Node **, NDT_Node *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Next_Get_C( NDT_Node **, NDT_Node *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* R<>cup<75>ration du noeud pr<70>c<EFBFBD>dant */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Node: pointeur sur le noeud dont on cherche le pr<70>c<EFBFBD>dant */
|
|
|
|
|
/* (O) Prev_Node : pointeur sur le noeud pr<70>c<EFBFBD>dant */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Previous_Get_I( NDT_Node **, NDT_Node *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Previous_Get_C( NDT_Node **, NDT_Node *);
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Recherche un noeud <20> partir d'une valeur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de l'abre */
|
|
|
|
|
/* (O) Node : pointeur sur le noeud <20> r<>cuperer */
|
|
|
|
|
/* (I) Value : pointeur sur la valeur <20> rechercher */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_VI( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_VC( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_I( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_C( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* R<>cup<75>ration de la racine d'une structure */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (O) Root: Adresse du pointeur sur la racine <20> r<>cup<75>rer */
|
|
|
|
|
/* (I) Node: pointeur sur le noeud dont on cherche la racine */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Node_Root_Get_I( NDT_Root **, NDT_Node *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Node_Root_Get_C( NDT_Root **, NDT_Node *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Allocation d'une valeur d'une structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root : pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (O) Value : adresse d'un pointeur sur la valeur <20> allouer */
|
|
|
|
|
/* (I) ... : arguments relatifs <20> l'allocation de la valeur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Value_Alloc_I( NDT_Root *, void **, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Value_Alloc_C( NDT_Root *, void **, ...);
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* D<>sallocation d'une valeur d'une structure de donn<6E>es */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Root: pointeur sur la racine de la structure de donn<6E>es */
|
|
|
|
|
/* (I) Value: pointeur sur la valeur <20> d<>sallouer */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Value_Free_I( NDT_Root *, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Value_Free_C( NDT_Root *, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Ex<45>cution d'une fonction Manager dont le nom est pass<73> en param<61>tre */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Function : nom de la fonction manager <20> ex<65>cuter */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Manager_Exec_VI( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Manager_Exec_VC( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Manager_Exec_I( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Manager_Exec_C( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Ex<45>cution d'une fonction d'allocation dont le nom est pass<73> en param<61>tre */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Function : nom de la fonction <20> ex<65>cuter */
|
|
|
|
|
/* (O) Ptr : adresse d'un pointeur sur la zone <20> allouer */
|
|
|
|
|
/* (I) Size : taille de la zone <20> allouer */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es utiles <20> l'allocateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Allocator_Exec_I( NDT_Allocator *, void **, size_t, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Allocator_Exec_C( NDT_Allocator *, void **, size_t, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* Ex<45>cution d'une fonction de d<>sallocation le dont nom est pass<73> en param<61>tre */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
|
/* (I) Function : nom de la fonction <20> ex<65>cuter */
|
|
|
|
|
/* (I) Ptr : adresse de la zone <20> d<>sallouer */
|
|
|
|
|
/* (I) Data : pointeur de donn<6E>es utiles au d<>sallocateur */
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
2002-02-27 17:04:10 +01:00
|
|
|
|
NDD_DLL_API NDT_Status ND_Desallocator_Exec_I( NDT_Desallocator *, void *, void *);
|
|
|
|
|
NDD_DLL_API NDT_Status ND_Desallocator_Exec_C( NDT_Desallocator *, void *, void *);
|
2001-11-26 11:17:44 +01:00
|
|
|
|
|
|
|
|
|
|
2000-07-18 16:51:56 +02:00
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|