A simple C++ finite state machine library