gwenhywfar
4.15.3
|
A list of uint32_t objects. More...
Functions | |
GWENHYWFAR_API int | GWEN_IdList_AddId (GWEN_IDLIST *idl, uint32_t id) |
GWENHYWFAR_API void | GWEN_IdList_Clear (GWEN_IDLIST *idl) |
GWENHYWFAR_API int | GWEN_IdList_DelId (GWEN_IDLIST *idl, uint32_t id) |
GWENHYWFAR_API GWEN_IDLIST * | GWEN_IdList_dup (const GWEN_IDLIST *idl) |
GWENHYWFAR_API void | GWEN_IdList_free (GWEN_IDLIST *idl) |
GWENHYWFAR_API uint32_t | GWEN_IdList_GetFirstId (GWEN_IDLIST *idl) |
GWENHYWFAR_API uint32_t | GWEN_IdList_GetFirstId2 (const GWEN_IDLIST *idl, uint32_t *hdl) |
GWENHYWFAR_API uint32_t | GWEN_IdList_GetNextId (GWEN_IDLIST *idl) |
GWENHYWFAR_API uint32_t | GWEN_IdList_GetNextId2 (const GWEN_IDLIST *idl, uint32_t *hdl) |
GWENHYWFAR_API int | GWEN_IdList_HasId (const GWEN_IDLIST *idl, uint32_t id) |
GWENHYWFAR_API GWEN_IDLIST * | GWEN_IdList_new (void) |
GWENHYWFAR_API int | GWEN_IdList_Sort (GWEN_IDLIST *idl) |
A list of uint32_t objects.
This is basically a list for uint32_t objects, but since it uses tables instead of those list objects normally used throughout Gwen it is less memory consuming.
GWENHYWFAR_API int GWEN_IdList_AddId | ( | GWEN_IDLIST * | idl, |
uint32_t | id | ||
) |
Adds an id to the list. This function does no doublecheck.
GWENHYWFAR_API void GWEN_IdList_Clear | ( | GWEN_IDLIST * | idl | ) |
Removes all ids from the list thus leaving it empty.
GWENHYWFAR_API int GWEN_IdList_DelId | ( | GWEN_IDLIST * | idl, |
uint32_t | id | ||
) |
Removes the first occurrence of the given id.
GWENHYWFAR_API GWEN_IDLIST* GWEN_IdList_dup | ( | const GWEN_IDLIST * | idl | ) |
Returns a new id list which contains all the ids of the given list in the same order. However, the list returned is compact (i.e. it has no wholes).
GWENHYWFAR_API void GWEN_IdList_free | ( | GWEN_IDLIST * | idl | ) |
Destructor.
GWENHYWFAR_API uint32_t GWEN_IdList_GetFirstId | ( | GWEN_IDLIST * | idl | ) |
Returns the first id from the list.
GWENHYWFAR_API uint32_t GWEN_IdList_GetFirstId2 | ( | const GWEN_IDLIST * | idl, |
uint32_t * | hdl | ||
) |
This function returns the first id stored in the list. It can also be used with const GWEN_IDLIST.
hdl | pointer to a 32 bit value to receive a handle to be used by GWEN_IdList_GetNextId2. This handle is only valid as longs as no ids are removed from the list. |
GWENHYWFAR_API uint32_t GWEN_IdList_GetNextId | ( | GWEN_IDLIST * | idl | ) |
GWENHYWFAR_API uint32_t GWEN_IdList_GetNextId2 | ( | const GWEN_IDLIST * | idl, |
uint32_t * | hdl | ||
) |
This function returns the next id stored in the list. It can also be used with const GWEN_IDLIST.
hdl | pointer to a 32 bit value to receive a handle to be used by GWEN_IdList_GetNextId2. This handle is only valid as longs as no ids are removed from the list. |
GWENHYWFAR_API int GWEN_IdList_HasId | ( | const GWEN_IDLIST * | idl, |
uint32_t | id | ||
) |
Checks whether the given id exists in the idlist.
GWENHYWFAR_API GWEN_IDLIST* GWEN_IdList_new | ( | void | ) |
Constructor.
GWENHYWFAR_API int GWEN_IdList_Sort | ( | GWEN_IDLIST * | idl | ) |
Sorts the ids in ascending order