Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix host name issue with ns3 wifi, add ssid, set active probing to false
[simgrid.git] / src / instr / instr_paje_types.hpp
index c5b8149226f90d525bbe96acdfda95421d099603..e23ddc2d68e72ab3b5f62d91451366fcdbd79a9b 100644 (file)
@@ -21,22 +21,26 @@ class Type {
   std::string name_;
   std::string color_;
   Type* father_;
+  std::map<std::string, std::unique_ptr<Type>> children_;
+  Container* issuer_ = nullptr;
+
+protected:
+  Container* get_issuer() const { return issuer_; }
 
 public:
   static xbt::signal<void(Type&, e_event_type event_type)> on_creation;
-  std::map<std::string, std::unique_ptr<Type>> children_;
-  Container* issuer_ = nullptr;
 
   Type(e_event_type event_type, const std::string& name, const std::string& alias, const std::string& color,
        Type* father);
   virtual ~Type() = default;
 
-  long long int get_id() { return id_; }
+  long long int get_id() const { return id_; }
   const std::string& get_name() const { return name_; }
-  const char* get_cname() { return name_.c_str(); }
+  const char* get_cname() const { return name_.c_str(); }
   const std::string& get_color() const { return color_; }
   Type* get_father() const { return father_; }
-  bool is_colored() { return not color_.empty(); }
+  const std::map<std::string, std::unique_ptr<Type>>& get_children() const { return children_; }
+  bool is_colored() const { return not color_.empty(); }
 
   Type* by_name(const std::string& name);
   LinkType* by_name_or_create(const std::string& name, Type* source, Type* dest);
@@ -53,8 +57,6 @@ public:
     issuer_ = container;
     return this;
   }
-
-  void log_definition(Type* source, Type* dest);
 };
 
 class ContainerType : public Type {