We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 964610d commit 43e09d8Copy full SHA for 43e09d8
include/maxplus/base/fsm/fsm.h
@@ -169,6 +169,10 @@ class SetOfStates : public std::map<CId, std::shared_ptr<State>> {
169
public:
170
void remove(const State &s) { this->erase(s.getId()); }
171
virtual ~SetOfStates() = default;
172
+ void addState(const std::shared_ptr<State> &s) {
173
+ this->insert(std::make_pair(s->getId(), s));
174
+ }
175
+
176
State& withId(const CId id) {
177
return *this->at(id);
178
}
@@ -384,6 +388,7 @@ class SetOfStates : public Abstract::SetOfStates {
384
388
385
389
386
390
void addState(std::shared_ptr<State<StateLabelType, EdgeLabelType>>& s) {
391
+ Abstract::SetOfStates::addState(std::dynamic_pointer_cast<Abstract::State>(s));
387
392
this->addToStateIndex(s->getLabel(), s);
393
394
0 commit comments