1 /*  Author: Jakub Ad�mek
2 	Purpose: Data types used in various places of my code */
3 
4 #ifndef _BANG_TYPES_H_
5 #define _BANG_TYPES_H_
6 
7 #ifdef _MSC_VER
8 	/** switch off some warnings */
9 	#pragma warning(disable:4355) // this used in base member initializer list
10 	#pragma warning(disable: 4250) // inherits via dominance
11 	#pragma warning(disable: 4786) // identifier was truncated
12 #endif
13 
14 #include "stream.h"
15 #include "slowstring.h"
16 #include "vector.h"
17 #include "map.h"
18 
19 class CXml;
20 #define CRox CXml
21 
22 class CDummy {
23 public:
Init()24 	virtual void Init () {}
25 };
26 
27 typedef int CInt;
28 typedef double CFloat;
29 #define STRUCT_BEGIN(x) class x : public CDummy \
30 	{ public: x(){Init();} CXml *print () const; CString read (CRox *xml);
31 #define STRUCT_END(x) };
32 
33 #define STRUCT_BEGIN_FROM(x,y) class x : public y { public: x(){Init();} CXml *print () const; CString read (CRox *xml);
34 #define STRUCT_END_FROM(x,y) };
35 
36 #define SMALLVECTOR(dummy,x,y) VECTOR(x,y)
37 
38 typedef TVector<CString> TVectorString;
39 
40 typedef int Mutex;
41 
42 /*
43 // G++ and MSVC cannot instanciate templates unless the whole source is included
44 // MSVC is so stupid that it doesn't recognize the .cc extension
45 //
46 
47 #ifndef _MSC_VER
48 	#include "../dict/array.cc"
49 	#include "../dict/vector.cc"
50 	#include "../dict/svector.cc"
51 	#include "../dict/set.cc"
52 	#include "../dict/pair.cc"
53 	#include "../dict/map.cc"
54 	#include "../dict/matrix.cc"
55 #else
56 	#include "../dict/array.cpp"
57 	#include "../dict/vector.cpp"
58 	#include "../dict/svector.cpp"
59 	#include "../dict/set.cpp"
60 	#include "../dict/pair.cpp"
61 	#include "../dict/map.cpp"
62 	#include "../dict/matrix.cpp"
63 #endif
64 */
65 
66 #include "matrix.h"
67 #include "enumstring.h"
68 
69 #endif
70