idmap.c File Reference

#include "idmap_p.h"
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
#include <stdlib.h>
#include <assert.h>
#include <string.h>

Go to the source code of this file.

Functions

void GWEN_IdMap_Clear (GWEN_IDMAP *map)
void GWEN_IdMap_Dump (GWEN_IDMAP *map, FILE *f, int indent)
void * GWEN_IdMap_Find (GWEN_IDMAP *map, uint32_t id)
void GWEN_IdMap_free (GWEN_IDMAP *map)
GWEN_IDMAP_RESULT GWEN_IdMap_GetFirst (const GWEN_IDMAP *map, uint32_t *pid)
GWEN_IDMAP_RESULT GWEN_IdMap_GetNext (const GWEN_IDMAP *map, uint32_t *pid)
uint32_t GWEN_IdMap_GetSize (const GWEN_IDMAP *map)
GWEN_IDMAP_RESULT GWEN_IdMap_Insert (GWEN_IDMAP *map, uint32_t id, void *ptr)
GWEN_IDMAPGWEN_IdMap_new (GWEN_IDMAP_ALGO algo)
GWEN_IDMAP_RESULT GWEN_IdMap_Remove (GWEN_IDMAP *map, uint32_t id)
void GWEN_IdMapHex4__Dump (GWEN_IDMAP_HEX4_TABLE *tbl, FILE *f, int indent)
GWEN_IDMAP_HEX4_TABLE * GWEN_IdMapHex4__GetFirstTable (GWEN_IDMAP_HEX4_TABLE *t, uint32_t *pid)
GWEN_IDMAP_HEX4_TABLE * GWEN_IdMapHex4__GetNextTable (GWEN_IDMAP_HEX4_TABLE *t, uint32_t *pid, int incr)
GWEN_IDMAP_HEX4_TABLE * GWEN_IdMapHex4__GetTable (GWEN_IDMAP_HEX4_TABLE *t, uint32_t id)
void GWEN_IdMapHex4_Dump (GWEN_IDMAP *map, FILE *f, int indent)
void GWEN_IdMapHex4_Extend (GWEN_IDMAP *map)
void * GWEN_IdMapHex4_Find (GWEN_IDMAP *map, uint32_t id)
GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindFirst (const GWEN_IDMAP *map, uint32_t *pid)
GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindNext (const GWEN_IDMAP *map, uint32_t *pid)
void GWEN_IdMapHex4_free (GWEN_IDMAP *map)
GWEN_IDMAP_RESULT GWEN_IdMapHex4_Insert (GWEN_IDMAP *map, uint32_t id, void *ptr)
void GWEN_IdMapHex4Map_free (GWEN_IDMAP_HEX4_TABLE *t)
GWEN_IDMAP_HEX4_TABLE * GWEN_IdMapHex4Map_new (GWEN_IDMAP_HEX4_TABLE *p, int isPtrTable)

Function Documentation

void GWEN_IdMap_Clear ( GWEN_IDMAP map  ) 
void GWEN_IdMap_Dump ( GWEN_IDMAP map,
FILE *  f,
int  indent 
)

Definition at line 146 of file idmap.c.

References DBG_ERROR, and GWEN_LOGDOMAIN.

void* GWEN_IdMap_Find ( GWEN_IDMAP map,
uint32_t  id 
)

Definition at line 95 of file idmap.c.

void GWEN_IdMap_free ( GWEN_IDMAP map  ) 

Definition at line 66 of file idmap.c.

References GWEN_FREE_OBJECT.

Referenced by GWEN_IdMap_new().

GWEN_IDMAP_RESULT GWEN_IdMap_GetFirst ( const GWEN_IDMAP map,
uint32_t *  pid 
)

Return the first id in the map.

Parameters:
map map to browse
pid pointer to a variable to receive the first id in the map. Upon return this variable will be updated to the first id in the map if the result is GWEN_IdMapResult_Ok.

Definition at line 103 of file idmap.c.

GWEN_IDMAP_RESULT GWEN_IdMap_GetNext ( const GWEN_IDMAP map,
uint32_t *  pid 
)

Return the next id in the map.

Parameters:
map map to browse
pid pointer to the id retrieved via GWEN_IdMap_GetFirst. Upon return this variable will be updated to the next id in the map if the result is GWEN_IdMapResult_Ok.

Definition at line 112 of file idmap.c.

uint32_t GWEN_IdMap_GetSize ( const GWEN_IDMAP map  ) 

Definition at line 121 of file idmap.c.

GWEN_IDMAP_RESULT GWEN_IdMap_Insert ( GWEN_IDMAP map,
uint32_t  id,
void *  ptr 
)

Definition at line 75 of file idmap.c.

GWEN_IDMAP* GWEN_IdMap_new ( GWEN_IDMAP_ALGO  algo  ) 
GWEN_IDMAP_RESULT GWEN_IdMap_Remove ( GWEN_IDMAP map,
uint32_t  id 
)

Definition at line 86 of file idmap.c.

void GWEN_IdMapHex4__Dump ( GWEN_IDMAP_HEX4_TABLE *  tbl,
FILE *  f,
int  indent 
)

Definition at line 528 of file idmap.c.

Referenced by GWEN_IdMapHex4_Dump().

GWEN_IDMAP_HEX4_TABLE* GWEN_IdMapHex4__GetFirstTable ( GWEN_IDMAP_HEX4_TABLE *  t,
uint32_t *  pid 
)

Definition at line 401 of file idmap.c.

Referenced by GWEN_IdMapHex4_FindFirst().

GWEN_IDMAP_HEX4_TABLE* GWEN_IdMapHex4__GetNextTable ( GWEN_IDMAP_HEX4_TABLE *  t,
uint32_t *  pid,
int  incr 
)

Definition at line 434 of file idmap.c.

Referenced by GWEN_IdMapHex4_FindNext().

GWEN_IDMAP_HEX4_TABLE* GWEN_IdMapHex4__GetTable ( GWEN_IDMAP_HEX4_TABLE *  t,
uint32_t  id 
)

Definition at line 357 of file idmap.c.

Referenced by GWEN_IdMapHex4_FindNext().

void GWEN_IdMapHex4_Dump ( GWEN_IDMAP map,
FILE *  f,
int  indent 
)

Definition at line 547 of file idmap.c.

References GWEN_IdMapHex4__Dump().

Referenced by GWEN_IdMapHex4_Extend().

void GWEN_IdMapHex4_Extend ( GWEN_IDMAP map  ) 
void* GWEN_IdMapHex4_Find ( GWEN_IDMAP map,
uint32_t  id 
)

Definition at line 321 of file idmap.c.

Referenced by GWEN_IdMapHex4_Extend().

GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindFirst ( const GWEN_IDMAP map,
uint32_t *  pid 
)
GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindNext ( const GWEN_IDMAP map,
uint32_t *  pid 
)
void GWEN_IdMapHex4_free ( GWEN_IDMAP map  ) 

Definition at line 182 of file idmap.c.

References GWEN_FREE_OBJECT, and GWEN_IdMapHex4Map_free().

Referenced by GWEN_IdMapHex4_Extend().

GWEN_IDMAP_RESULT GWEN_IdMapHex4_Insert ( GWEN_IDMAP map,
uint32_t  id,
void *  ptr 
)
void GWEN_IdMapHex4Map_free ( GWEN_IDMAP_HEX4_TABLE *  t  ) 

Definition at line 204 of file idmap.c.

References GWEN_FREE_OBJECT.

Referenced by GWEN_IdMapHex4_free(), and GWEN_IdMapHex4_Insert().

GWEN_IDMAP_HEX4_TABLE* GWEN_IdMapHex4Map_new ( GWEN_IDMAP_HEX4_TABLE *  p,
int  isPtrTable 
)

Definition at line 192 of file idmap.c.

References GWEN_NEW_OBJECT.

Referenced by GWEN_IdMapHex4_Extend(), and GWEN_IdMapHex4_Insert().


Generated on Sat Jan 2 09:32:37 2010 for gwenhywfar by  doxygen 1.6.1