return type_id++;
}
-
namespace simgrid {
namespace instr {
father_->children_.insert({getName(), this});
logCreation();
} else {
- type_ = Type::createRootType();
+ type_ = new ContainerType("0");
rootContainer = this;
}
}
double timestamp = SIMIX_get_clock();
std::stringstream stream;
- XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, simgrid::instr::PAJE_CreateContainer, timestamp);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%f", __FUNCTION__, simgrid::instr::PAJE_CreateContainer, timestamp);
if (instr_fmt_type == instr_fmt_paje) {
stream << std::fixed << std::setprecision(TRACE_precision());
xbt_free(folder_name);
xbt_free(filename);
}
-
tracing_files.insert({this, ti_unique_file});
} else {
THROW_IMPOSSIBLE;
std::stringstream stream;
double timestamp = SIMIX_get_clock();
- XBT_DEBUG("%s: event_type=%d, timestamp=%f", __FUNCTION__, simgrid::instr::PAJE_DestroyContainer, timestamp);
+ XBT_DEBUG("%s: event_type=%u, timestamp=%f", __FUNCTION__, simgrid::instr::PAJE_DestroyContainer, timestamp);
if (instr_fmt_type == instr_fmt_paje) {
stream << std::fixed << std::setprecision(TRACE_precision());
THROW_IMPOSSIBLE;
}
}
+
+StateType* Container::getState(std::string name)
+{
+ StateType* ret = dynamic_cast<StateType*>(type_->byName(name));
+ ret->setCallingContainer(this);
+ return ret;
+}
+
+LinkType* Container::getLink(std::string name)
+{
+ return dynamic_cast<LinkType*>(type_->byName(name));
+}
+
+VariableType* Container::getVariable(std::string name)
+{
+ VariableType* ret = dynamic_cast<VariableType*>(type_->byName(name));
+ ret->setCallingContainer(this);
+ return ret;
+}
}
}