edits
[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 class Exception;
48 class ServerException;
49
50 //Code to write
51 class SecretKeySpec;
52 class Mac;
53 class SecureRandom;
54 class Thread;
55 class DataInputStream;
56 class URL;
57 class Random;
58 #endif