4 ms·
I always thought this framework was neat: https://doc.qt.io/qt-5/statemachine-api.html https://doc.qt.io/qt-5/statemachine-api.html Downside of course is now y
by dgfitz 2y ago
I always thought this framework was neat: https://doc.qt.io/qt-5/statemachine-api.html https://doc.qt.io/qt-5/statemachine-api.html
Downside of course is now you have a dependency on qt.
- alexvitkov 2y agoThe downside is that you're now heap allocating at least one object for every state, and I'm willing to bet that each QState has an associated std::vector-style list of actions, and that each action is also its own object on the heap. If you can afford to do things like this you can most likely use something other than C++ and save yourself a lot of headaches.
- dgfitz 2y ago> If you can afford to do things like this you can most likely use something other than C++ and save yourself a lot of headaches. Surely you can understand that, despite the recent c++ hate, my job doesn't give a fuck and we aren't migrating our massive codebase from c++ to... anything.