- auto it = children_.find(name);
- if (it == children_.end()) {
- Type* ret = new Type(name, name, "", TYPE_EVENT, this);
- XBT_DEBUG("EventType %s(%s), child of %s(%s)", ret->getCname(), ret->getId(), getCname(), getId());
- ret->logDefineEventType();
- return ret;
- } else {
- return it->second;
+ 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);
+}
+
+Type* Type::by_name(const std::string& name)
+{
+ Type* ret = nullptr;
+ for (auto const& elm : children_) {
+ if (elm.second->name_ == name) {
+ if (ret != nullptr) {
+ throw TracingError(XBT_THROW_POINT, "there are two children types with the same name?");
+ } else {
+ ret = elm.second.get();
+ }
+ }