SimGrid: Dict: generic dictionnary

SimGrid 3.10 Versatile Simulation of Distributed Systems

- Home page
- Online documentation
- Dev's Corner

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
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

## 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