Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Constify.
[simgrid.git] / src / instr / instr_paje_containers.hpp
index 3e27997..0e49398 100644 (file)
@@ -21,6 +21,8 @@ class Container {
   std::string name_; /* Unique name of this container */
 public:
   Container(std::string name, const std::string& type_name, Container* father);
+  Container(const Container&) = delete;
+  Container& operator=(const Container&) = delete;
   virtual ~Container();
 
   Type* type_; /* Type of this container */
@@ -30,7 +32,7 @@ public:
 
   static Container* by_name_or_null(const std::string& name);
   static Container* by_name(const std::string& name);
-  std::string get_name() { return name_; }
+  const std::string& get_name() const { return name_; }
   const char* get_cname() { return name_.c_str(); }
   long long int get_id() { return id_; }
   void remove_from_parent();