a3888cdab908ac9ef145fdbd8414f2446054ae6e
[iotcloud.git] / version2 / src / C / common.h
1 #ifndef COMMON_H
2 #define COMMON_H
3 #include <inttypes.h>
4 typedef uint32_t uint;
5 #define CMEMALLOC ;
6 #define model_print printf
7 #define ASSERT(expr) \
8         do {                         \
9                 if (!(expr)) {                                                      \
10                         fprintf(stderr, "Error: assertion failed in %s at line %d\n", __FILE__, __LINE__); \
11                         /* print_trace(); // Trace printing may cause dynamic memory allocation */ \
12                         exit(EXIT_FAILURE);                                               \
13                 }                                                                   \
14         } while (0)
15
16 #include "hashset.h"
17 #include "vector.h"
18 #include "array.h"
19
20
21 class TimingSingleton;
22 class Abort;
23 class Entry;
24 class Slot;
25 class ByteBuffer;
26 class Liveness;
27 class Commit;
28 class CommitPart;
29 class ArbitrationRound;
30 class KeyValue;
31 class RejectedMessage;
32 class PendingTransaction;
33 class CloudComm;
34 class IoTString;
35 class LastMessage;
36 class LocalComm;
37 class NewKey;
38 class SlotBuffer;
39 class SlotIndexer;
40 class Table;
41 class TableStatus;
42 class TimingSingleton;
43 class Transaction;
44 class TransactionPart;
45 class TransactionStatus;
46 class Error;
47
48 //Code to write
49 class SecretKeySpec;
50 class Mac;
51 class SecureRandom;
52 class Thread;
53 class DataInputStream;
54 class URL;
55 class Random;
56 #endif