-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstate.hpp
More file actions
33 lines (29 loc) · 975 Bytes
/
state.hpp
File metadata and controls
33 lines (29 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* mini-cp is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License v3
* as published by the Free Software Foundation.
*
* mini-cp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with mini-cp. If not, see http://www.gnu.org/licenses/lgpl-3.0.en.html
*
* Copyright (c) 2018. by Laurent Michel, Pierre Schaus, Pascal Van Hentenryck
*/
#ifndef __STATE_H
#define __STATE_H
#include <functional>
#include "handle.hpp"
class StateManager {
public:
StateManager() {}
virtual ~StateManager() {}
typedef handle_ptr<StateManager> Ptr;
virtual void enable() {}
virtual void saveState() = 0;
virtual void restoreState() = 0;
virtual void withNewState(const std::function<void(void)>& body) = 0;
};
#endif