X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/efee1893d1b905f1181db807b66965f1828dcea2..6f8347f58430e00fabef8e6cbbf3fb94e6b8a49d:/include/simgrid/plugins/task.hpp diff --git a/include/simgrid/plugins/task.hpp b/include/simgrid/plugins/task.hpp index a652cb65d7..87a357be43 100644 --- a/include/simgrid/plugins/task.hpp +++ b/include/simgrid/plugins/task.hpp @@ -29,6 +29,8 @@ struct ExtendedAttributeActivity { Task* task_; }; +class XBT_PUBLIC Token : public xbt::Extendable {}; + class Task { std::set successors_ = {}; std::map predecessors_ = {}; @@ -40,8 +42,8 @@ class Task { protected: std::string name_; double amount_; - std::shared_ptr token_ = NULL; - std::deque>> tokens_received_; + std::shared_ptr token_ = nullptr; + std::deque>> tokens_received_; int queued_execs_ = 0; int count_ = 0; bool working_ = false; @@ -64,8 +66,8 @@ public: void enqueue_execs(int n); void set_amount(double amount); double get_amount() const { return amount_; } - void set_token(std::shared_ptr token); - std::map> get_tokens() const; + void set_token(std::shared_ptr token); + std::shared_ptr get_next_token_from(TaskPtr t); void add_successor(TaskPtr t); void remove_successor(TaskPtr t); void remove_all_successors();