SimGrid
Modules
Dict: generic dictionnary
Usual data structures

The dictionary data structure (comparable to hash tables) More...

Modules

 Dict constructor and destructor
 Dictionaries basic usage
 Dictionaries with non-nul terminated keys
 Cursors on dictionaries
 Multi-level dictionaries

Detailed Description

The dictionary data structure (comparable to hash tables)

This section describes the API to a dictionary structure that associates as string to a void* key. It provides the same functionality than an hash table.

Here is a little example of use:

xbt_dict_t mydict = xbt_dict_new();
 char buff[512];

 sprintf(buff,"some very precious data");
 xbt_dict_set(mydict,"my data", strdup(buff), free);

 sprintf(buff,"another good stuff");
 xbt_dict_set(mydict,"my data", strdup(buff), free); // previous data gets erased (and freed) by second add


Back to the main Simgrid Documentation page The version of Simgrid documented here is v3.6.1.
Documentation of other versions can be found in their respective archive files (directory doc/html).
Generated for SimGridAPI by doxygen