Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Enforce "Rule-of-Three/Five".
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 Feb 2019 14:11:36 +0000 (15:11 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 27 Feb 2019 14:35:11 +0000 (15:35 +0100)
42 files changed:
examples/s4u/app-bittorrent/s4u-bittorrent.hpp
examples/s4u/dht-chord/s4u-dht-chord.hpp
examples/s4u/dht-kademlia/message.hpp
include/simgrid/Exception.hpp
include/simgrid/jedule/jedule.hpp
include/simgrid/jedule/jedule_events.hpp
include/simgrid/jedule/jedule_platform.hpp
include/simgrid/kernel/future.hpp
include/simgrid/kernel/resource/Action.hpp
include/simgrid/kernel/resource/Model.hpp
include/simgrid/kernel/routing/DijkstraZone.hpp
include/simgrid/kernel/routing/DragonflyZone.hpp
include/simgrid/kernel/routing/FatTreeZone.hpp
include/simgrid/kernel/routing/FloydZone.hpp
include/simgrid/kernel/routing/FullZone.hpp
include/simgrid/kernel/routing/NetZoneImpl.hpp
include/simgrid/plugins/file_system.h
include/xbt/Extendable.hpp
include/xbt/backtrace.hpp
src/instr/instr_paje_containers.hpp
src/kernel/EngineImpl.hpp
src/kernel/context/Context.hpp
src/kernel/context/ContextSwapped.hpp
src/kernel/context/ContextThread.hpp
src/kernel/resource/profile/trace_mgr.hpp
src/mc/mc_unw.hpp
src/msg/msg_private.hpp
src/simix/ActorImpl.hpp
src/smpi/include/smpi_actor.hpp
src/smpi/include/smpi_datatype.hpp
src/smpi/include/smpi_datatype_derived.hpp
src/smpi/include/smpi_topo.hpp
src/smpi/include/smpi_win.hpp
src/surf/PropertyHolder.hpp
src/surf/StorageImpl.hpp
src/surf/cpu_cas01.hpp
src/surf/cpu_interface.hpp
src/surf/cpu_ti.hpp
src/surf/network_ib.hpp
src/surf/network_interface.hpp
src/surf/ptask_L07.hpp
src/xbt/backtrace.cpp

index 4b1728b..69759e6 100644 (file)
@@ -90,6 +90,8 @@ public:
     std::string descr = std::string("RngSream<") + host->get_cname() + ">";
     stream_           = RngStream_CreateStream(descr.c_str());
   }
+  HostBittorrent(const HostBittorrent&) = delete;
+  HostBittorrent& operator=(const HostBittorrent&) = delete;
 
   ~HostBittorrent() { RngStream_DeleteStream(&stream_); };
 
index 0ca638a..7db25b1 100644 (file)
@@ -33,6 +33,8 @@ public:
     std::string descr = std::string("RngSream<") + host->get_cname() + ">";
     stream_           = RngStream_CreateStream(descr.c_str());
   }
+  HostChord(const HostChord&) = delete;
+  HostChord& operator=(const HostChord&) = delete;
 
   ~HostChord() { RngStream_DeleteStream(&stream_); };
 
index 5a19b91..04306c0 100644 (file)
@@ -33,6 +33,8 @@ public:
       : Message(sender_id, destination_id, nullptr, mailbox, hostname)
   {
   }
+  Message(const Message&) = delete;
+  Message& operator=(const Message&) = delete;
   ~Message()
   {
     if (issuer_host_name_)
index 0e2ce75..6de2686 100644 (file)
@@ -53,8 +53,7 @@ public:
 
 /** Create a ThrowPoint with (__FILE__, __LINE__, __func__) */
 #define XBT_THROW_POINT                                                                                                \
-  ::simgrid::xbt::ThrowPoint(__FILE__, __LINE__, __func__, std::move(simgrid::xbt::Backtrace()), xbt_procname(),       \
-                             xbt_getpid())
+  ::simgrid::xbt::ThrowPoint(__FILE__, __LINE__, __func__, simgrid::xbt::Backtrace(), xbt_procname(), xbt_getpid())
 } // namespace xbt
 
 /** Ancestor class of all SimGrid exception */
index 0fe8532..fd39db5 100644 (file)
@@ -17,6 +17,8 @@ namespace jedule{
 class XBT_PUBLIC Jedule {
 public:
   Jedule()=default;
+  Jedule(const Jedule&) = delete;
+  Jedule& operator=(const Jedule&) = delete;
   ~Jedule();
   std::vector<Event*> event_set_;
   Container* root_container_ = nullptr;
index d57b864..21e4aa9 100644 (file)
@@ -20,6 +20,8 @@ namespace jedule{
 class XBT_PUBLIC Event {
 public:
   Event(std::string name, double start_time, double end_time, std::string type);
+  Event(const Event&) = delete;
+  Event& operator=(const Event&) = delete;
   ~Event();
   void add_characteristic(char* characteristic);
   void add_resources(std::vector<sg_host_t>* host_selection);
index 5ce6ae0..0d8cf5c 100644 (file)
@@ -18,6 +18,8 @@ namespace jedule{
 class XBT_PUBLIC Container {
 public:
   explicit Container(std::string name);
+  Container(const Container&) = delete;
+  Container& operator=(const Container&) = delete;
   virtual ~Container();
 private:
   int last_id_;
index 810e9dd..10ec3e0 100644 (file)
@@ -291,6 +291,7 @@ class Future {
 public:
   Future() = default;
   explicit Future(std::shared_ptr<FutureState<T>> state) : state_(std::move(state)) {}
+  ~Future() = default;
 
   // Move type:
   Future(Future&) = delete;
index bde56a2..6ce0e7c 100644 (file)
@@ -98,6 +98,8 @@ public:
    * @param var The lmm variable associated to this Action if it is part of a LMM component
    */
   Action(Model* model, double cost, bool failed, lmm::Variable* var);
+  Action(const Action&) = delete;
+  Action& operator=(const Action&) = delete;
 
   virtual ~Action();
 
index 9520ef2..49918bb 100644 (file)
@@ -28,6 +28,8 @@ public:
   };
 
   explicit Model(Model::UpdateAlgo algo);
+  Model(const Model&) = delete;
+  Model& operator=(const Model&) = delete;
 
   virtual ~Model();
 
index c180b75..3ae74ff 100644 (file)
@@ -25,7 +25,8 @@ namespace routing {
 class XBT_PRIVATE DijkstraZone : public RoutedZone {
 public:
   DijkstraZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel, bool cached);
-  void seal() override;
+  DijkstraZone(const DijkstraZone&) = delete;
+  DijkstraZone& operator=(const DijkstraZone&) = delete;
 
   ~DijkstraZone() override;
 
@@ -46,6 +47,7 @@ public:
    * After this function returns, any node in the graph
    * will have a loopback attached to it.
    */
+  void seal() override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* route, double* lat) override;
   void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                  std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
index aaec77a..f1c16f4 100644 (file)
@@ -23,6 +23,8 @@ public:
   resource::LinkImpl** green_links_ = nullptr;
   resource::LinkImpl** my_nodes_    = nullptr;
   DragonflyRouter(int i, int j, int k);
+  DragonflyRouter(const DragonflyRouter&) = delete;
+  DragonflyRouter& operator=(const DragonflyRouter&) = delete;
   ~DragonflyRouter();
 };
 
@@ -62,6 +64,8 @@ public:
 class XBT_PUBLIC DragonflyZone : public ClusterZone {
 public:
   explicit DragonflyZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel);
+  DragonflyZone(const DragonflyZone&) = delete;
+  DragonflyZone& operator=(const DragonflyZone&) = delete;
   ~DragonflyZone() override;
   //      void create_links_for_node(sg_platf_cluster_cbarg_t cluster, int id, int rank, int position) override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
index bcc3f5a..9539888 100644 (file)
@@ -99,6 +99,8 @@ public:
 class XBT_PRIVATE FatTreeZone : public ClusterZone {
 public:
   explicit FatTreeZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel);
+  FatTreeZone(const FatTreeZone&) = delete;
+  FatTreeZone& operator=(const FatTreeZone&) = delete;
   ~FatTreeZone() override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
 
index 0ecc05b..6bebe5c 100644 (file)
@@ -24,6 +24,8 @@ namespace routing {
 class XBT_PRIVATE FloydZone : public RoutedZone {
 public:
   explicit FloydZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel);
+  FloydZone(const FloydZone&) = delete;
+  FloydZone& operator=(const FloydZone&) = delete;
   ~FloydZone() override;
 
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
index 87f4c5d..2cf77e7 100644 (file)
@@ -21,9 +21,11 @@ namespace routing {
 class XBT_PRIVATE FullZone : public RoutedZone {
 public:
   explicit FullZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel);
-  void seal() override;
+  FullZone(const FullZone&) = delete;
+  FullZone& operator=(const FullZone) = delete;
   ~FullZone() override;
 
+  void seal() override;
   void get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* into, double* latency) override;
   void add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, NetPoint* gw_dst,
                  std::vector<resource::LinkImpl*>& link_list, bool symmetrical) override;
index cb5b62f..b8720fa 100644 (file)
@@ -52,6 +52,8 @@ class XBT_PUBLIC NetZoneImpl {
 
 protected:
   explicit NetZoneImpl(NetZoneImpl* father, std::string name, resource::NetworkModel* network_model);
+  NetZoneImpl(const NetZoneImpl&) = delete;
+  NetZoneImpl& operator=(const NetZoneImpl&) = delete;
   virtual ~NetZoneImpl();
 
 public:
index 0df1458..7538d38 100644 (file)
@@ -90,6 +90,8 @@ class XBT_PUBLIC File {
 public:
   File(std::string fullpath, void* userdata);
   File(std::string fullpath, sg_host_t host, void* userdata);
+  File(const File&) = delete;
+  File& operator=(const File&) = delete;
   ~File();
 
   /** Retrieves the path to the file */
@@ -135,6 +137,8 @@ class XBT_PUBLIC FileSystemStorageExt {
 public:
   static simgrid::xbt::Extension<Storage, FileSystemStorageExt> EXTENSION_ID;
   explicit FileSystemStorageExt(Storage* ptr);
+  FileSystemStorageExt(const FileSystemStorageExt&) = delete;
+  FileSystemStorageExt& operator=(const FileSystemStorageExt&) = delete;
   ~FileSystemStorageExt();
   std::map<std::string, sg_size_t>* parse_content(const std::string& filename);
   std::map<std::string, sg_size_t>* get_content() { return content_; }
@@ -153,6 +157,8 @@ class XBT_PUBLIC FileDescriptorHostExt {
 public:
   static simgrid::xbt::Extension<Host, FileDescriptorHostExt> EXTENSION_ID;
   FileDescriptorHostExt() = default;
+  FileDescriptorHostExt(const FileDescriptorHostExt&) = delete;
+  FileDescriptorHostExt& operator=(const FileDescriptorHostExt&) = delete;
   ~FileDescriptorHostExt() { delete file_descriptor_table; }
   std::vector<int>* file_descriptor_table = nullptr; // Created lazily on need
 };
index b6be879..a157c67 100644 (file)
@@ -67,6 +67,8 @@ public:
     return Extension<T, U>(extension_create([](void* p) { delete static_cast<U*>(p); }));
   }
   Extendable() : extensions_(deleters_.size(), nullptr) {}
+  Extendable(const Extendable&) = delete;
+  Extendable& operator=(const Extendable&) = delete;
   ~Extendable()
   {
     /* Call destructors in reverse order of their registrations
index 35dc7b7..220ed64 100644 (file)
@@ -40,6 +40,9 @@ public:
   BacktraceImpl* impl_ = nullptr;
   Backtrace();
   Backtrace(const Backtrace& bt);
+  Backtrace(Backtrace&& bt);
+  Backtrace& operator=(const Backtrace& rhs);
+  Backtrace& operator=(Backtrace&& rhs);
   ~Backtrace();
   /** @brief Translate the backtrace in a human friendly form, unmangled with source code locations. */
   std::string const resolve() const;
index 3e27997..da60460 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 */
index 58c0b63..27530d9 100644 (file)
@@ -15,6 +15,8 @@ namespace kernel {
 class EngineImpl {
 public:
   EngineImpl();
+  EngineImpl(const EngineImpl&) = delete;
+  EngineImpl& operator=(const EngineImpl&) = delete;
   virtual ~EngineImpl();
   kernel::routing::NetZoneImpl* netzone_root_ = nullptr;
 
index e1e7bf1..4486bd0 100644 (file)
@@ -19,6 +19,8 @@ namespace context {
 class XBT_PUBLIC ContextFactory {
 public:
   explicit ContextFactory() {}
+  ContextFactory(const ContextFactory&) = delete;
+  ContextFactory& operator=(const ContextFactory&) = delete;
   virtual ~ContextFactory();
   virtual Context* create_context(std::function<void()> code, smx_actor_t actor) = 0;
 
@@ -71,7 +73,8 @@ public:
 class XBT_PUBLIC AttachContext : public Context {
 public:
   AttachContext(std::function<void()> code, smx_actor_t actor) : Context(std::move(code), actor) {}
-
+  AttachContext(const AttachContext&) = delete;
+  AttachContext& operator=(const AttachContext&) = delete;
   ~AttachContext() override;
 
   /** Called by the context when it is ready to give control
index 507fbb0..0195e1b 100644 (file)
@@ -19,6 +19,8 @@ class SwappedContextFactory : public ContextFactory {
   friend SwappedContext; // Reads whether we are in parallel mode
 public:
   SwappedContextFactory();
+  SwappedContextFactory(const SwappedContextFactory&) = delete;
+  SwappedContextFactory& operator=(const SwappedContextFactory&) = delete;
   ~SwappedContextFactory() override;
   void run_all() override;
 
@@ -36,6 +38,8 @@ private:
 class SwappedContext : public Context {
 public:
   SwappedContext(std::function<void()> code, smx_actor_t get_actor, SwappedContextFactory* factory);
+  SwappedContext(const SwappedContext&) = delete;
+  SwappedContext& operator=(const SwappedContext&) = delete;
   virtual ~SwappedContext();
 
   void suspend() override;
index 6f6125a..47be1bb 100644 (file)
@@ -21,6 +21,8 @@ namespace context {
 class XBT_PUBLIC ThreadContext : public AttachContext {
 public:
   ThreadContext(std::function<void()> code, smx_actor_t actor, bool maestro);
+  ThreadContext(const ThreadContext&) = delete;
+  ThreadContext& operator=(const ThreadContext&) = delete;
   ~ThreadContext() override;
   void stop() override;
   void suspend() override;
@@ -80,6 +82,8 @@ private:
 class ThreadContextFactory : public ContextFactory {
 public:
   ThreadContextFactory();
+  ThreadContextFactory(const ThreadContextFactory&) = delete;
+  ThreadContextFactory& operator=(const ThreadContextFactory&) = delete;
   ~ThreadContextFactory() override;
   ThreadContext* create_context(std::function<void()> code, smx_actor_t actor) override
   {
index 16c33e1..c0abe9e 100644 (file)
@@ -94,6 +94,8 @@ private:
 class XBT_PUBLIC FutureEvtSet {
 public:
   FutureEvtSet();
+  FutureEvtSet(const FutureEvtSet&) = delete;
+  FutureEvtSet& operator=(const FutureEvtSet&) = delete;
   virtual ~FutureEvtSet();
   double next_date() const;
   Event* pop_leq(double date, double* value, resource::Resource** resource);
index 466b3df..4e949d4 100644 (file)
@@ -50,6 +50,7 @@ class UnwindContext {
 public:
   UnwindContext() = default;
   UnwindContext(const UnwindContext&) = default;
+  UnwindContext& operator=(const UnwindContext&) = default;
   ~UnwindContext() { clear(); }
   void initialize(simgrid::mc::RemoteClient* process, unw_context_t* c);
   void clear();
index 42fae27..0b832de 100644 (file)
@@ -21,7 +21,6 @@ class Task {
   long long int id_;
 
 public:
-  ~Task();
   explicit Task(std::string name, double flops_amount, double bytes_amount, void* data)
       : name_(std::move(name)), userdata_(data), flops_amount(flops_amount), bytes_amount(bytes_amount)
   {
@@ -30,6 +29,9 @@ public:
     if (MC_is_active())
       MC_ignore_heap(&(id_), sizeof(id_));
   }
+  Task(const Task&) = delete;
+  Task& operator=(const Task&) = delete;
+  ~Task();
   void set_used();
   void set_not_used() { this->is_used = false; }
 
index f8d8102..14af36a 100644 (file)
@@ -34,6 +34,8 @@ class XBT_PUBLIC ActorImpl : public surf::PropertyHolder {
 public:
   xbt::string name_;
   ActorImpl(xbt::string name, s4u::Host* host);
+  ActorImpl(const ActorImpl&) = delete;
+  ActorImpl& operator=(const ActorImpl&) = delete;
   ~ActorImpl();
 
   double get_kill_time();
index 7389c39..067fe28 100644 (file)
@@ -40,6 +40,8 @@ private:
 #endif
 public:
   explicit ActorExt(simgrid::s4u::ActorPtr actor, simgrid::s4u::Barrier* barrier);
+  ActorExt(const ActorExt&) = delete;
+  ActorExt& operator=(const ActorExt&) = delete;
   ~ActorExt();
   void set_data(const char* instance_id);
   void finalize();
index b183c19..6c8b8d9 100644 (file)
@@ -98,6 +98,8 @@ public:
   Datatype(int size, MPI_Aint lb, MPI_Aint ub, int flags);
   Datatype(char* name, int size, MPI_Aint lb, MPI_Aint ub, int flags);
   Datatype(Datatype* datatype, int* ret);
+  Datatype(const Datatype&) = delete;
+  Datatype& operator=(const Datatype&) = delete;
   virtual ~Datatype();
 
   char* name();
index 7f9864b..30b4e9e 100644 (file)
@@ -18,6 +18,8 @@ class Type_Contiguous: public Datatype {
 
 public:
   Type_Contiguous(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, MPI_Datatype old_type);
+  Type_Contiguous(const Type_Contiguous&) = delete;
+  Type_Contiguous& operator=(const Type_Contiguous&) = delete;
   ~Type_Contiguous();
   void serialize(void* noncontiguous, void* contiguous, int count);
   void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op);
@@ -32,6 +34,8 @@ class Type_Hvector: public Datatype{
 public:
   Type_Hvector(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int block_length, MPI_Aint block_stride,
                MPI_Datatype old_type);
+  Type_Hvector(const Type_Hvector&) = delete;
+  Type_Hvector& operator=(const Type_Hvector&) = delete;
   ~Type_Hvector();
   void serialize(void* noncontiguous, void* contiguous, int count);
   void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op);
@@ -54,6 +58,8 @@ public:
                 MPI_Aint* block_indices, MPI_Datatype old_type);
   Type_Hindexed(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int* block_lengths, int* block_indices,
                 MPI_Datatype old_type, MPI_Aint factor);
+  Type_Hindexed(const Type_Hindexed&) = delete;
+  Type_Hindexed& operator=(const Type_Hindexed&) = delete;
   ~Type_Hindexed();
   void serialize(void* noncontiguous, void* contiguous, int count);
   void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op);
@@ -74,6 +80,8 @@ class Type_Struct: public Datatype{
 public:
   Type_Struct(int size, MPI_Aint lb, MPI_Aint ub, int flags, int block_count, int* block_lengths,
               MPI_Aint* block_indices, MPI_Datatype* old_types);
+  Type_Struct(const Type_Struct&) = delete;
+  Type_Struct& operator=(const Type_Struct&) = delete;
   ~Type_Struct();
   void serialize(void* noncontiguous, void* contiguous, int count);
   void unserialize(void* contiguous_vector, void* noncontiguous_vector, int count, MPI_Op op);
index 2ba978f..35e3196 100644 (file)
@@ -33,6 +33,8 @@ class Topo_Cart: public Topo {
     int *position_;
   public:
     explicit Topo_Cart(int ndims);
+    Topo_Cart(const Topo_Cart&) = delete;
+    Topo_Cart& operator=(const Topo_Cart&) = delete;
     ~Topo_Cart();
     Topo_Cart(MPI_Comm comm_old, int ndims, int dims[], int periods[], int reorder, MPI_Comm *comm_cart);
     Topo_Cart* sub(const int remain_dims[], MPI_Comm *newcomm) ;
@@ -52,6 +54,8 @@ class Topo_Graph: public Topo {
     int *edges_;
   public:
     Topo_Graph();
+    Topo_Graph(const Topo_Graph&) = delete;
+    Topo_Graph& operator=(const Topo_Graph&) = delete;
     ~Topo_Graph();
 };
 
@@ -63,6 +67,8 @@ class Topo_Dist_Graph: public Topo {
     int *out_weights_;
   public:
     Topo_Dist_Graph();
+    Topo_Dist_Graph(const Topo_Dist_Graph&) = delete;
+    Topo_Dist_Graph& operator=(const Topo_Dist_Graph&) = delete;
     ~Topo_Dist_Graph();
 };
 
index ade6075..beee0b4 100644 (file)
@@ -48,6 +48,8 @@ public:
 
   Win(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, int allocated = 0, int dynamic = 0);
   Win(MPI_Info info, MPI_Comm comm) : Win(MPI_BOTTOM, 0, 1, info, comm, 0, 1) {};
+  Win(const Win&) = delete;
+  Win& operator=(const Win&) = delete;
   ~Win();
   int attach (void *base, MPI_Aint size);
   int detach (void *base);
index 04ff488..5f39e63 100644 (file)
@@ -19,6 +19,8 @@ class PropertyHolder { // DO NOT DERIVE THIS CLASS, or the diamond inheritance m
 
 public:
   PropertyHolder() = default;
+  PropertyHolder(const PropertyHolder&) = delete;
+  PropertyHolder& operator=(const PropertyHolder&) = delete;
   ~PropertyHolder();
 
   const char* get_property(const std::string& key);
index 145b7f8..e3c508a 100644 (file)
@@ -51,6 +51,8 @@ simgrid::xbt::signal<void(StorageAction*, kernel::resource::Action::State, kerne
 class StorageModel : public kernel::resource::Model {
 public:
   StorageModel();
+  StorageModel(const StorageModel&) = delete;
+  StorageModel& operator=(const StorageModel&) = delete;
   ~StorageModel();
 
   virtual StorageImpl* createStorage(std::string id, std::string type_id, std::string content_name,
@@ -69,6 +71,8 @@ public:
   /** @brief Storage constructor */
   StorageImpl(kernel::resource::Model* model, const std::string& name, kernel::lmm::System* maxmin_system, double bread,
               double bwrite, std::string type_id, std::string content_name, sg_size_t size, std::string attach);
+  StorageImpl(const StorageImpl&) = delete;
+  StorageImpl& operator=(const StorageImpl&) = delete;
 
   ~StorageImpl() override;
 
index 7d076d4..23aa4aa 100644 (file)
@@ -24,6 +24,8 @@ class XBT_PRIVATE CpuCas01Action;
 class CpuCas01Model : public simgrid::surf::CpuModel {
 public:
   explicit CpuCas01Model(kernel::resource::Model::UpdateAlgo algo);
+  CpuCas01Model(const CpuCas01Model&) = delete;
+  CpuCas01Model& operator=(const CpuCas01Model&) = delete;
   ~CpuCas01Model() override;
 
   Cpu* create_cpu(simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core) override;
@@ -36,6 +38,8 @@ public:
 class CpuCas01 : public Cpu {
 public:
   CpuCas01(CpuCas01Model* model, simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core);
+  CpuCas01(const CpuCas01&) = delete;
+  CpuCas01& operator=(const CpuCas01&) = delete;
   ~CpuCas01() override;
   void apply_event(simgrid::kernel::profile::Event* event, double value) override;
   CpuAction* execution_start(double size) override;
@@ -59,6 +63,8 @@ public:
                  kernel::lmm::Constraint* constraint, int core_count);
   CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
                  kernel::lmm::Constraint* constraint);
+  CpuCas01Action(const CpuCas01Action&) = delete;
+  CpuCas01Action& operator=(const CpuCas01Action&) = delete;
   ~CpuCas01Action() override;
   int requested_core();
 
index 74bd125..93bc683 100644 (file)
@@ -76,6 +76,8 @@ public:
   Cpu(simgrid::kernel::resource::Model * model, simgrid::s4u::Host * host, std::vector<double> * speedPerPstate,
       int core);
 
+  Cpu(const Cpu&) = delete;
+  Cpu& operator=(const Cpu&) = delete;
   ~Cpu();
 
   /**
index 2e9ec6d..2b3dff1 100644 (file)
@@ -77,6 +77,8 @@ class XBT_PRIVATE CpuTiAction : public CpuAction {
   friend class CpuTi;
 public:
   CpuTiAction(CpuTi* cpu, double cost);
+  CpuTiAction(const CpuTiAction&) = delete;
+  CpuTiAction& operator=(const CpuTiAction&) = delete;
   ~CpuTiAction();
 
   void set_state(kernel::resource::Action::State state) override;
@@ -101,6 +103,8 @@ typedef boost::intrusive::list<CpuTiAction, ActionTiListOptions > ActionTiList;
 class CpuTi : public Cpu {
 public:
   CpuTi(CpuTiModel* model, simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core);
+  CpuTi(const CpuTi&)            = delete;
+  CpuTi& operator&(const CpuTi&) = delete;
   ~CpuTi() override;
 
   void set_speed_profile(kernel::profile::Profile* profile) override;
@@ -140,6 +144,8 @@ public:
   static void create_pm_vm_models(); // Make both models be TI models
 
   CpuTiModel();
+  CpuTiModel(const CpuTiModel&) = delete;
+  CpuTiModel& operator=(const CpuTiModel&) = delete;
   ~CpuTiModel() override;
   Cpu* create_cpu(simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core) override;
   double next_occuring_event(double now) override;
index 13ce97a..f15fcfd 100644 (file)
@@ -49,6 +49,8 @@ private:
 public:
   NetworkIBModel();
   explicit NetworkIBModel(const char* name);
+  NetworkIBModel(const NetworkIBModel&) = delete;
+  NetworkIBModel& operator=(const NetworkIBModel&) = delete;
   ~NetworkIBModel() override;
   void updateIBfactors(NetworkAction* action, IBNode* from, IBNode* to, int remove);
 
index 6cc74b2..de80df1 100644 (file)
@@ -37,6 +37,8 @@ public:
   static simgrid::config::Flag<bool> cfg_crosstraffic;
 
   explicit NetworkModel(Model::UpdateAlgo algo) : Model(algo) {}
+  NetworkModel(const NetworkModel&) = delete;
+  NetworkModel& operator=(const NetworkModel&) = delete;
   ~NetworkModel() override;
 
   /**
@@ -113,6 +115,8 @@ public:
 class LinkImpl : public Resource, public simgrid::surf::PropertyHolder {
 protected:
   LinkImpl(NetworkModel* model, const std::string& name, lmm::Constraint* constraint);
+  LinkImpl(const LinkImpl&) = delete;
+  LinkImpl& operator=(const LinkImpl&) = delete;
   ~LinkImpl() override;
 
 public:
index 6cba667..c5781cf 100644 (file)
@@ -36,6 +36,8 @@ class XBT_PRIVATE L07Action;
 class HostL07Model : public HostModel {
 public:
   HostL07Model();
+  HostL07Model(const HostL07Model&) = delete;
+  HostL07Model& operator=(const HostL07Model&) = delete;
   ~HostL07Model() override;
 
   double next_occuring_event(double now) override;
@@ -47,6 +49,8 @@ public:
 class CpuL07Model : public CpuModel {
 public:
   CpuL07Model(HostL07Model* hmodel, kernel::lmm::System* sys);
+  CpuL07Model(const CpuL07Model&) = delete;
+  CpuL07Model& operator=(const CpuL07Model&) = delete;
   ~CpuL07Model();
 
   Cpu* create_cpu(simgrid::s4u::Host* host, std::vector<double>* speed_per_pstate, int core) override;
@@ -56,6 +60,8 @@ public:
 class NetworkL07Model : public kernel::resource::NetworkModel {
 public:
   NetworkL07Model(HostL07Model* hmodel, kernel::lmm::System* sys);
+  NetworkL07Model(const NetworkL07Model&) = delete;
+  NetworkL07Model& operator=(const NetworkL07Model&) = delete;
   ~NetworkL07Model();
   kernel::resource::LinkImpl* create_link(const std::string& name, double bandwidth, double latency,
                                           s4u::Link::SharingPolicy policy) override;
@@ -72,6 +78,8 @@ public:
 class CpuL07 : public Cpu {
 public:
   CpuL07(CpuL07Model* model, s4u::Host* host, std::vector<double>* speed_per_pstate, int core);
+  CpuL07(const CpuL07&) = delete;
+  CpuL07& operator=(const CpuL07&) = delete;
   ~CpuL07() override;
   bool is_used() override;
   void apply_event(kernel::profile::Event* event, double value) override;
@@ -91,6 +99,8 @@ class LinkL07 : public kernel::resource::LinkImpl {
 public:
   LinkL07(NetworkL07Model* model, const std::string& name, double bandwidth, double latency,
           s4u::Link::SharingPolicy policy);
+  LinkL07(const LinkL07&) = delete;
+  LinkL07& operator=(const LinkL07&) = delete;
   ~LinkL07() override;
   bool is_used() override;
   void apply_event(kernel::profile::Event* event, double value) override;
@@ -111,6 +121,8 @@ class L07Action : public CpuAction {
 public:
   L07Action(kernel::resource::Model* model, size_t host_nb, s4u::Host* const* host_list, const double* flops_amount,
             const double* bytes_amount, double rate);
+  L07Action(const L07Action&) = delete;
+  L07Action& operator=(const L07Action&) = delete;
   ~L07Action();
 
   void updateBound();
index 7af4ee6..b9f4009 100644 (file)
@@ -84,6 +84,27 @@ Backtrace::Backtrace(const Backtrace& bt)
     impl_->ref();
 }
 
+Backtrace::Backtrace(Backtrace&& bt)
+{
+  impl_    = bt.impl_;
+  bt.impl_ = nullptr;
+}
+
+Backtrace& Backtrace::operator=(const Backtrace& rhs)
+{
+  impl_ = rhs.impl_;
+  if (impl_)
+    impl_->ref();
+  return *this;
+}
+
+Backtrace& Backtrace::operator=(Backtrace&& rhs)
+{
+  impl_     = rhs.impl_;
+  rhs.impl_ = nullptr;
+  return *this;
+}
+
 Backtrace::~Backtrace()
 {
   if (impl_ != nullptr && impl_->unref()) {