SimGrid  3.15
Versatile Simulation of Distributed Systems

Detailed Description

Classes

struct  s_xbt_dictelm
 

Typedefs

typedef struct s_xbt_dictxbt_dict_t
 Dictionary data type (opaque structure) More...
 
typedef struct s_xbt_dictelmxbt_dictelm_t
 
typedef struct s_xbt_dictelm s_xbt_dictelm_t
 

Functions

xbt_dict_t xbt_dict_new ()
 Constructor. More...
 
xbt_dict_t xbt_dict_new_homogeneous (void_f_pvoid_t free_ctn)
 Constructor. More...
 
void xbt_dict_free (xbt_dict_t *dict)
 Destructor. More...
 
unsigned int xbt_dict_size (xbt_dict_t dict)
 Returns the amount of elements in the dict. More...
 

Typedef Documentation

◆ xbt_dict_t

typedef struct s_xbt_dict* xbt_dict_t

Dictionary data type (opaque structure)

◆ xbt_dictelm_t

typedef struct s_xbt_dictelm* xbt_dictelm_t

◆ s_xbt_dictelm_t

Function Documentation

◆ xbt_dict_new()

xbt_dict_t xbt_dict_new ( )

Constructor.

Returns
pointer to the destination
See also
xbt_dict_new_homogenous(), xbt_dict_free()

Creates and initialize a new dictionary with a default hashtable size. The dictionary is heterogeneous: each element can have a different free function.

◆ xbt_dict_new_homogeneous()

xbt_dict_t xbt_dict_new_homogeneous ( void_f_pvoid_t  free_ctn)

Constructor.

Parameters
free_ctnfunction to call with (data as argument) when data is removed from the dictionary
Returns
pointer to the destination
See also
xbt_dict_new(), xbt_dict_free()

Creates and initialize a new dictionary with a default hashtable size. The dictionary is homogeneous: each element share the same free function.

Examples:
examples/msg/actions-storage/actions-storage.c.

◆ xbt_dict_free()

void xbt_dict_free ( xbt_dict_t dict)

Destructor.

Parameters
dictthe dictionary to be freed

Frees a dictionary with all the data

Examples:
examples/msg/actions-storage/actions-storage.c, and examples/msg/io-storage/io-storage.c.

◆ xbt_dict_size()

unsigned int xbt_dict_size ( xbt_dict_t  dict)

Returns the amount of elements in the dict.