1 #ifndef BLANK_APP_STATECONTROL_HPP_
2 #define BLANK_APP_STATECONTROL_HPP_
9 class HeadlessApplication;
15 // add state to the front
20 // swap state at the front
21 void Switch(State *s) {
22 cue.emplace(SWITCH, s);
25 // remove state at the front
31 // application will exit if nothing is pushed after this
36 // pop states until this one is on top
37 void PopAfter(State *s) {
38 cue.emplace(POP_AFTER, s);
41 // pop states until this one is removed
42 void PopUntil(State *s) {
43 cue.emplace(POP_UNTIL, s);
47 void Commit(HeadlessApplication &);
61 explicit Memo(Command c, State *s = nullptr): state(s), cmd(c) { }