X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4baeceb26e6cfc594ba0bd184ee0a755e47a2a85..1f53e33771f1e35a28358934a12e3a057fe56a4c:/include/simgrid/s4u/Activity.hpp diff --git a/include/simgrid/s4u/Activity.hpp b/include/simgrid/s4u/Activity.hpp index ff42c98447..b7d3594980 100644 --- a/include/simgrid/s4u/Activity.hpp +++ b/include/simgrid/s4u/Activity.hpp @@ -88,6 +88,8 @@ protected: throw std::invalid_argument("Dependency does not exist. Can not be removed."); } + static std::set* vetoed_activities_; + public: /*! Signal fired each time that the activity fails to start because of a veto (e.g., unsolved dependency or no * resource assigned) */ @@ -100,10 +102,15 @@ public: XBT_CVERB(s4u_activity, "'%s' is assigned to a resource and all dependencies are solved. Let's start", get_cname()); start(); } else { + if (vetoed_activities_ != nullptr) + vetoed_activities_->insert(this); on_veto(*this); } } + static std::set* get_vetoed_activities() { return vetoed_activities_; } + static void set_vetoed_activities(std::set* whereto) { vetoed_activities_ = whereto; } + #ifndef DOXYGEN Activity(Activity const&) = delete; Activity& operator=(Activity const&) = delete;