CCAFFEINE
0.8.8
|
00001 #ifndef jcpp_h_seen 00002 00021 #define jcpp_h_seen 00022 00023 #include <string> 00024 #ifdef HAVE_CLASSIC 00025 #include <cca.h> //fixme! 00026 #endif 00027 00028 /* failure to remove the following keywords will induce 00029 compiler errors. 00030 */ 00031 #define abstract kill_me_now_abstract 00032 #define final kill_me_now_final 00033 #define implements replace_me_now_implements_colon 00034 #define native kill_me_now_native 00035 #define interface kill_me_now_native 00036 00037 /* including the evil, unenforceable one from C */ 00038 #ifndef CONST 00039 #define CONST 00040 #endif 00041 00042 /* where public is irrelevant in c++ (on class names) upcase the p to kill it */ 00043 #define Public kill_me_now_Public 00044 /* private likewise */ 00045 #define Private kill_me_now_Private 00046 00047 /* where abstract is equivalent of virtual in member function definitions fix */ 00048 #define Abstract kill_me_now_Abstract 00049 00050 /* make single inheritance work most of the time. 00051 Where a class inherits only interfaces by 'implements' 00052 then a : will need to be inserted manually. 00053 */ 00054 #define extends replace_me_now_extends_colon 00055 00056 00057 /* some c++ compilers don't support boolean. assume char. */ 00058 #if (defined(__GNUC__) || defined(__xlC__)) 00059 #define HAVE_BOOLEAN 1 00060 #undef TRUE 00061 #define TRUE 1 00062 #undef FALSE 00063 #define FALSE 0 00064 #endif 00065 00066 #ifndef HAVE_BOOLEAN 00067 #undef boolean 00068 #undef bool 00069 #undef true 00070 #undef false 00071 #define bool char 00072 #define boolean char 00073 #define true 1 00074 #define false 0 00075 #endif 00076 00077 /* java's Class is most distantly approximated by c++ type_info */ 00078 /* type_info instance ti has the following usefulmethods: 00079 char * ti.name(); 00080 bool operator== (const type_info& arg) const; 00081 bool operator!= (const type_info& arg) const; 00082 */ 00083 #if (defined(__KCC) || defined(__SUNPRO_CC) || defined(__sgi)) 00084 #include <string.h> 00085 #include <stdio.h> 00086 #include <stdlib.h> 00087 //#include <typeinfo.h> 00088 #include <assert.h> 00089 #else 00090 #include <cstring> 00091 #include <cstdio> 00092 #include <cstdlib> 00093 //#include <typeinfo> 00094 #include <cassert> 00095 #endif // __SUNPRO_CC 00096 /* stl : we will not use it in a java emulator. */ 00097 // #include <string> 00098 // #define String string 00099 00101 #define JCPP_USE_NAMESPACES 0 00102 00103 // eschew exceptions: #include "jc++/lang/ExceptionJC.h" 00104 #include "jc++/lang/Object.h" 00105 00110 #define JCPN(jcppClassName) jcpp::jcppClassName 00111 00112 #endif // jcpp_h_seen