#include <list>
#include <string>
-#include <vector>
+#include <set>
#include <sigc++/signal.h>
typedef uint32_t state_id_t;
-
class StateManager : public sigc::trackable
{
public:
state_id_t _current_state_id;
- static void set_allow_save (bool);
- static bool allow_save ();
+ virtual bool should_save_state () const { return true; }
+
+ static void prohibit_save ();
+ static void allow_save (const char* why, bool dosave);
protected:
static bool _allow_save;
- typedef std::pair<StateManager*,std::string> DeferredSave;
- static std::vector<DeferredSave> deferred;
+ static sigc::signal<void,const char*> SaveAllowed;
StateMap states;