From be714a09b5c3ca65b966a91eab291be885872796 Mon Sep 17 00:00:00 2001 From: Peizhao Ou Date: Wed, 27 Jan 2016 22:37:11 -0800 Subject: [PATCH] edits --- notes/definition.cc | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 notes/definition.cc diff --git a/notes/definition.cc b/notes/definition.cc new file mode 100644 index 0000000..51fdd81 --- /dev/null +++ b/notes/definition.cc @@ -0,0 +1,34 @@ +#include +#include +#include +#include + +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 *prev; // Method calls that are hb right before me + vector *next; // Method calls that are hb right after me + vector *concurrent; // Method calls that are concurrent with me +} MethodCall; + +typedef MethodCall *Method; +typedef vector *MethodSet; + +#define NewSet new vector + +/** + The set here is a vector* 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; +} -- 2.34.1