libyasm
Macros | Typedefs | Functions
assocdat.h File Reference

YASM associated data storage (libyasm internal use) More...

Go to the source code of this file.

Typedefs

typedef struct yasm__assoc_data yasm__assoc_data
 Associated data container. More...
 

Functions

YASM_LIB_DECL yasm__assoc_datayasm__assoc_data_create (void)
 Create an associated data container. More...
 
YASM_LIB_DECL void * yasm__assoc_data_get (yasm__assoc_data *assoc_data, const yasm_assoc_data_callback *callback)
 Get associated data for a data callback. More...
 
YASM_LIB_DECL yasm__assoc_datayasm__assoc_data_add (yasm__assoc_data *assoc_data, const yasm_assoc_data_callback *callback, void *data)
 Add associated data to a associated data container. More...
 
YASM_LIB_DECL void yasm__assoc_data_destroy (yasm__assoc_data *assoc_data)
 Destroy all associated data in a container. More...
 
YASM_LIB_DECL void yasm__assoc_data_print (const yasm__assoc_data *assoc_data, FILE *f, int indent_level)
 Print all associated data in a container. More...
 

Detailed Description

YASM associated data storage (libyasm internal use)

Definition in file assocdat.h.

Typedef Documentation

Associated data container.

Definition at line 38 of file assocdat.h.

Function Documentation

YASM_LIB_DECL yasm__assoc_data* yasm__assoc_data_add ( yasm__assoc_data assoc_data,
const yasm_assoc_data_callback callback,
void *  data 
)

Add associated data to a associated data container.

Attention
Deletes any existing associated data for that data callback.
Parameters
assoc_datacontainer of associated data
callbackcallback
datadata to associate
YASM_LIB_DECL yasm__assoc_data* yasm__assoc_data_create ( void  )

Create an associated data container.

YASM_LIB_DECL void yasm__assoc_data_destroy ( yasm__assoc_data assoc_data)

Destroy all associated data in a container.

YASM_LIB_DECL void* yasm__assoc_data_get ( yasm__assoc_data assoc_data,
const yasm_assoc_data_callback callback 
)

Get associated data for a data callback.

Parameters
assoc_datacontainer of associated data
callbackcallback used when adding data
Returns
Associated data (NULL if none).
YASM_LIB_DECL void yasm__assoc_data_print ( const yasm__assoc_data assoc_data,
FILE *  f,
int  indent_level 
)

Print all associated data in a container.