1 #ifndef __ardour_state_manager_h__
2 #define __ardour_state_manager_h__
8 #include <sigc++/signal.h>
10 #include <ardour/ardour.h>
14 typedef uint32_t state_id_t;
16 class StateManager : public sigc::trackable
20 std::string operation;
21 State (std::string why) : operation (why) {}
25 typedef std::list<State*> StateMap;
28 virtual ~StateManager ();
30 virtual void drop_all_states ();
31 virtual void use_state (state_id_t);
32 virtual void save_state (std::string why);
34 sigc::signal<void,Change> StateChanged;
36 state_id_t _current_state_id;
38 static void prohibit_save ();
39 static void allow_save (const char* why, bool dosave);
42 static bool _allow_save;
43 static std::set<StateManager*> deferred;
47 virtual Change restore_state (State&) = 0;
48 virtual State* state_factory (std::string why) const = 0;
49 virtual void send_state_changed (Change);
54 #endif /* __ardour_state_manager_h__ */