ze-filter  (ze-filter-0.8.0-develop-180218)
zeBTree.c File Reference
#include <ze-sys.h>
#include <zeBTree.h>
#include "libze.h"

Go to the source code of this file.

Classes

struct  ZEBTREC_T
 

Macros

#define _DB_LH   -1
 
#define _DB_EH   0
 
#define _DB_RH   1
 
#define JBT_LOCK(mutex)   MUTEX_LOCK(mutex)
 
#define JBT_UNLOCK(mutex)   MUTEX_UNLOCK(mutex)
 
#define JBT_ZERO(jbth)
 
#define MAX_BTERR   16
 

Functions

int zeBTree_Max_Height (ZEBT_T *)
 
bool zeBTree_Init (ZEBT_T *jdbh, size_t size, ZEBT_CMP_F reccmp)
 
bool zeBTree_Lock (ZEBT_T *jdbh)
 
bool zeBTree_unLock (ZEBT_T *jdbh)
 
bool zeBTree_Set_BTree_Size (ZEBT_T *jdbh, bool chkCount, int maxCount)
 
bool zeBTree_Destroy (ZEBT_T *jdbh)
 
bool zeBTree_Clear (ZEBT_T *jdbh)
 
int zeBTree_Count (ZEBT_T *jdbh)
 
int zeBTree_Browse (ZEBT_T *jdbh, ZEBT_BROWSE_F func, void *data)
 
void * zeBTree_Get (ZEBT_T *jdbh, void *data)
 
bool zeBTree_Add (ZEBT_T *jdbh, void *data)
 
bool zeBTree_Del (ZEBT_T *jdbh, void *data)
 
bool zeBTree_Cpy (ZEBT_T *dst, ZEBT_T *org, ZEBT_SEL_F getit, void *arg)
 
bool zeBTree_Cleanup (ZEBT_T *jdbh, ZEBT_SEL_F getit, void *arg)
 

Macro Definition Documentation

◆ _DB_EH

#define _DB_EH   0

Definition at line 37 of file zeBTree.c.

◆ _DB_LH

#define _DB_LH   -1

Definition at line 36 of file zeBTree.c.

◆ _DB_RH

#define _DB_RH   1

Definition at line 38 of file zeBTree.c.

◆ JBT_LOCK

#define JBT_LOCK (   mutex)    MUTEX_LOCK(mutex)

Definition at line 76 of file zeBTree.c.

◆ JBT_UNLOCK

#define JBT_UNLOCK (   mutex)    MUTEX_UNLOCK(mutex)

Definition at line 77 of file zeBTree.c.

◆ JBT_ZERO

#define JBT_ZERO (   jbth)
Value:
do { \
jbth->signature = SIGNATURE; \
jbth->count = 0; \
jbth->size = 0; \
jbth->reccmp = NULL; \
jbth->root = NULL; \
jbth->chkCount = FALSE; \
jbth->maxCount = MAX_BTNODES; \
jbth->nbErr = 0; \
} while (0)
#define FALSE
Definition: macros.h:160
#define MAX_BTNODES
Definition: zeBTree.h:66
#define SIGNATURE
Definition: ze-libjc.h:75

Definition at line 79 of file zeBTree.c.

◆ MAX_BTERR

#define MAX_BTERR   16

Definition at line 306 of file zeBTree.c.

Function Documentation

◆ zeBTree_Max_Height()

int zeBTree_Max_Height ( ZEBT_T jdbh)

Definition at line 920 of file zeBTree.c.