Simple StateMachine in C++ using member function pointers, with code auto-generation from YAML