X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/285132b31c7186e9b1d67b2ce96b02d216886a9f..d6eb772e45cc853fc204bb5aebeb411cdfa7c929:/src/mc/api/ActorState.hpp diff --git a/src/mc/api/ActorState.hpp b/src/mc/api/ActorState.hpp index 9f29307935..97cf05af91 100644 --- a/src/mc/api/ActorState.hpp +++ b/src/mc/api/ActorState.hpp @@ -40,7 +40,7 @@ class ActorState { * such transitions such that `pending_transitions_[i]` represents * the variation of the transition with `times_considered = i`. * - * TODO: If only a subset of transitions of an actor that can + * @note: If only a subset of transitions of an actor that can * take multiple transitions in some state are truly enabled, * we would instead need to map `times_considered` to a transition, * as the map is currently implicit in the ordering of the transitions @@ -94,7 +94,7 @@ public: unsigned int do_consider() { if (max_consider_ <= times_considered_ + 1) - set_done(); + mark_done(); return times_considered_++; } unsigned int get_times_considered() const { return times_considered_; } @@ -112,7 +112,7 @@ public: this->state_ = InterleavingType::todo; this->times_considered_ = 0; } - void set_done() { this->state_ = InterleavingType::done; } + void mark_done() { this->state_ = InterleavingType::done; } inline Transition* get_transition(unsigned times_considered) { @@ -131,6 +131,11 @@ public: aid_, times_considered); this->pending_transitions_[times_considered] = std::move(t); } + + const std::vector>& get_enabled_transitions() const + { + return this->pending_transitions_; + }; }; } // namespace simgrid::mc