- 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);
+ this->name_ = xbt_strdup(typeNameBuff);
+ this->children_ = xbt_dict_new_homogeneous(nullptr);
+ this->values_ = xbt_dict_new_homogeneous(nullptr);
+ this->color_ = xbt_strdup(color);
+
+ this->id_ = bprintf("%lld", instr_new_paje_id());
+
+ if (father != nullptr){
+ xbt_dict_set(father->children_, key, this, nullptr);
+ XBT_DEBUG("new type %s, child of %s", typeNameBuff, father->name_);