Next version of JABA
[jabaws.git] / binaries / src / muscle / types.h
1 #ifndef types_h\r
2 #define types_h\r
3 \r
4 typedef unsigned char byte;\r
5 typedef unsigned short ushort;\r
6 \r
7 typedef float SCOREMATRIX[32][32];\r
8 typedef SCOREMATRIX *PTR_SCOREMATRIX;\r
9 \r
10 class MSA;\r
11 class Seq;\r
12 class ClusterTree;\r
13 class DistFunc;\r
14 class TextFile;\r
15 class PWPath;\r
16 class Tree;\r
17 class SeqVect;\r
18 class DistCalc;\r
19 \r
20 struct ProgNode;\r
21 struct ProfPos;\r
22 \r
23 #if     SINGLE_AFFINE\r
24 // Compress M, D and I trace-back matrices into 4 bits\r
25 enum\r
26         {\r
27         BIT_MM = 0x00,\r
28         BIT_DM = 0x01,\r
29         BIT_IM = 0x02,\r
30         BIT_xM = 0x03,\r
31 \r
32         BIT_DD = 0x00,\r
33         BIT_MD = 0x04,\r
34         //  ID not allowed\r
35         BIT_xD = 0x04,\r
36 \r
37         BIT_II = 0x00,\r
38         BIT_MI = 0x08,\r
39         //  DI not allowed\r
40         BIT_xI = 0x08,\r
41         };\r
42 \r
43 #endif\r
44 \r
45 #if     DOUBLE_AFFINE\r
46 // Compress M, D, E, I and J trace-back matrices into 7 bits\r
47 enum\r
48         {\r
49         BIT_MM = 0x00,\r
50         BIT_DM = 0x01,\r
51         BIT_EM = 0x02,\r
52         BIT_IM = 0x03,\r
53         BIT_JM = 0x04,\r
54         BIT_xM = 0x07,\r
55 \r
56         BIT_DD = 0x00,\r
57         BIT_MD = 0x08,\r
58         // [EIJ]D not sallowed\r
59         BIT_xD = 0x08,\r
60 \r
61         BIT_EE = 0x00,\r
62         BIT_ME = 0x10,\r
63         //  [DDJ]E not allowed\r
64         BIT_xE = 0x10,\r
65 \r
66         BIT_II = 0x00,\r
67         BIT_MI = 0x20,\r
68         //  [EDJ]I not allowed\r
69         BIT_xI = 0x20,\r
70 \r
71         BIT_JJ = 0x00,\r
72         BIT_MJ = 0x40,\r
73         //  [EDI]J not allowed\r
74         BIT_xJ = 0x40,\r
75         };\r
76 #endif\r
77 \r
78 enum EXIT\r
79         {\r
80         EXIT_Success = 0,\r
81         EXIT_NotStarted = 1,\r
82         EXIT_FatalError = 2,\r
83         EXIT_Except = 3,\r
84         };\r
85 \r
86 enum NODECMP\r
87         {\r
88         NODECMP_Undefined = 0,\r
89         NODECMP_Same = 0,               // equivalent to node in old tree\r
90         NODECMP_Diff = 1,               // equivalent & parent is changed\r
91         NODECMP_Changed = 2             // no equivalent node in old tree\r
92         };\r
93 \r
94 // Declare enums using macro hacks (see enums.h).\r
95 #define s(t)    enum t { t##_Undefined = 0,\r
96 #define c(t, x) t##_##x,\r
97 #define e(t)    };\r
98 #include "enums.h"\r
99 \r
100 // Declare conversion function XXXToStr(XXX x)\r
101 // for each enum type XXX.\r
102 #define s(t)    const char *t##ToStr(t x);\r
103 #define c(t, x) /* empty */\r
104 #define e(t)    /* empty */\r
105 #include "enums.h"\r
106 \r
107 // Declare conversion function StrToXXX(const char *Str)\r
108 // for each enum type XXX.\r
109 #define s(t)    t StrTo##t(const char *Str);\r
110 #define c(t, x) /* empty */\r
111 #define e(t)    /* empty */\r
112 #include "enums.h"\r
113 \r
114 const char *BoolToStr(bool b);\r
115 const char *SecsToStr(unsigned long Secs);\r
116 \r
117 #endif // types_h\r