XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_paje_types, instr, "Paje tracing event system (types)");
-static Type* rootType = nullptr; /* the root type */
+static simgrid::instr::Type* rootType = nullptr; /* the root type */
void PJ_type_release ()
{
rootType = nullptr;
}
-type_t PJ_type_get_root ()
+simgrid::instr::Type* PJ_type_get_root()
{
return rootType;
}
-Type::Type (const char *typeNameBuff, const char *key, const char *color, e_entity_types kind, Type* father)
+simgrid::instr::Type::Type(const char* typeNameBuff, const char* key, const char* color, e_entity_types kind,
+ Type* father)
{
if (typeNameBuff == nullptr || key == nullptr){
THROWF(tracing_error, 0, "can't create a new type with name or key equal nullptr");
}
}
-void PJ_type_free (type_t type)
+void PJ_type_free(simgrid::instr::Type* type)
{
- value* val;
+ simgrid::instr::Value* val;
char *value_name;
xbt_dict_cursor_t cursor = nullptr;
xbt_dict_foreach (type->values, cursor, value_name, val) {
type = nullptr;
}
-void recursiveDestroyType (type_t type)
+void recursiveDestroyType(simgrid::instr::Type* type)
{
XBT_DEBUG("recursiveDestroyType %s", type->name);
xbt_dict_cursor_t cursor = nullptr;
- Type* child;
+ simgrid::instr::Type* child;
char *child_name;
xbt_dict_foreach(type->children, cursor, child_name, child) {
recursiveDestroyType (child);
PJ_type_free(type);
}
-type_t PJ_type_get (const char *name, Type* father)
+simgrid::instr::Type* PJ_type_get(const char* name, simgrid::instr::Type* father)
{
- Type* ret = Type::getOrNull (name, father);
+ simgrid::instr::Type* ret = simgrid::instr::Type::getOrNull(name, father);
if (ret == nullptr){
THROWF (tracing_error, 2, "type with name (%s) not found in father type (%s)", name, father->name);
}
return ret;
}
-type_t Type::getOrNull (const char *name, Type* father)
+simgrid::instr::Type* simgrid::instr::Type::getOrNull(const char* name, simgrid::instr::Type* father)
{
if (name == nullptr || father == nullptr){
THROWF (tracing_error, 0, "can't get type with a nullptr name or from a nullptr father");
}
- Type* ret = nullptr;
- Type* child;
+ simgrid::instr::Type* ret = nullptr;
+ simgrid::instr::Type* child;
char *child_name;
xbt_dict_cursor_t cursor = nullptr;
xbt_dict_foreach(father->children, cursor, child_name, child) {
return ret;
}
-type_t Type::containerNew (const char *name, Type* father)
+simgrid::instr::Type* simgrid::instr::Type::containerNew(const char* name, simgrid::instr::Type* father)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create a container type with a nullptr name");
}
- Type* ret = new Type (name, name, nullptr, TYPE_CONTAINER, father);
+ simgrid::instr::Type* ret = new simgrid::instr::Type(name, name, nullptr, TYPE_CONTAINER, father);
if (father == nullptr) {
rootType = ret;
} else {
return ret;
}
-type_t Type::eventNew (const char *name, Type* father)
+simgrid::instr::Type* simgrid::instr::Type::eventNew(const char* name, simgrid::instr::Type* father)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create an event type with a nullptr name");
return ret;
}
-type_t Type::variableNew (const char *name, const char *color, Type* father)
+simgrid::instr::Type* simgrid::instr::Type::variableNew(const char* name, const char* color,
+ simgrid::instr::Type* father)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create a variable type with a nullptr name");
return ret;
}
-type_t Type::linkNew (const char *name, Type* father, Type* source, Type* dest)
+simgrid::instr::Type* simgrid::instr::Type::linkNew(const char* name, Type* father, Type* source, Type* dest)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create a link type with a nullptr name");
return ret;
}
-type_t Type::stateNew (const char *name, Type* father)
+simgrid::instr::Type* simgrid::instr::Type::stateNew(const char* name, Type* father)
{
if (name == nullptr){
THROWF (tracing_error, 0, "can't create a state type with a nullptr name");