]> AND Public Git Repository - simgrid.git/blobdiff - include/simgrid/s4u/Activity.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more sg_exec functions
[simgrid.git] / include / simgrid / s4u / Activity.hpp
index e92d768c4a4f791b326c75b1e20457e1b045f451..2572d61eee062d06acb6ecfa88b343d00cfbbb5f 100644 (file)
@@ -27,8 +27,6 @@ namespace s4u {
 class XBT_PUBLIC Activity {
   friend Comm;
   friend Exec;
-  friend ExecSeq;
-  friend ExecPar;
   friend Io;
 
 protected:
@@ -69,7 +67,9 @@ public:
   Activity& operator=(Activity const&) = delete;
 #endif
 
-  enum class State { INITED = 0, STARTING, STARTED, CANCELED, ERRORED, FINISHED };
+  enum class State { INITED = 0, STARTING, STARTED, CANCELED,
+      // ERRORED, // FIXME: state has never been used
+      FINISHED };
 
   /** Starts a previously created activity.
    *
@@ -90,8 +90,9 @@ public:
   /** Retrieve the current state of the activity */
   Activity::State get_state() const { return state_; }
   void set_state(Activity::State state) { state_ = state; }
-  /** Tests whether the given activity is terminated yet. This is a pure function. */
-  virtual bool test() = 0;
+  /** Tests whether the given activity is terminated yet. */
+  virtual bool test();
+
   virtual const char* get_cname() const       = 0;
   virtual const std::string& get_name() const = 0;