SimGrid  3.15
Versatile Simulation of Distributed Systems
lib.h File Reference
#include <xbt/dict.h>


struct  s_xbt_lib
 Container for all the objects of a given type. More...


#define xbt_lib_cursor_t   xbt_dict_cursor_t
#define xbt_lib_length(lib)   xbt_dict_length((lib)->dict)
#define xbt_lib_foreach(lib, cursor, key, data)


typedef struct s_xbt_lib s_xbt_lib_t
typedef struct s_xbt_libxbt_lib_t


xbt_lib_t xbt_lib_new (void)
void xbt_lib_free (xbt_lib_t *lib)
int xbt_lib_add_level (xbt_lib_t lib, void_f_pvoid_t free_f)
void xbt_lib_set (xbt_lib_t lib, const char *name, int level, void *obj)
void xbt_lib_unset (xbt_lib_t lib, const char *key, int level, int invoke_callback)
voidxbt_lib_get_or_null (xbt_lib_t lib, const char *name, int level)
xbt_dictelm_t xbt_lib_get_elm_or_null (xbt_lib_t lib, const char *key)
voidxbt_lib_get_level (xbt_dictelm_t elm, int level)
void xbt_lib_remove (xbt_lib_t lib, const char *key)

Macro Definition Documentation

◆ xbt_lib_cursor_t

#define xbt_lib_cursor_t   xbt_dict_cursor_t

◆ xbt_lib_length

#define xbt_lib_length (   lib)    xbt_dict_length((lib)->dict)

◆ xbt_lib_foreach

#define xbt_lib_foreach (   lib,

Typedef Documentation

◆ s_xbt_lib_t

typedef struct s_xbt_lib s_xbt_lib_t

◆ xbt_lib_t

typedef struct s_xbt_lib* xbt_lib_t

Function Documentation

◆ xbt_lib_new()

xbt_lib_t xbt_lib_new ( void  )

◆ xbt_lib_free()

void xbt_lib_free ( xbt_lib_t lib)

◆ xbt_lib_add_level()

int xbt_lib_add_level ( xbt_lib_t  lib,
void_f_pvoid_t  free_f 

◆ xbt_lib_set()

void xbt_lib_set ( xbt_lib_t  lib,
const char *  name,
int  level,
void obj 

◆ xbt_lib_unset()

void xbt_lib_unset ( xbt_lib_t  lib,
const char *  key,
int  level,
int  invoke_callback 

◆ xbt_lib_get_or_null()

void* xbt_lib_get_or_null ( xbt_lib_t  lib,
const char *  name,
int  level 

◆ xbt_lib_get_elm_or_null()

xbt_dictelm_t xbt_lib_get_elm_or_null ( xbt_lib_t  lib,
const char *  key 

◆ xbt_lib_get_level()

void* xbt_lib_get_level ( xbt_dictelm_t  elm,
int  level 

◆ xbt_lib_remove()

void xbt_lib_remove ( xbt_lib_t  lib,
const char *  key