Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Enforce "Rule-of-Three/Five".
[simgrid.git] / src / smpi / include / smpi_actor.hpp
index c493f3a..067fe28 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2019. 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. */
@@ -17,9 +17,9 @@ namespace smpi {
 class ActorExt {
 private:
   double simulated_ = 0 /* Used to time with simulated_start/elapsed */;
-  simgrid::s4u::MailboxPtr mailbox_;
-  simgrid::s4u::MailboxPtr mailbox_small_;
-  xbt_mutex_t mailboxes_mutex_;
+  s4u::MailboxPtr mailbox_;
+  s4u::MailboxPtr mailbox_small_;
+  s4u::MutexPtr mailboxes_mutex_;
   xbt_os_timer_t timer_;
   MPI_Comm comm_self_   = MPI_COMM_NULL;
   MPI_Comm comm_intra_  = MPI_COMM_NULL;
@@ -28,9 +28,9 @@ private:
   int sampling_ = 0; /* inside an SMPI_SAMPLE_ block? */
   std::string instance_id_;
   bool replaying_ = false; /* is the process replaying a trace */
-  simgrid::s4u::Barrier* finalization_barrier_;
+  s4u::Barrier* finalization_barrier_;
   smpi_trace_call_location_t trace_call_loc_;
-  simgrid::s4u::ActorPtr actor_                  = nullptr;
+  s4u::ActorPtr actor_                           = nullptr;
   smpi_privatization_region_t privatized_region_ = nullptr;
   int optind                                     = 0; /*for getopt replacement */
 #if HAVE_PAPI
@@ -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();
@@ -52,9 +54,9 @@ public:
   smpi_trace_call_location_t* call_location();
   void set_privatized_region(smpi_privatization_region_t region);
   smpi_privatization_region_t privatized_region();
-  smx_mailbox_t mailbox();
-  smx_mailbox_t mailbox_small();
-  xbt_mutex_t mailboxes_mutex();
+  s4u::MailboxPtr mailbox() { return mailbox_; }
+  s4u::MailboxPtr mailbox_small() { return mailbox_small_; }
+  s4u::MutexPtr mailboxes_mutex();
 #if HAVE_PAPI
   int papi_event_set();
   papi_counter_t& papi_counters();