Class Concurrence
Defined in File concurrence.hpp
Inheritance Relationships
Base Type
public yasmin::State(Class State)
Class Documentation
-
class Concurrence : public yasmin::State
Runs a series of states in parallel.
The Concurrence class runs a set of states concurrently, waiting for the termination of each, and then returns a single output according to a provided rule map, or a default outcome if no rule is satisfied.
Public Types
Public Functions
Constructs a State with a set of possible outcomes.
- Parameters:
outcomes – A set of possible outcomes for this state.
Executes the state’s specific logic.
This method is intended to be overridden by derived classes to provide specific execution logic.
-
virtual void cancel_state() override
Cancels the current state execution.
This method sets the canceled flag to true and logs the action.
Protected Attributes
-
const std::string default_outcome
Default outcome.
-
OutcomeMap outcome_map
Specifies which combination of state outputs should produce a given overall output
-
std::map<std::shared_ptr<State>, std::shared_ptr<std::string>> intermediate_outcome_map
Stores the intermedaite outcomes of the concurrent states.
-
std::set<std::string> possible_outcomes
The set of possible outcomes.