PIStateMachine "addOnFinish" renamed to "setOnFinish"

This commit is contained in:
2024-08-28 13:48:33 +03:00
parent 14cf81aed0
commit af8c096c7a
2 changed files with 2 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ int main(int argc, char * argv[]) {
bool posted;
PIStateMachine * root = new PIStateMachine("Machine");
root->addOnFinish([] { piCout << "finish"; });
root->setOnFinish([] { piCout << "finish"; });
PIStateLambda * s1 = new PIStateLambda([] { piCout << "+ enter s1"; }, [] { piCout << "- exit s1"; }, "s1");
PIStateLambda * s2 = new PIStateLambda([] { piCout << "+ enter s2"; }, [] { piCout << "- exit s2"; }, "s2");