Merge commit: branch 'work'
[model-checker.git] / snapshot-interface.h
index 0c2478ee67abb38b817106a876899803fa458771..cbebcd58f84a5902fcb784de16f0d439b137513b 100644 (file)
@@ -5,8 +5,36 @@
 #include <vector>
 #include <utility>
 #include <string>
-typedef std::basic_string< char, std::char_traits< char >, MyAlloc< char > > MyString;
-namespace snapshot_utils{
-       std::vector< std::pair< void *, size_t >, MyAlloc< std::pair< void *, size_t > > > ReturnGlobalSegmentsToSnapshot();
+#include <map>
+#include <set>
+#include "snapshot.h"
+#include "libthreads.h"
+
+class snapshotStack;
+typedef std::basic_string<char, std::char_traits<char>, MyAlloc<char> > MyString;
+
+void SnapshotGlobalSegments();
+
+struct stackEntry {
+  struct stackEntry *next;
+  snapshot_id snapshotid;
+  int index;
+};
+
+class snapshotStack {
+ public:
+  MEMALLOC
+  snapshotStack( );
+  ~snapshotStack();
+  int backTrackBeforeStep(int seq_index);
+  void snapshotStep(int seq_index);
+
+ private: 
+  struct stackEntry * stack;
 };
+
+/* Not sure what it even means to have more than one snapshot object,
+   so let's just make a global reference to it.*/
+
+extern snapshotStack * snapshotObject;
 #endif