Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
factor on_creation signal trigger in Host::seal()
[simgrid.git] / src / instr / instr_paje_values.hpp
index cec347f..9b3fa1e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2021. 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. */
@@ -13,13 +13,13 @@ namespace simgrid {
 namespace instr {
 
 class EntityValue {
-  long long int id_;
+  long long int id_ = new_paje_id();
   std::string name_;
   std::string color_;
   Type* father_;
 
 public:
-  static xbt::signal<void(EntityValue&)> on_creation;
+  static xbt::signal<void(const EntityValue&)> on_creation;
   explicit EntityValue(const std::string& name, const std::string& color, Type* father);
 
   long long int get_id() const { return id_; }