multicache.h File Reference
`#include <gwenhywfar/list1.h>`
`#include <gwenhywfar/misc.h>`
`#include <gwenhywfar/idlist64.h>`

Go to the source code of this file.

## Typedefs

typedef struct GWEN_MULTICACHE | GWEN_MULTICACHE
typedef struct GWEN_MULTICACHE_TYPE | GWEN_MULTICACHE_TYPE
typedef int GWENHYWFAR_CB(* | GWEN_MULTICACHE_TYPE_ATTACH_FN) (void *p)
typedef int GWENHYWFAR_CB(* | GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN) (const GWEN_MULTICACHE_TYPE *ct, void *p)
typedef int GWENHYWFAR_CB(* | GWEN_MULTICACHE_TYPE_FREE_FN) (void *p)
typedef int GWENHYWFAR_CB(* | GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN) (const GWEN_MULTICACHE_TYPE *ct, void *p)

## Functions

Per-type Cache Objects
This object describes one of the data types which can be managed by a central cache object.
GWENHYWFAR_API void | GWEN_MultiCache_Type_free (GWEN_MULTICACHE_TYPE *ct)
GWENHYWFAR_API void * | GWEN_MultiCache_Type_GetData (const GWEN_MULTICACHE_TYPE *ct, uint32_t id)
GWENHYWFAR_API void * | GWEN_MultiCache_Type_GetDataWithParams (const GWEN_MULTICACHE_TYPE *ct, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4)
GWENHYWFAR_API void * | GWEN_MultiCache_Type_GetDataWithParams5 (const GWEN_MULTICACHE_TYPE *ct, uint32_t id, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, double param5)
GWENHYWFAR_API GWEN_IDLIST64 * | GWEN_MultiCache_Type_GetIdsInCache (const GWEN_MULTICACHE_TYPE *ct)
GWENHYWFAR_API GWEN_MULTICACHE_TYPE * | GWEN_MultiCache_Type_new (GWEN_MULTICACHE *mc)
GWENHYWFAR_API void | GWEN_MultiCache_Type_PurgeAll (GWEN_MULTICACHE_TYPE *ct)
GWENHYWFAR_API void | GWEN_MultiCache_Type_PurgeData (GWEN_MULTICACHE_TYPE *ct, uint32_t id)
GWENHYWFAR_API void | GWEN_MultiCache_Type_SetAttachFn (GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_ATTACH_FN fn)
GWENHYWFAR_API void | GWEN_MultiCache_Type_SetAttachObjectFn (GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN fn)
GWENHYWFAR_API void | GWEN_MultiCache_Type_SetData (GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size)
GWENHYWFAR_API void | GWEN_MultiCache_Type_SetDataWithParams (GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4)
GWENHYWFAR_API void | GWEN_MultiCache_Type_SetDataWithParams5 (GWEN_MULTICACHE_TYPE *ct, uint32_t id, void *ptr, uint32_t size, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4, double param5)
GWENHYWFAR_API void | GWEN_MultiCache_Type_SetFreeFn (GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_FREE_FN fn)
GWENHYWFAR_API void | GWEN_MultiCache_Type_SetFreeObjectFn (GWEN_MULTICACHE_TYPE *ct, GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN fn)
Central Cache Object
This is the central cache object which can hold multiple types of data.
GWENHYWFAR_API void | GWEN_MultiCache_free (GWEN_MULTICACHE *mc)
GWENHYWFAR_API uint64_t | GWEN_MultiCache_GetMaxSizeUsed (const GWEN_MULTICACHE *mc)
GWENHYWFAR_API int | GWEN_MultiCache_GetUsageString (const GWEN_MULTICACHE *mc, char *ptrBuffer, int lenBuffer)
GWENHYWFAR_API GWEN_MULTICACHE * | GWEN_MultiCache_new (uint64_t maxSize)

## Typedef Documentation

## GWEN_MULTICACHE

typedef struct GWEN_MULTICACHE GWEN_MULTICACHE

Definition at line 59 of file multicache.h.

## GWEN_MULTICACHE_TYPE

typedef struct GWEN_MULTICACHE_TYPE GWEN_MULTICACHE_TYPE

Definition at line 60 of file multicache.h.

## GWEN_MULTICACHE_TYPE_ATTACH_FN

typedef int GWENHYWFAR_CB(* GWEN_MULTICACHE_TYPE_ATTACH_FN) (void *p)

Definition at line 63 of file multicache.h.

## GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN

typedef int GWENHYWFAR_CB(* GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN) (const GWEN_MULTICACHE_TYPE *ct, void *p)

Definition at line 66 of file multicache.h.

## GWEN_MULTICACHE_TYPE_FREE_FN

typedef int GWENHYWFAR_CB(* GWEN_MULTICACHE_TYPE_FREE_FN) (void *p)

Definition at line 64 of file multicache.h.

## GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN

typedef int GWENHYWFAR_CB(* GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN) (const GWEN_MULTICACHE_TYPE *ct, void *p)

Definition at line 67 of file multicache.h.

## Function Documentation

## GWEN_MultiCache_free()

GWENHYWFAR_API void GWEN_MultiCache_free | ( | GWEN_MULTICACHE * | mc | ) |

References GWENHYWFAR_API.

## GWEN_MultiCache_GetMaxSizeUsed()

GWENHYWFAR_API uint64_t GWEN_MultiCache_GetMaxSizeUsed | ( | const GWEN_MULTICACHE * | mc | ) |

References GWENHYWFAR_API.

## GWEN_MultiCache_GetUsageString()

GWENHYWFAR_API int GWEN_MultiCache_GetUsageString | ( | const GWEN_MULTICACHE * | mc,
|  | char * | ptrBuffer,
|  | int | lenBuffer )

References GWENHYWFAR_API.

## GWEN_MultiCache_new()

GWENHYWFAR_API GWEN_MULTICACHE * GWEN_MultiCache_new | ( | uint64_t | maxSize | ) |

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_free()

GWENHYWFAR_API void GWEN_MultiCache_Type_free | ( | GWEN_MULTICACHE_TYPE * | ct | ) |

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_GetData()

GWENHYWFAR_API void * GWEN_MultiCache_Type_GetData | ( | const GWEN_MULTICACHE_TYPE * | ct,
|  | uint32_t | id )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_GetDataWithParams()

GWENHYWFAR_API void * GWEN_MultiCache_Type_GetDataWithParams | ( | const GWEN_MULTICACHE_TYPE * | ct,
|  | uint32_t | id,
|  | uint32_t | param1,
|  | uint32_t | param2,
|  | uint32_t | param3,
|  | uint32_t | param4 )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_GetDataWithParams5()

GWENHYWFAR_API void * GWEN_MultiCache_Type_GetDataWithParams5 | ( | const GWEN_MULTICACHE_TYPE * | ct,
|  | uint32_t | id,
|  | uint32_t | param1,
|  | uint32_t | param2,
|  | uint32_t | param3,
|  | uint32_t | param4,
|  | double | param5 )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_GetIdsInCache()

GWENHYWFAR_API GWEN_IDLIST64 * GWEN_MultiCache_Type_GetIdsInCache | ( | const GWEN_MULTICACHE_TYPE * | ct | ) |

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_new()

GWENHYWFAR_API GWEN_MULTICACHE_TYPE * GWEN_MultiCache_Type_new | ( | GWEN_MULTICACHE * | mc | ) |

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_PurgeAll()

GWENHYWFAR_API void GWEN_MultiCache_Type_PurgeAll | ( | GWEN_MULTICACHE_TYPE * | ct | ) |

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_PurgeData()

GWENHYWFAR_API void GWEN_MultiCache_Type_PurgeData | ( | GWEN_MULTICACHE_TYPE * | ct,
|  | uint32_t | id )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_SetAttachFn()

GWENHYWFAR_API void GWEN_MultiCache_Type_SetAttachFn | ( | GWEN_MULTICACHE_TYPE * | ct,
|  | GWEN_MULTICACHE_TYPE_ATTACH_FN | fn )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_SetAttachObjectFn()

GWENHYWFAR_API void GWEN_MultiCache_Type_SetAttachObjectFn | ( | GWEN_MULTICACHE_TYPE * | ct,
|  | GWEN_MULTICACHE_TYPE_ATTACH_OBJECT_FN | fn )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_SetData()

GWENHYWFAR_API void GWEN_MultiCache_Type_SetData | ( | GWEN_MULTICACHE_TYPE * | ct,
|  | uint32_t | id,
|  | void * | ptr,
|  | uint32_t | size )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_SetDataWithParams()

GWENHYWFAR_API void GWEN_MultiCache_Type_SetDataWithParams | ( | GWEN_MULTICACHE_TYPE * | ct,
|  | uint32_t | id,
|  | void * | ptr,
|  | uint32_t | size,
|  | uint32_t | param1,
|  | uint32_t | param2,
|  | uint32_t | param3,
|  | uint32_t | param4 )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_SetDataWithParams5()

GWENHYWFAR_API void GWEN_MultiCache_Type_SetDataWithParams5 | ( | GWEN_MULTICACHE_TYPE * | ct,
|  | uint32_t | id,
|  | void * | ptr,
|  | uint32_t | size,
|  | uint32_t | param1,
|  | uint32_t | param2,
|  | uint32_t | param3,
|  | uint32_t | param4,
|  | double | param5 )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_SetFreeFn()

GWENHYWFAR_API void GWEN_MultiCache_Type_SetFreeFn | ( | GWEN_MULTICACHE_TYPE * | ct,
|  | GWEN_MULTICACHE_TYPE_FREE_FN | fn )

References GWENHYWFAR_API.

## GWEN_MultiCache_Type_SetFreeObjectFn()

GWENHYWFAR_API void GWEN_MultiCache_Type_SetFreeObjectFn | ( | GWEN_MULTICACHE_TYPE * | ct,
|  | GWEN_MULTICACHE_TYPE_FREE_OBJECT_FN | fn )

References GWENHYWFAR_API.