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

Function main

examples/api/moore_machine.cpp:43–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

ToggleClass · 0.70

Tested by

no test coverage detected