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

Public GIT Repository
remove old dot loader
[simgrid.git] / include / simgrid / s4u / Activity.hpp
index 8e9e8abe9feb49a2818d1b06a93ba81f64d5f42c..6b4ceaefcd7bdd985753fb58bd30e3b14da36d16 100644 (file)
@@ -42,6 +42,8 @@ public:
   virtual bool is_assigned() const = 0;
   virtual bool dependencies_solved() const { return dependencies_.empty(); }
   virtual unsigned long is_waited_by() const { return successors_.size(); }
+  const std::set<ActivityPtr>& get_dependencies() const { return dependencies_; }
+  const std::vector<ActivityPtr>& get_successors() const { return successors_; }
 
 protected:
   Activity()  = default;
@@ -164,6 +166,11 @@ public:
    * It is forbidden to change the amount of work once the Activity is started */
   Activity* set_remaining(double remains);
 
+  double get_start_time() const;
+  double get_finish_time() const;
+  void mark() { marked_ = true; }
+  bool is_marked() const { return marked_; }
+
   /** Returns the internal implementation of this Activity */
   kernel::activity::ActivityImpl* get_impl() const { return pimpl_.get(); }
 
@@ -189,6 +196,7 @@ private:
   Activity::State state_                   = Activity::State::INITED;
   double remains_                          = 0;
   bool suspended_                          = false;
+  bool marked_                             = false;
   std::vector<ActivityPtr> successors_;
   std::set<ActivityPtr> dependencies_;
   std::atomic_int_fast32_t refcount_{0};