/**
* @brief The transitions that the actor is allowed to execute from this
* state, viz. those that are enabled for this actor
/**
* @brief The transitions that the actor is allowed to execute from this
* state, viz. those that are enabled for this actor
* This means there may be a way to store the list once and apply differences
* rather than repeating elements frequently.
*/
* This means there may be a way to store the list once and apply differences
* rather than repeating elements frequently.
*/
/* Possible exploration status of an actor transition in a state.
* Either the checker did not consider the transition, or it was considered and still to do, or considered and
/* Possible exploration status of an actor transition in a state.
* Either the checker did not consider the transition, or it was considered and still to do, or considered and
public:
ActorState(aid_t aid, bool enabled, unsigned int max_consider) : ActorState(aid, enabled, max_consider, {}) {}
public:
ActorState(aid_t aid, bool enabled, unsigned int max_consider) : ActorState(aid, enabled, max_consider, {}) {}
- ActorState(aid_t aid, bool enabled, unsigned int max_consider, std::vector<std::unique_ptr<Transition>> transitions)
+ ActorState(aid_t aid, bool enabled, unsigned int max_consider, std::vector<std::shared_ptr<Transition>> transitions)
: pending_transitions_(std::move(transitions)), aid_(aid), max_consider_(max_consider), enabled_(enabled)
{
}
: pending_transitions_(std::move(transitions)), aid_(aid), max_consider_(max_consider), enabled_(enabled)
{
}
inline Transition* get_transition(unsigned times_considered)
{
xbt_assert(times_considered < this->pending_transitions_.size(),
inline Transition* get_transition(unsigned times_considered)
{
xbt_assert(times_considered < this->pending_transitions_.size(),
inline void set_transition(std::unique_ptr<Transition> t, unsigned times_considered)
{
xbt_assert(times_considered < this->pending_transitions_.size(),
inline void set_transition(std::unique_ptr<Transition> t, unsigned times_considered)
{
xbt_assert(times_considered < this->pending_transitions_.size(),
"yet one was attempted to be set",
aid_, times_considered);
this->pending_transitions_[times_considered] = std::move(t);
"yet one was attempted to be set",
aid_, times_considered);
this->pending_transitions_[times_considered] = std::move(t);