edits
[iotcloud.git] / version2 / src / C / common.h
index 4803b60324198e17d8a96f5dbe02cf688a7bd4c4..1b6a8549d14da6c945ef0a14f6f7c3b651a241c2 100644 (file)
@@ -4,13 +4,21 @@
 typedef uint32_t uint;
 #define CMEMALLOC ;
 #define model_print printf
+#define ASSERT(expr) \
+       do {                         \
+               if (!(expr)) {                                                      \
+                       fprintf(stderr, "Error: assertion failed in %s at line %d\n", __FILE__, __LINE__); \
+                       /* print_trace(); // Trace printing may cause dynamic memory allocation */ \
+                       exit(EXIT_FAILURE);                                               \
+               }                                                                   \
+       } while (0)
 
 #include "hashset.h"
 #include "vector.h"
 #include "array.h"
 
 
-
+class TimingSingleton;
 class Abort;
 class Entry;
 class Slot;
@@ -20,7 +28,30 @@ class Commit;
 class CommitPart;
 class ArbitrationRound;
 class KeyValue;
-class IoTString;
 class RejectedMessage;
+class PendingTransaction;
+class CloudComm;
+class IoTString;
+class LastMessage;
+class LocalComm;
+class NewKey;
+class SlotBuffer;
+class SlotIndexer;
+class Table;
+class TableStatus;
+class TimingSingleton;
+class Transaction;
+class TransactionPart;
+class TransactionStatus;
+class Error;
+class Exception;
+class ServerException;
 
+//Code to write
+class AESKey;
+class Mac;
+class SecureRandom;
+class Thread;
+class Random;
+class Key;
 #endif