XBT_LOG_NEW_DEFAULT_SUBCATEGORY (instr_config, instr, "Configuration");
std::ofstream tracing_file;
-std::map<container_t, std::ofstream*> tracing_files; // TI specific
+std::map<const simgrid::instr::Container*, std::ofstream*> tracing_files; // TI specific
double prefix = 0.0; // TI specific
constexpr char OPT_TRACING_BASIC[] = "tracing/basic";
/*************
* Callbacks *
*************/
-xbt::signal<void(Container&)> Container::on_creation;
-xbt::signal<void(Container&)> Container::on_destruction;
-xbt::signal<void(Type&, e_event_type)> Type::on_creation;
-xbt::signal<void(LinkType&, Type&, Type&)> LinkType::on_creation;
+xbt::signal<void(Container const&)> Container::on_creation;
+xbt::signal<void(Container const&)> Container::on_destruction;
+xbt::signal<void(Type const&, e_event_type)> Type::on_creation;
+xbt::signal<void(LinkType const&, Type const&, Type const&)> LinkType::on_creation;
xbt::signal<void(PajeEvent&)> PajeEvent::on_creation;
-xbt::signal<void(PajeEvent&)> PajeEvent::on_destruction;
-xbt::signal<void(StateEvent&)> StateEvent::on_destruction;
-xbt::signal<void(EntityValue&)> EntityValue::on_creation;
+xbt::signal<void(PajeEvent const&)> PajeEvent::on_destruction;
+xbt::signal<void(StateEvent const&)> StateEvent::on_destruction;
+xbt::signal<void(EntityValue const&)> EntityValue::on_creation;
static void on_container_creation_paje(const Container& c)
{
}
}
-static void on_container_creation_ti(Container& c)
+static void on_container_creation_ti(const Container& c)
{
XBT_DEBUG("%s: event_type=%u, timestamp=%f", __func__, PAJE_CreateContainer, SIMIX_get_clock());
// if we are in the mode with only one file
tracing_files.insert({&c, ti_unique_file});
}
-static void on_container_destruction_ti(Container& c)
+static void on_container_destruction_ti(const Container& c)
{
if (not trace_disable_destroy && &c != Container::get_root()) {
if (not simgrid::config::get_value<bool>("tracing/smpi/format/ti-one-file") || tracing_files.size() == 1) {
std::string name_; /* Unique name of this container */
public:
- static xbt::signal<void(Container&)> on_creation;
- static xbt::signal<void(Container&)> on_destruction;
+ static xbt::signal<void(Container const&)> on_creation;
+ static xbt::signal<void(Container const&)> on_destruction;
explicit Container(const std::string& name, const std::string& type_name, Container* father);
Container(const Container&) = delete;
Type* type_;
public:
static xbt::signal<void(PajeEvent&)> on_creation;
- static xbt::signal<void(PajeEvent&)> on_destruction;
+ static xbt::signal<void(PajeEvent const&)> on_destruction;
double timestamp_;
e_event_type eventType_;
std::unique_ptr<TIData> extra_;
public:
- static xbt::signal<void(StateEvent&)> on_destruction;
+ static xbt::signal<void(StateEvent const&)> on_destruction;
StateEvent(Container* container, Type* type, e_event_type event_type, EntityValue* value, TIData* extra);
~StateEvent() override { on_destruction(*this); }
bool has_extra() const { return extra_ != nullptr; }
Container* get_issuer() const { return issuer_; }
public:
- static xbt::signal<void(Type&, e_event_type event_type)> on_creation;
+ static xbt::signal<void(Type const&, e_event_type event_type)> on_creation;
Type(e_event_type event_type, const std::string& name, const std::string& alias, const std::string& color,
Type* father);
class LinkType : public ValueType {
public:
- static xbt::signal<void(LinkType&, Type&, Type&)> on_creation;
+ static xbt::signal<void(LinkType const&, Type const&, Type const&)> on_creation;
LinkType(const std::string& name, Type* source, Type* dest, const std::string& alias, Type* father)
: ValueType(PAJE_DefineLinkType, name, alias, father)
{