Replies: 1 comment
-
It is not mandatory to have the states defined outside of the derived FSM class, that's just the way that I originally wrote the examples. There is no reason why you can't define them as members. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing my code while working through
etl::fsm
examples, and a question arose: why are the states stored outside the FSM? In other words, what are the possible downsides of making the states members of the FSM class?In the context of the
QueuedFSM.cpp
example, this would mean that instead of havingstate1
andstate2
variables inmain()
, they are part of theFsm
class.What am I not seeing? What are the downsides? Is it compatibility with older C++ standards? Sheer object size? Something else?
Beta Was this translation helpful? Give feedback.
All reactions