gwenhywfar 5.12.0
refptr.h File Reference
#include <gwenhywfar/types.h>
#include <gwenhywfar/gwenhywfarapi.h>
Include dependency graph for refptr.h:

Go to the source code of this file.

Macros

#define GWEN_REFPTR_FLAGS_AUTODELETE   0x00000001

Typedefs

typedef struct GWEN_REFPTR GWEN_REFPTR
typedef struct GWEN_REFPTR_INFO GWEN_REFPTR_INFO
Prototypes for Virtual Functions
typedef void *(* GWEN_REFPTR_INFO_DUP_FN) (void *dp)
typedef void(* GWEN_REFPTR_INFO_FREE_FN) (void *dp)

Functions

Constructor, Destructor, Copy, Duplicate functions
GWENHYWFAR_API GWEN_REFPTRGWEN_RefPtr_copy (const GWEN_REFPTR *rp)
GWENHYWFAR_API GWEN_REFPTRGWEN_RefPtr_dup (const GWEN_REFPTR *rp)
GWENHYWFAR_API void GWEN_RefPtr_free (GWEN_REFPTR *rp)
GWENHYWFAR_API GWEN_REFPTRGWEN_RefPtr_new (void *dp, GWEN_REFPTR_INFO *rpi)
GWENHYWFAR_API void GWEN_RefPtrInfo_Attach (GWEN_REFPTR_INFO *rpi)
GWENHYWFAR_API void GWEN_RefPtrInfo_free (GWEN_REFPTR_INFO *rpi)
GWENHYWFAR_API GWEN_REFPTR_INFOGWEN_RefPtrInfo_new (void)
Data Functions
GWENHYWFAR_API void * GWEN_RefPtr_GetData (const GWEN_REFPTR *rp)
GWENHYWFAR_API void GWEN_RefPtr_SetData (GWEN_REFPTR *rp, void *dp, GWEN_REFPTR_INFO *rpi)
Getting and Setting Flags

These flags are used for newly created GWEN_REFPTR to provide a default value. Please see GWEN_REFPTR_FLAGS_AUTODELETE and following.

GWENHYWFAR_API void GWEN_RefPtr_AddFlags (GWEN_REFPTR *rp, uint32_t fl)
GWENHYWFAR_API void GWEN_RefPtr_DelFlags (GWEN_REFPTR *rp, uint32_t fl)
GWENHYWFAR_API uint32_t GWEN_RefPtr_GetFlags (const GWEN_REFPTR *rp)
GWENHYWFAR_API void GWEN_RefPtr_SetFlags (GWEN_REFPTR *rp, uint32_t fl)
GWENHYWFAR_API void GWEN_RefPtrInfo_AddFlags (GWEN_REFPTR_INFO *rpi, uint32_t fl)
GWENHYWFAR_API void GWEN_RefPtrInfo_DelFlags (GWEN_REFPTR_INFO *rpi, uint32_t fl)
GWENHYWFAR_API uint32_t GWEN_RefPtrInfo_GetFlags (const GWEN_REFPTR_INFO *rpi)
GWENHYWFAR_API void GWEN_RefPtrInfo_SetFlags (GWEN_REFPTR_INFO *rpi, uint32_t fl)
Setters for Virtual Functions
GWENHYWFAR_API void GWEN_RefPtrInfo_SetDupFn (GWEN_REFPTR_INFO *rpi, GWEN_REFPTR_INFO_DUP_FN f)
GWENHYWFAR_API void GWEN_RefPtrInfo_SetFreeFn (GWEN_REFPTR_INFO *rpi, GWEN_REFPTR_INFO_FREE_FN f)

Macro Definition Documentation

◆ GWEN_REFPTR_FLAGS_AUTODELETE

#define GWEN_REFPTR_FLAGS_AUTODELETE   0x00000001

Typedef Documentation

◆ GWEN_REFPTR

typedef struct GWEN_REFPTR GWEN_REFPTR

Definition at line 45 of file refptr.h.

◆ GWEN_REFPTR_INFO

Definition at line 44 of file refptr.h.

◆ GWEN_REFPTR_INFO_DUP_FN

typedef void *(* GWEN_REFPTR_INFO_DUP_FN) (void *dp)

Definition at line 152 of file refptr.h.

◆ GWEN_REFPTR_INFO_FREE_FN

typedef void(* GWEN_REFPTR_INFO_FREE_FN) (void *dp)

Definition at line 151 of file refptr.h.

Function Documentation

◆ GWEN_RefPtr_AddFlags()

GWENHYWFAR_API void GWEN_RefPtr_AddFlags ( GWEN_REFPTR * rp,
uint32_t fl )

Definition at line 291 of file refptr.c.

References DBG_INFO, and GWEN_LOGDOMAIN.

Referenced by GWEN_StringList2_AppendString(), and GWEN_StringList2_InsertString().

Here is the caller graph for this function:

◆ GWEN_RefPtr_copy()

GWENHYWFAR_API GWEN_REFPTR * GWEN_RefPtr_copy ( const GWEN_REFPTR * rp)

Definition at line 221 of file refptr.c.

References GWEN_RefPtr_new().

Here is the call graph for this function:

◆ GWEN_RefPtr_DelFlags()

GWENHYWFAR_API void GWEN_RefPtr_DelFlags ( GWEN_REFPTR * rp,
uint32_t fl )

Definition at line 303 of file refptr.c.

References DBG_INFO, and GWEN_LOGDOMAIN.

◆ GWEN_RefPtr_dup()

GWENHYWFAR_API GWEN_REFPTR * GWEN_RefPtr_dup ( const GWEN_REFPTR * rp)

Definition at line 208 of file refptr.c.

References GWEN_NEW_OBJECT, and GWEN_RefPtrObject_Attach().

Referenced by GWEN__ListPtr_dup().

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

◆ GWEN_RefPtr_free()

GWENHYWFAR_API void GWEN_RefPtr_free ( GWEN_REFPTR * rp)

Definition at line 197 of file refptr.c.

References DBG_VERBOUS, GWEN_FREE_OBJECT, GWEN_LOGDOMAIN, and GWEN_RefPtrObject_free().

Referenced by GWEN_ListEntry_free().

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

◆ GWEN_RefPtr_GetData()

GWENHYWFAR_API void * GWEN_RefPtr_GetData ( const GWEN_REFPTR * rp)

◆ GWEN_RefPtr_GetFlags()

GWENHYWFAR_API uint32_t GWEN_RefPtr_GetFlags ( const GWEN_REFPTR * rp)

Definition at line 268 of file refptr.c.

References DBG_INFO, and GWEN_LOGDOMAIN.

◆ GWEN_RefPtr_new()

GWENHYWFAR_API GWEN_REFPTR * GWEN_RefPtr_new ( void * dp,
GWEN_REFPTR_INFO * rpi )

Definition at line 184 of file refptr.c.

References GWEN_NEW_OBJECT, and GWEN_RefPtrObject_new().

Referenced by GWEN_List_PushBack(), GWEN_List_PushFront(), GWEN_RefPtr_copy(), GWEN_StringList2_AppendString(), and GWEN_StringList2_InsertString().

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

◆ GWEN_RefPtr_SetData()

GWENHYWFAR_API void GWEN_RefPtr_SetData ( GWEN_REFPTR * rp,
void * dp,
GWEN_REFPTR_INFO * rpi )

Definition at line 256 of file refptr.c.

References GWEN_RefPtrObject_free(), and GWEN_RefPtrObject_new().

Here is the call graph for this function:

◆ GWEN_RefPtr_SetFlags()

GWENHYWFAR_API void GWEN_RefPtr_SetFlags ( GWEN_REFPTR * rp,
uint32_t fl )

Definition at line 279 of file refptr.c.

References DBG_INFO, and GWEN_LOGDOMAIN.

◆ GWEN_RefPtrInfo_AddFlags()

GWENHYWFAR_API void GWEN_RefPtrInfo_AddFlags ( GWEN_REFPTR_INFO * rpi,
uint32_t fl )

Definition at line 99 of file refptr.c.

◆ GWEN_RefPtrInfo_Attach()

GWENHYWFAR_API void GWEN_RefPtrInfo_Attach ( GWEN_REFPTR_INFO * rpi)

Definition at line 147 of file refptr.c.

Referenced by GWEN_List_SetRefPtrInfo(), and GWEN_RefPtrObject_new().

Here is the caller graph for this function:

◆ GWEN_RefPtrInfo_DelFlags()

GWENHYWFAR_API void GWEN_RefPtrInfo_DelFlags ( GWEN_REFPTR_INFO * rpi,
uint32_t fl )

Definition at line 107 of file refptr.c.

◆ GWEN_RefPtrInfo_free()

GWENHYWFAR_API void GWEN_RefPtrInfo_free ( GWEN_REFPTR_INFO * rpi)

Definition at line 134 of file refptr.c.

References DBG_VERBOUS, GWEN_FREE_OBJECT, and GWEN_LOGDOMAIN.

Referenced by GWEN_List_free(), GWEN_List_SetRefPtrInfo(), and GWEN_StringList2_new().

Here is the caller graph for this function:

◆ GWEN_RefPtrInfo_GetFlags()

GWENHYWFAR_API uint32_t GWEN_RefPtrInfo_GetFlags ( const GWEN_REFPTR_INFO * rpi)

Definition at line 83 of file refptr.c.

◆ GWEN_RefPtrInfo_new()

GWENHYWFAR_API GWEN_REFPTR_INFO * GWEN_RefPtrInfo_new ( void )

Definition at line 122 of file refptr.c.

References GWEN_NEW_OBJECT.

Referenced by GWEN_StringList2_new().

Here is the caller graph for this function:

◆ GWEN_RefPtrInfo_SetDupFn()

GWENHYWFAR_API void GWEN_RefPtrInfo_SetDupFn ( GWEN_REFPTR_INFO * rpi,
GWEN_REFPTR_INFO_DUP_FN f )

Definition at line 165 of file refptr.c.

◆ GWEN_RefPtrInfo_SetFlags()

GWENHYWFAR_API void GWEN_RefPtrInfo_SetFlags ( GWEN_REFPTR_INFO * rpi,
uint32_t fl )

Definition at line 91 of file refptr.c.

◆ GWEN_RefPtrInfo_SetFreeFn()

GWENHYWFAR_API void GWEN_RefPtrInfo_SetFreeFn ( GWEN_REFPTR_INFO * rpi,
GWEN_REFPTR_INFO_FREE_FN f )

Definition at line 156 of file refptr.c.

Referenced by GWEN_StringList2_new().

Here is the caller graph for this function: