-/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/instr/instr_private.hpp"
#include <string>
-namespace simgrid {
-namespace instr {
+namespace simgrid::instr {
class EntityValue {
- long long int id_;
+ long long int id_ = new_paje_id();
std::string name_;
std::string color_;
- Type* father_;
+ Type* parent_;
+
+ static xbt::signal<void(const EntityValue&)> on_creation;
public:
- explicit EntityValue(const std::string& name, const std::string& color, Type* father);
- const char* get_cname() { return name_.c_str(); }
- long long int get_id() { return id_; }
- void print();
+ static void on_creation_cb(const std::function<void(const EntityValue&)>& cb) { on_creation.connect(cb); }
+ explicit EntityValue(const std::string& name, const std::string& color, Type* parent);
+
+ long long int get_id() const { return id_; }
+ std::string get_name() const { return name_; }
+ const char* get_cname() const { return name_.c_str(); }
+ std::string get_color() const { return color_; }
+ Type* get_parent() const { return parent_; }
};
-}
-}
+} // namespace simgrid::instr
#endif