#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_IDMAP * | GWEN_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) |
void GWEN_IdMap_Clear | ( | GWEN_IDMAP * | map | ) |
Definition at line 128 of file idmap.c.
References DBG_ERROR, GWEN_IdMapAlgo_Hex4, GWEN_IdMapAlgo_Unknown, GWEN_IdMapHex4_Extend(), and GWEN_LOGDOMAIN.
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 | |||
) |
Return the first id in the map.
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. |
GWEN_IDMAP_RESULT GWEN_IdMap_GetNext | ( | const GWEN_IDMAP * | map, | |
uint32_t * | pid | |||
) |
Return the next id in the map.
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. |
uint32_t GWEN_IdMap_GetSize | ( | const GWEN_IDMAP * | map | ) |
GWEN_IDMAP_RESULT GWEN_IdMap_Insert | ( | GWEN_IDMAP * | map, | |
uint32_t | id, | |||
void * | ptr | |||
) |
GWEN_IDMAP* GWEN_IdMap_new | ( | GWEN_IDMAP_ALGO | algo | ) |
Definition at line 45 of file idmap.c.
References DBG_ERROR, GWEN_IdMap_free(), GWEN_IdMapAlgo_Hex4, GWEN_IdMapAlgo_Unknown, GWEN_IdMapHex4_Extend(), GWEN_LOGDOMAIN, and GWEN_NEW_OBJECT.
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 | |||
) |
Definition at line 547 of file idmap.c.
References GWEN_IdMapHex4__Dump().
Referenced by GWEN_IdMapHex4_Extend().
void GWEN_IdMapHex4_Extend | ( | GWEN_IDMAP * | map | ) |
Definition at line 166 of file idmap.c.
References GWEN_IdMapHex4_Dump(), GWEN_IdMapHex4_Find(), GWEN_IdMapHex4_FindFirst(), GWEN_IdMapHex4_FindNext(), GWEN_IdMapHex4_free(), GWEN_IdMapHex4_Insert(), GWEN_IdMapHex4Map_new(), and GWEN_NEW_OBJECT.
Referenced by GWEN_IdMap_Clear(), and GWEN_IdMap_new().
void* GWEN_IdMapHex4_Find | ( | GWEN_IDMAP * | map, | |
uint32_t | id | |||
) |
GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindFirst | ( | const GWEN_IDMAP * | map, | |
uint32_t * | pid | |||
) |
Definition at line 484 of file idmap.c.
References GWEN_IdMapHex4__GetFirstTable(), GWEN_IdMapResult_NotFound, and GWEN_IdMapResult_Ok.
Referenced by GWEN_IdMapHex4_Extend().
GWEN_IDMAP_RESULT GWEN_IdMapHex4_FindNext | ( | const GWEN_IDMAP * | map, | |
uint32_t * | pid | |||
) |
Definition at line 504 of file idmap.c.
References GWEN_IdMapHex4__GetNextTable(), GWEN_IdMapHex4__GetTable(), GWEN_IdMapResult_NotFound, and GWEN_IdMapResult_Ok.
Referenced by GWEN_IdMapHex4_Extend().
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 | |||
) |
Definition at line 220 of file idmap.c.
References GWEN_IdMapHex4Map_free(), GWEN_IdMapHex4Map_new(), GWEN_IdMapResult_NotFound, and GWEN_IdMapResult_Ok.
Referenced by GWEN_IdMapHex4_Extend().
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().