-/* Copyright (c) 2012-2021. The SimGrid Team.
+/* Copyright (c) 2012-2022. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
}
Type::Type(PajeEventType event_type, const std::string& name, const std::string& alias, const std::string& color,
- Type* father)
- : name_(name), color_(color), father_(father)
+ Type* parent)
+ : name_(name), color_(color), parent_(parent)
{
if (name_.empty() || alias.empty())
throw TracingError(XBT_THROW_POINT, "can't create a new type with no name or alias");
- if (father != nullptr){
- father->children_[alias].reset(this);
- XBT_DEBUG("new type %s, child of %s", get_cname(), father->get_cname());
+ if (parent != nullptr) {
+ parent->children_[alias].reset(this);
+ XBT_DEBUG("new type %s, child of %s", get_cname(), parent->get_cname());
on_creation(*this, event_type);
}
}
events_.push_back(new VariableEvent(timestamp, get_issuer(), this, PajeEventType::SubVariable, value));
}
-void LinkType::start_event(Container* startContainer, const std::string& value, const std::string& key)
-{
- start_event(startContainer, value, key, -1);
-}
-
-void LinkType::start_event(Container* startContainer, const std::string& value, const std::string& key, int size)
+void LinkType::start_event(Container* startContainer, const std::string& value, const std::string& key, size_t size)
{
new LinkEvent(get_issuer(), this, PajeEventType::StartLink, startContainer, value, key, size);
}
void LinkType::end_event(Container* endContainer, const std::string& value, const std::string& key)
{
- new LinkEvent(get_issuer(), this, PajeEventType::EndLink, endContainer, value, key, -1);
+ new LinkEvent(get_issuer(), this, PajeEventType::EndLink, endContainer, value, key);
}
Type* Type::by_name(const std::string& name)
}
}
if (ret == nullptr)
- throw TracingError(XBT_THROW_POINT, xbt::string_printf("type with name (%s) not found in father type (%s)",
+ throw TracingError(XBT_THROW_POINT, xbt::string_printf("type with name (%s) not found in parent type (%s)",
name.c_str(), get_cname()));
return ret;
}
{
auto ret = values_.find(name);
if (ret == values_.end()) {
- throw TracingError(XBT_THROW_POINT, xbt::string_printf("value with name (%s) not found in father type (%s)",
+ throw TracingError(XBT_THROW_POINT, xbt::string_printf("value with name (%s) not found in parent type (%s)",
name.c_str(), get_cname()));
}
return &ret->second;