Refined the FSM to allow easily passing in data to the even handler and state functions.

This commit is contained in:
Zed A. Shaw 2024-09-16 07:50:04 -04:00
parent 40ba7f0b66
commit c9425aebf9
7 changed files with 75 additions and 74 deletions

View file

@ -53,7 +53,7 @@ class Builder : DeadSimpleFSM<BuildState, BuildEvent> {
string read_line(FILE *build_out, bool &done_out);
FILE *start_command(string &build_cmd);
void event(BuildEvent ev) override {
void event(BuildEvent ev) {
try {
if(ev == QUIT) {
exit(ev);