- type_t ret = xbt_new0(s_type_t, 1);
- ret->name = xbt_strdup (typeNameBuff);
- ret->father = father;
- ret->kind = kind;
- ret->children = xbt_dict_new_homogeneous(NULL);
- ret->values = xbt_dict_new_homogeneous(NULL);
- ret->color = xbt_strdup (color);
-
- char str_id[INSTR_DEFAULT_STR_SIZE];
- snprintf (str_id, INSTR_DEFAULT_STR_SIZE, "%lld", instr_new_paje_id());
- ret->id = xbt_strdup (str_id);
-
- if (father != NULL){
- xbt_dict_set (father->children, key, ret, NULL);
- XBT_DEBUG("new type %s, child of %s", typeNameBuff, father->name);
- }
- return ret;
-}