gwenhywfar  4.99.15beta
Functions
Pointer list module

A list of pointers. More...

Collaboration diagram for Pointer list module:

Functions

GWENHYWFAR_API int GWEN_PointerList_AddPtr (GWEN_POINTERLIST *idl, void *ptr)
 
GWENHYWFAR_API int GWEN_PointerList_AppendPtr (GWEN_POINTERLIST *idl, void *ptr)
 
GWENHYWFAR_API void GWEN_PointerList_Attach (GWEN_POINTERLIST *idl)
 
GWENHYWFAR_API void GWEN_PointerList_Clear (GWEN_POINTERLIST *idl)
 
GWENHYWFAR_API int GWEN_PointerList_DelPtr (GWEN_POINTERLIST *idl, void *ptr)
 
GWENHYWFAR_API GWEN_POINTERLISTGWEN_PointerList_dup (const GWEN_POINTERLIST *idl)
 
GWENHYWFAR_API void GWEN_PointerList_free (GWEN_POINTERLIST *idl)
 
GWENHYWFAR_API uint64_t GWEN_PointerList_GetEntryCount (const GWEN_POINTERLIST *idl)
 
GWENHYWFAR_API void * GWEN_PointerList_GetFirstPtr (const GWEN_POINTERLIST *idl, uint64_t *hdl)
 
GWENHYWFAR_API void * GWEN_PointerList_GetNextPtr (const GWEN_POINTERLIST *idl, uint64_t *hdl)
 
GWENHYWFAR_API void * GWEN_PointerList_GetPtrAt (const GWEN_POINTERLIST *idl, uint64_t index)
 
GWENHYWFAR_API int GWEN_PointerList_HasPtr (const GWEN_POINTERLIST *idl, void *ptr)
 
GWENHYWFAR_API GWEN_POINTERLISTGWEN_PointerList_new (void)
 

Detailed Description

A list of pointers.

This is basically a list for pointers, but since it uses tables instead of those list objects normally used throughout Gwen it is less memory consuming.

Function Documentation

◆ GWEN_PointerList_AddPtr()

GWENHYWFAR_API int GWEN_PointerList_AddPtr ( GWEN_POINTERLIST idl,
void *  ptr 
)

Adds a ptr to the list. This function does no doublecheck.

Definition at line 260 of file pointerlist.c.

References GWEN_PointerList_AddTable(), GWEN_PointerListTable_AddPtr(), GWEN_PointerListTable_IsFull(), GWEN_PointerListTable_new(), and NULL.

Here is the call graph for this function:

◆ GWEN_PointerList_AppendPtr()

GWENHYWFAR_API int GWEN_PointerList_AppendPtr ( GWEN_POINTERLIST idl,
void *  ptr 
)

Always append ptr at the end of the list.

Definition at line 539 of file pointerlist.c.

References GWEN_PointerList_AddTable(), GWEN_PointerListTable_AppendPtr(), GWEN_PointerListTable_IsFull(), GWEN_PointerListTable_new(), and NULL.

Here is the call graph for this function:

◆ GWEN_PointerList_Attach()

GWENHYWFAR_API void GWEN_PointerList_Attach ( GWEN_POINTERLIST idl)

Definition at line 197 of file pointerlist.c.

Referenced by GWEN_PointerList_Iterator_new().

Here is the caller graph for this function:

◆ GWEN_PointerList_Clear()

GWENHYWFAR_API void GWEN_PointerList_Clear ( GWEN_POINTERLIST idl)

Removes all ptrs from the list thus leaving it empty.

Definition at line 353 of file pointerlist.c.

References GWEN_PointerListTable_free(), and NULL.

Referenced by GWEN_PointerList_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_PointerList_DelPtr()

GWENHYWFAR_API int GWEN_PointerList_DelPtr ( GWEN_POINTERLIST idl,
void *  ptr 
)

Removes the first occurrence of the given ptr.

Returns
0 if deleted, !=0 if the ptr wasn't found

Definition at line 294 of file pointerlist.c.

References GWEN_PointerList_Clean(), GWEN_PointerListTable_DelPtr(), and NULL.

Here is the call graph for this function:

◆ GWEN_PointerList_dup()

GWENHYWFAR_API GWEN_POINTERLIST* GWEN_PointerList_dup ( const GWEN_POINTERLIST idl)

Returns a new id list which contains all the ids of the given list in the same order. However, the list returned might be more is compact (i.e. it has fewer wholes), so the positions of ids within the list might have changed!.

Definition at line 376 of file pointerlist.c.

References GWEN_PointerList_AddTable(), GWEN_PointerList_new(), GWEN_PointerListTable_IsEmpty(), and GWEN_PointerListTable_new().

Here is the call graph for this function:

◆ GWEN_PointerList_free()

GWENHYWFAR_API void GWEN_PointerList_free ( GWEN_POINTERLIST idl)

Destructor.

Definition at line 206 of file pointerlist.c.

References GWEN_FREE_OBJECT, and GWEN_PointerList_Clear().

Referenced by GWEN_PointerList_Iterator_free().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_PointerList_GetEntryCount()

GWENHYWFAR_API uint64_t GWEN_PointerList_GetEntryCount ( const GWEN_POINTERLIST idl)

Definition at line 407 of file pointerlist.c.

◆ GWEN_PointerList_GetFirstPtr()

GWENHYWFAR_API void* GWEN_PointerList_GetFirstPtr ( const GWEN_POINTERLIST idl,
uint64_t *  hdl 
)

Definition at line 417 of file pointerlist.c.

References GWEN_PointerListTable_IsEmpty(), and NULL.

Referenced by GWEN_PointerList_Iterator_GetFirstId().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_PointerList_GetNextPtr()

GWENHYWFAR_API void* GWEN_PointerList_GetNextPtr ( const GWEN_POINTERLIST idl,
uint64_t *  hdl 
)

Definition at line 447 of file pointerlist.c.

References DBG_ERROR, GWEN_LOGDOMAIN, GWEN_PointerListTable_IsEmpty(), and NULL.

Referenced by GWEN_PointerList_Iterator_GetNextId().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_PointerList_GetPtrAt()

GWENHYWFAR_API void* GWEN_PointerList_GetPtrAt ( const GWEN_POINTERLIST idl,
uint64_t  index 
)

Definition at line 566 of file pointerlist.c.

References DBG_INFO, GWEN_LOGDOMAIN, and NULL.

◆ GWEN_PointerList_HasPtr()

GWENHYWFAR_API int GWEN_PointerList_HasPtr ( const GWEN_POINTERLIST idl,
void *  ptr 
)

Checks whether the given ptr exists in the ptrlist.

Returns
0 if found, !=0 otherwise

Definition at line 317 of file pointerlist.c.

References GWEN_PointerListTable_HasPtr(), and NULL.

Here is the call graph for this function:

◆ GWEN_PointerList_new()

GWENHYWFAR_API GWEN_POINTERLIST* GWEN_PointerList_new ( void  )

Constructor.

Definition at line 185 of file pointerlist.c.

References GWEN_NEW_OBJECT.

Referenced by GWEN_PointerList_dup().

Here is the caller graph for this function: