edits
authorPeizhao Ou <peizhaoo@uci.edu>
Thu, 28 Jan 2016 06:37:11 +0000 (22:37 -0800)
committerPeizhao Ou <peizhaoo@uci.edu>
Thu, 28 Jan 2016 06:37:11 +0000 (22:37 -0800)
notes/definition.cc [new file with mode: 0644]

diff --git a/notes/definition.cc b/notes/definition.cc
new file mode 100644 (file)
index 0000000..51fdd81
--- /dev/null
@@ -0,0 +1,34 @@
+#include <iostream>
+#include <vector>
+#include <string>
+#include <iterator>
+
+using namespace std;
+
+typedef struct MethodCall {
+       string interfaceName; // The interface label name
+       void *value; // The pointer that points to the struct that have the return
+                                // value and the arguments
+       void *localState; // The pointer that points to the struct that represents
+                                         // the (local) state
+       vector<MethodCall*> *prev; // Method calls that are hb right before me
+       vector<MethodCall*> *next; // Method calls that are hb right after me
+       vector<MethodCall*> *concurrent; // Method calls that are concurrent with me
+} MethodCall;
+
+typedef MethodCall *Method;
+typedef vector<Method> *MethodSet;
+
+#define NewSet new vector<Method>
+
+/**
+       The set here is a vector<MethodCall*>* type, or the MethodSet type. And the
+       item would become the MethodCall* type, or the Method type
+*/
+#define ForEach(item, set) \
+       for (int i = 0, Method item = (set)->size() > 0 ? (*(set))[0] : NULL; \
+               i < (set)->size(); i++, 
+
+int main() {
+       return 0;
+}