MCPcopy Create free account
hub / github.com/digint/tinyfsm / main

Function main

examples/api/mealy_machine.cpp:49–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47// Main
48//
49int main()
50{
51 Switch::start();
52
53 std::cout << "> You are facing a light switch..." << std::endl;
54 while(1)
55 {
56 char c;
57 std::cout << std::endl << "t=Toggle, q=Quit ? ";
58 std::cin >> c;
59 switch(c) {
60 case 't':
61 std::cout << "> Toggling switch..." << std::endl;
62 Switch::dispatch(Toggle());
63 break;
64 case 'q':
65 return 0;
66 default:
67 std::cout << "> Invalid input" << std::endl;
68 };
69 }
70}

Callers

nothing calls this directly

Calls 1

ToggleClass · 0.70

Tested by

no test coverage detected