SimGrid  3.7
Scalable simulation of distributed systems
Typedefs
Swag types
Swag: O(1) set datatype

Typedefs

typedef struct xbt_swag_hookup s_xbt_swag_hookup_t
typedef struct xbt_swag * xbt_swag_t

Detailed Description

Specific set.

These typedefs are public so that the compiler can do his job but believe me, you don't want to try to play with those structs directly. Use them as an abstract datatype.


Typedef Documentation

typedef struct xbt_swag_hookup s_xbt_swag_hookup_t

This type should be added to a type that is to be used in a swag.

Whenever a new object with this struct is created, all fields have to be set to NULL

Here is an example like that :

typedef struct foo {
  s_xbt_swag_hookup_t set1_hookup;
  s_xbt_swag_hookup_t set2_hookup;

  double value;
} s_foo_t, *foo_t;
...
{
  s_foo_t elem;
  xbt_swag_t set1=NULL;
  xbt_swag_t set2=NULL;

  set1 = xbt_swag_new(xbt_swag_offset(elem, set1_hookup));
  set2 = xbt_swag_new(xbt_swag_offset(elem, set2_hookup));

}
typedef struct xbt_swag * xbt_swag_t

A typical swag


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