#include "arc/std/bool.h"
#include <stdint.h>
Go to the source code of this file.
◆ ARC_Handler
a handler type
Definition at line 14 of file handler.h.
◆ ARC_Handler_CleanDataFn
| typedef void(* ARC_Handler_CleanDataFn) (void *data) |
a function that will be used during destruction of trash vector
- Parameters
-
| data | data that is being destroyed from trash |
Definition at line 40 of file handler.h.
◆ ARC_Handler_CompareDataFn
| typedef ARC_Bool(* ARC_Handler_CompareDataFn) (void *a, void *b) |
data comparison function ptr
- Note
- this is used for comparison within vectors
- Parameters
-
| a | first data struct |
| b | second data struct |
- Returns
- 0 when a == b
Definition at line 26 of file handler.h.
◆ ARC_Handler_DataFn
| typedef void(* ARC_Handler_DataFn) (void *data) |
a function that will take iterated data
- Parameters
-
| data | iterated data from ARC_Handler_Iterate |
Definition at line 33 of file handler.h.
◆ ARC_Handler_Add()
| void ARC_Handler_Add |
( |
ARC_Handler * | handler, |
|
|
void * | data ) |
adds data to handler
- Parameters
-
| handler | ARC_Handler to add to |
| data | data that is being added |
◆ ARC_Handler_Clean()
clears trash from handler
- Note
- cleanfn's main purpose is to help manage memory
- Parameters
-
| handler | ARC_Handler to remove trash from |
◆ ARC_Handler_Clear()
clears all data from handler and puts it in trash vector
- Parameters
-
| handler | ARC_Handler to clear data from |
◆ ARC_Handler_Create()
creates ARC_Handler type
- Parameters
-
| config | ARC_Handler to initialize |
| compareFn | function to remove handler data |
| cleanFn | function to clean data in handler can be null |
◆ ARC_Handler_Destroy()
destroyes ARC_Handler type
- Parameters
-
| handler | ARC_Handler to destory |
◆ ARC_Handler_GetSize()
gets size of vector
- Parameters
-
| handler | ARC_handler to get size from |
◆ ARC_Handler_Iterate()
calls provided function on each element in handler
- Parameters
-
| handler | ARC_Handler to iterate through |
| datafn | function that will be called on each element of data |
◆ ARC_Handler_Remove()
| void ARC_Handler_Remove |
( |
ARC_Handler * | handler, |
|
|
void * | data ) |
remove from handler
- Note
- the data that is removed is stored in a trash vector the ARC_Handler_Clean function must be called clean the trash vector the trash vector is to make sure a state is not deleted while being run
- Parameters
-
| handler | ARC_Handler to remove from |
| data | data that is being removed |
◆ ARC_Handler_RemoveIndex()
| void ARC_Handler_RemoveIndex |
( |
ARC_Handler * | handler, |
|
|
uint32_t | index ) |
remove from handler
- Note
- the data that is removed is stored in a trash vector the ARC_Handler_Clean function must be called clean the trash vector the trash vector is to make sure a state is not deleted while being run
- Parameters
-
| handler | ARC_Handler to remove from |
| index | index of data that is being removed |