+ void remove_successor(ActivityPtr a)
+ {
+ if(this == a)
+ throw std::invalid_argument("Cannot ask to remove itself from successors list");
+
+ auto p = std::find_if(successors_.begin(), successors_.end(), [a](ActivityPtr const& i){ return i.get() == a.get(); });
+ if (p != successors_.end()){
+ successors_.erase(p);
+ a->dependencies_.erase({this});
+ } else
+ throw std::invalid_argument("Dependency does not exist. Can not be removed.");
+ }
+
+ static std::set<Activity*>* vetoed_activities_;
+
+ /** Set the [remaining] amount of work that this Activity will entail
+ *
+ * It is forbidden to change the amount of work once the Activity is started */
+ Activity* set_remaining(double remains);
+
+private:
+ static xbt::signal<void(Activity&)> on_veto;
+ static xbt::signal<void(Activity const&)> on_completion;
+ static xbt::signal<void(Activity const&)> on_suspended;
+ static xbt::signal<void(Activity const&)> on_resumed;
+