tabbing
[iotcloud.git] / version2 / src / C / common.h
index 764c2f283658f57561922bab995cdafd65414f4b..a3888cdab908ac9ef145fdbd8414f2446054ae6e 100644 (file)
@@ -4,6 +4,14 @@
 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"
@@ -20,8 +28,29 @@ 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;
 
+//Code to write
+class SecretKeySpec;
+class Mac;
+class SecureRandom;
+class Thread;
+class DataInputStream;
+class URL;
+class Random;
 #endif