libsheepy
Data Structures | Macros | Typedefs | Functions
libsheepyCSmallContainer.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  smallContainerFunctionst
 
struct  smallContainer
 class More...
 

Macros

#define helpTextSmallContainer   "TODO smallContainer help brief, class description /*, definitions,*/ methods, examples"
 help text for this class It is public declaration so that child classes can add their help text easily: ret "Child help text \n\n" helpTextSmallContainer; More...
 
#define cCo(self)   ( (smallContainert*) self )
 
#define SMALLCONTAINERFUNCTIONST
 class functions allocated once for all objects More...
 
#define createSmallContainer(obj)   ;smallContainert obj; initiateSmallContainer(&obj)
 
#define createAllocateSmallContainer(obj)   ;smallContainert *obj; initiateAllocateSmallContainer(&obj)
 
#define cleanSmallContainerP(name)   smallContainert *name CLEANUP(cleanUpSmallContainerTerminateG)
 declare pointer name with type smallContainert and terminate name when it is out of scope More...
 
#define cleanAllocateSmallContainer(obj)   ;cleanSmallContainerP(obj); initiateAllocateSmallContainer(&obj)
 allocate smallContainer (pointer) and clean up when it is out of scope More...
 
#define cleanSmallContainer(name)   smallContainert name CLEANUP(cleanUpSmallContainerFreeLocalG); initiateSmallContainer(&name)
 declare local object name with type smallContainert and free name when it is out of scope More...
 
#define cleanFreeSmallContainer(name)   smallContainert *name CLEANUP(cleanUpSmallContainerFreeG)
 declare pointer name with type smallContainert and free name when it is out of scope More...
 
#define cleanFinishSmallContainerP(name)   smallContainert *name CLEANUP(cleanUpSmallContainerFinishG)
 declare pointer name with Type smallContainert and finish name when it is out of scope More...
 

Typedefs

typedef struct smallContainer smallContainert
 
typedef void(* freeSmallContainerFt) (smallContainert *self)
 
typedef void(* terminateSmallContainerFt) (smallContainert **self)
 
typedef char *(* toStringSmallContainerFt) (smallContainert *self)
 
typedef smallContainert *(* duplicateSmallContainerFt) (smallContainert *self)
 
typedef void(* finishSmallContainerFt) (smallContainert **self)
 free container More...
 
typedef const char *(* helpSmallContainerFt) (smallContainert *self)
 
typedef void(* dataFreeSmallContainerFt) (void *data)
 prototype for user provided free function More...
 
typedef smallContainert *(* setClassDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free)
 set function to free container data in the class More...
 
typedef smallContainert *(* setObjectDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free)
 set function to free container data in self More...
 
typedef char *(* dataToStringSmallContainerFt) (void *data)
 prototype for user provided toString function More...
 
typedef smallContainert *(* setClassDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString)
 set function to stringify container data in the class More...
 
typedef smallContainert *(* setObjectDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString)
 set function to stringify container data in self More...
 
typedef void *(* dataDuplicateSmallContainerFt) (void *data)
 prototype for user provided duplicate function More...
 
typedef smallContainert *(* setClassDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate)
 set function to duplicate container data in the class More...
 
typedef smallContainert *(* setObjectDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate)
 set function to duplicate container data in self More...
 
typedef void(* smashSmallContainerFt) (smallContainert **self)
 free self but not the data inside More...
 
typedef void *(* getSmallContainerFt) (smallContainert *self)
 get a copy of smallContainer More...
 
typedef smallContainert *(* setSmallContainerFt) (smallContainert *self, void *data)
 set smallContainer More...
 

Functions

void initiateSmallContainer (smallContainert *self)
 
void initiateAllocateSmallContainer (smallContainert **self)
 
void finalizeRecycleSmallContainer (void *arg UNUSED)
 
void finalizeSmallContainer (void)
 
void registerMethodsSmallContainer (smallContainerFunctionst *f)
 
smallContainertallocSmallContainer (void *data)
 
void cleanUpSmallContainerTerminateG (smallContainert **val)
 
void cleanUpSmallContainerFreeLocalG (smallContainert *val)
 
void cleanUpSmallContainerFreeG (smallContainert **val)
 
void cleanUpSmallContainerFinishG (smallContainert **val)
 
smallContainertduplicateSmallContainerG (smallContainert *self)
 
void freeSmallContainerG (smallContainert *self)
 
void * getSmallContainerG (smallContainert *self, void *retType UNUSED, int64_t index UNUSED)
 
smallContainertsetSmallContainerG (smallContainert *self, void *data)
 

Macro Definition Documentation

◆ helpTextSmallContainer

#define helpTextSmallContainer   "TODO smallContainer help brief, class description /*, definitions,*/ methods, examples"

help text for this class It is public declaration so that child classes can add their help text easily: ret "Child help text \n\n" helpTextSmallContainer;

Definition at line 32 of file libsheepyCSmallContainer.h.

◆ cCo

#define cCo (   self)    ( (smallContainert*) self )

Definition at line 35 of file libsheepyCSmallContainer.h.

◆ SMALLCONTAINERFUNCTIONST

#define SMALLCONTAINERFUNCTIONST
Value:
dataFreeSmallContainerFt dataFree;\
setClassDataFreeSmallContainerFt setClassDataFree;\
setObjectDataFreeSmallContainerFt setObjectDataFree;\
dataToStringSmallContainerFt dataToString;\
setClassDataToStringSmallContainerFt setClassDataToString;\
setObjectDataToStringSmallContainerFt setObjectDataToString;\
dataDuplicateSmallContainerFt dataDuplicate;\
setClassDataDuplicateSmallContainerFt setClassDataDuplicate;\
setObjectDataDuplicateSmallContainerFt setObjectDataDuplicate;\
getSmallContainerFt get;\
setSmallContainerFt set
const char *(* helpSmallContainerFt)(smallContainert *self)

class functions allocated once for all objects

freed with finalizeSmallContainer or finalizeLibsheepy use this define in child classes and add the new function after this class functions

in this define, add the methods after <finishClassTemplateFt finish;>

Example: #define RINGFUNCTIONST \ CLASSTEMPLATEFUNCTIONST; \ setSizeRingFt setSize

Definition at line 164 of file libsheepyCSmallContainer.h.

◆ createSmallContainer

#define createSmallContainer (   obj)    ;smallContainert obj; initiateSmallContainer(&obj)

Definition at line 204 of file libsheepyCSmallContainer.h.

◆ createAllocateSmallContainer

#define createAllocateSmallContainer (   obj)    ;smallContainert *obj; initiateAllocateSmallContainer(&obj)

Definition at line 205 of file libsheepyCSmallContainer.h.

◆ cleanSmallContainerP

#define cleanSmallContainerP (   name)    smallContainert *name CLEANUP(cleanUpSmallContainerTerminateG)

declare pointer name with type smallContainert and terminate name when it is out of scope

Definition at line 232 of file libsheepyCSmallContainer.h.

◆ cleanAllocateSmallContainer

#define cleanAllocateSmallContainer (   obj)    ;cleanSmallContainerP(obj); initiateAllocateSmallContainer(&obj)

allocate smallContainer (pointer) and clean up when it is out of scope

Definition at line 237 of file libsheepyCSmallContainer.h.

◆ cleanSmallContainer

#define cleanSmallContainer (   name)    smallContainert name CLEANUP(cleanUpSmallContainerFreeLocalG); initiateSmallContainer(&name)

declare local object name with type smallContainert and free name when it is out of scope

Definition at line 242 of file libsheepyCSmallContainer.h.

◆ cleanFreeSmallContainer

#define cleanFreeSmallContainer (   name)    smallContainert *name CLEANUP(cleanUpSmallContainerFreeG)

declare pointer name with type smallContainert and free name when it is out of scope

Definition at line 247 of file libsheepyCSmallContainer.h.

◆ cleanFinishSmallContainerP

#define cleanFinishSmallContainerP (   name)    smallContainert *name CLEANUP(cleanUpSmallContainerFinishG)

declare pointer name with Type smallContainert and finish name when it is out of scope

Definition at line 252 of file libsheepyCSmallContainer.h.

Typedef Documentation

◆ smallContainert

Definition at line 25 of file libsheepyCSmallContainer.h.

◆ freeSmallContainerFt

typedef void(* freeSmallContainerFt) (smallContainert *self)

Definition at line 37 of file libsheepyCSmallContainer.h.

◆ terminateSmallContainerFt

typedef void(* terminateSmallContainerFt) (smallContainert **self)

Definition at line 38 of file libsheepyCSmallContainer.h.

◆ toStringSmallContainerFt

typedef char*(* toStringSmallContainerFt) (smallContainert *self)

Definition at line 39 of file libsheepyCSmallContainer.h.

◆ duplicateSmallContainerFt

typedef smallContainert*(* duplicateSmallContainerFt) (smallContainert *self)

Definition at line 40 of file libsheepyCSmallContainer.h.

◆ finishSmallContainerFt

typedef void(* finishSmallContainerFt) (smallContainert **self)

free container

Definition at line 45 of file libsheepyCSmallContainer.h.

◆ helpSmallContainerFt

typedef const char*(* helpSmallContainerFt) (smallContainert *self)

Definition at line 47 of file libsheepyCSmallContainer.h.

◆ dataFreeSmallContainerFt

typedef void(* dataFreeSmallContainerFt) (void *data)

prototype for user provided free function

Parameters
datapointer to buffer in container

Definition at line 56 of file libsheepyCSmallContainer.h.

◆ setClassDataFreeSmallContainerFt

typedef smallContainert*(* setClassDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free)

set function to free container data in the class

All smallContainert objects have access to this function

Parameters
freeuser provided function to free the data in the container

Definition at line 66 of file libsheepyCSmallContainer.h.

◆ setObjectDataFreeSmallContainerFt

typedef smallContainert*(* setObjectDataFreeSmallContainerFt) (smallContainert *self, dataFreeSmallContainerFt free)

set function to free container data in self

Parameters
freeuser provided function to free the data in the container

Definition at line 74 of file libsheepyCSmallContainer.h.

◆ dataToStringSmallContainerFt

typedef char*(* dataToStringSmallContainerFt) (void *data)

prototype for user provided toString function

Parameters
datapointer to buffer in container

Definition at line 82 of file libsheepyCSmallContainer.h.

◆ setClassDataToStringSmallContainerFt

typedef smallContainert*(* setClassDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString)

set function to stringify container data in the class

Parameters
toStringuser provided function to stringify the data in the container

Definition at line 90 of file libsheepyCSmallContainer.h.

◆ setObjectDataToStringSmallContainerFt

typedef smallContainert*(* setObjectDataToStringSmallContainerFt) (smallContainert *self, dataToStringSmallContainerFt toString)

set function to stringify container data in self

Parameters
toStringuser provided function to stringify the data in the container

Definition at line 98 of file libsheepyCSmallContainer.h.

◆ dataDuplicateSmallContainerFt

typedef void*(* dataDuplicateSmallContainerFt) (void *data)

prototype for user provided duplicate function

Parameters
datapointer to buffer in container

Definition at line 106 of file libsheepyCSmallContainer.h.

◆ setClassDataDuplicateSmallContainerFt

typedef smallContainert*(* setClassDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate)

set function to duplicate container data in the class

Parameters
duplicateuser provided function to duplicate the data in the container

Definition at line 114 of file libsheepyCSmallContainer.h.

◆ setObjectDataDuplicateSmallContainerFt

typedef smallContainert*(* setObjectDataDuplicateSmallContainerFt) (smallContainert *self, dataDuplicateSmallContainerFt duplicate)

set function to duplicate container data in self

Parameters
duplicateuser provided function to duplicate the data in the container

Definition at line 122 of file libsheepyCSmallContainer.h.

◆ smashSmallContainerFt

typedef void(* smashSmallContainerFt) (smallContainert **self)

free self but not the data inside

Definition at line 127 of file libsheepyCSmallContainer.h.

◆ getSmallContainerFt

typedef void*(* getSmallContainerFt) (smallContainert *self)

get a copy of smallContainer

The returned smallContainer needs to be freed

Returns
char*

Definition at line 137 of file libsheepyCSmallContainer.h.

◆ setSmallContainerFt

typedef smallContainert*(* setSmallContainerFt) (smallContainert *self, void *data)

set smallContainer

Parameters
stringbuffer to store in object (the buffer is duplicated)

Definition at line 145 of file libsheepyCSmallContainer.h.

Function Documentation

◆ initiateSmallContainer()

void initiateSmallContainer ( smallContainert self)

Definition at line 67 of file libsheepyCSmallContainer.c.

Here is the caller graph for this function:

◆ initiateAllocateSmallContainer()

void initiateAllocateSmallContainer ( smallContainert **  self)

Definition at line 107 of file libsheepyCSmallContainer.c.

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

◆ finalizeRecycleSmallContainer()

void finalizeRecycleSmallContainer ( void *arg  UNUSED)

Definition at line 125 of file libsheepyCSmallContainer.c.

Here is the caller graph for this function:

◆ finalizeSmallContainer()

void finalizeSmallContainer ( void  )

Definition at line 133 of file libsheepyCSmallContainer.c.

Here is the caller graph for this function:

◆ registerMethodsSmallContainer()

void registerMethodsSmallContainer ( smallContainerFunctionst f)

Definition at line 85 of file libsheepyCSmallContainer.c.

Here is the call graph for this function:

◆ allocSmallContainer()

smallContainert* allocSmallContainer ( void *  data)

Definition at line 142 of file libsheepyCSmallContainer.c.

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

◆ cleanUpSmallContainerTerminateG()

void cleanUpSmallContainerTerminateG ( smallContainert **  val)

Definition at line 153 of file libsheepyCSmallContainer.c.

◆ cleanUpSmallContainerFreeLocalG()

void cleanUpSmallContainerFreeLocalG ( smallContainert val)

Definition at line 158 of file libsheepyCSmallContainer.c.

◆ cleanUpSmallContainerFreeG()

void cleanUpSmallContainerFreeG ( smallContainert **  val)

Definition at line 163 of file libsheepyCSmallContainer.c.

◆ cleanUpSmallContainerFinishG()

void cleanUpSmallContainerFinishG ( smallContainert **  val)

Definition at line 168 of file libsheepyCSmallContainer.c.

◆ duplicateSmallContainerG()

smallContainert* duplicateSmallContainerG ( smallContainert self)

Definition at line 348 of file libsheepyCSmallContainer.c.

◆ freeSmallContainerG()

void freeSmallContainerG ( smallContainert self)

Definition at line 353 of file libsheepyCSmallContainer.c.

◆ getSmallContainerG()

void* getSmallContainerG ( smallContainert self,
void *retType  UNUSED,
int64_t index  UNUSED 
)

Definition at line 355 of file libsheepyCSmallContainer.c.

◆ setSmallContainerG()

smallContainert* setSmallContainerG ( smallContainert self,
void *  data 
)

Definition at line 360 of file libsheepyCSmallContainer.c.