include.h
Go to the documentation of this file.00001
00002
00003 #ifndef INCLUDE_LIB
00004 #define INCLUDE_LIB
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #define UseExceptions // use C++ exceptions
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #define USING_DOUBLE // elements of type double
00028
00029
00030 #define bool_LIB 0 // for compatibility with my older libraries
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #define TypeDefException
00045
00046
00047
00048
00049
00050 #if defined __GNUG__ && __GNUG__ >= 3
00051 #define _STANDARD_ // use standard library
00052 #define ios_format_flags ios::fmtflags
00053 #endif
00054
00055
00056 #if defined __ICC
00057 #define _STANDARD_ // use standard library
00058 #define ios_format_flags ios::fmtflags
00059 #endif
00060
00061
00062 #if defined _MSC_VER && _MSC_VER >= 1300
00063 #define _STANDARD_ // use standard library
00064 #endif
00065
00066
00067 #ifdef _STANDARD_ // using standard library
00068 #include <cstdlib>
00069
00070
00071
00072 #ifdef WANT_STREAM
00073 #include <iostream>
00074 #include <iomanip>
00075 #endif
00076 #ifdef WANT_MATH
00077 #include <cmath>
00078 #endif
00079 #ifdef WANT_STRING
00080 #include <cstring>
00081 #endif
00082 #ifdef WANT_TIME
00083 #include <ctime>
00084 #endif
00085 #ifdef WANT_FSTREAM
00086 #include <fstream>
00087 #endif
00088 using namespace std;
00089 #else
00090
00091 #define DEFAULT_HEADER // use AT&T style header
00092
00093
00094 #ifdef _MSC_VER // Microsoft
00095 #include <stdlib.h>
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105 #ifdef WANT_STREAM
00106 #include <iostream.h>
00107 #include <iomanip.h>
00108 #endif
00109 #ifdef WANT_MATH
00110 #include <math.h>
00111 #include <float.h>
00112 #endif
00113 #ifdef WANT_STRING
00114 #include <string.h>
00115 #endif
00116 #ifdef WANT_TIME
00117 #include <time.h>
00118 #endif
00119 #ifdef WANT_FSTREAM
00120 #include <fstream.h>
00121 #endif
00122 #undef DEFAULT_HEADER
00123 #endif
00124
00125 #ifdef __ZTC__ // Zortech
00126 #include <stdlib.h>
00127 #ifdef WANT_STREAM
00128 #include <iostream.hpp>
00129 #include <iomanip.hpp>
00130 #define flush "" // not defined in iomanip?
00131 #endif
00132 #ifdef WANT_MATH
00133 #include <math.h>
00134 #include <float.h>
00135 #endif
00136 #ifdef WANT_STRING
00137 #include <string.h>
00138 #endif
00139 #ifdef WANT_TIME
00140 #include <time.h>
00141 #endif
00142 #ifdef WANT_FSTREAM
00143 #include <fstream.h>
00144 #endif
00145 #undef DEFAULT_HEADER
00146 #endif
00147
00148 #if defined __BCPLUSPLUS__ || defined __TURBOC__ // Borland or Turbo
00149 #include <stdlib.h>
00150 #ifdef WANT_STREAM
00151 #include <iostream.h>
00152 #include <iomanip.h>
00153 #endif
00154 #ifdef WANT_MATH
00155 #include <math.h>
00156 #include <float.h>
00157
00158
00159 #endif
00160 #ifdef WANT_STRING
00161 #include <string.h>
00162 #endif
00163 #ifdef WANT_TIME
00164 #include <time.h>
00165 #endif
00166 #ifdef WANT_FSTREAM
00167 #include <fstream.h>
00168 #endif
00169 #undef DEFAULT_HEADER
00170 #endif
00171
00172 #ifdef __GNUG__ // Gnu C++
00173 #include <stdlib.h>
00174 #ifdef WANT_STREAM
00175 #include <iostream.h>
00176 #include <iomanip.h>
00177 #endif
00178 #ifdef WANT_MATH
00179 #include <math.h>
00180 #include <float.h>
00181 #endif
00182 #ifdef WANT_STRING
00183 #include <string.h>
00184 #endif
00185 #ifdef WANT_TIME
00186 #include <time.h>
00187 #endif
00188 #ifdef WANT_FSTREAM
00189 #include <fstream.h>
00190 #endif
00191 #undef DEFAULT_HEADER
00192 #endif
00193
00194 #ifdef __WATCOMC__ // Watcom C/C++
00195 #include <stdlib.h>
00196 #ifdef WANT_STREAM
00197 #include <iostream.h>
00198 #include <iomanip.h>
00199 #endif
00200 #ifdef WANT_MATH
00201 #include <math.h>
00202 #include <float.h>
00203 #endif
00204 #ifdef WANT_STRING
00205 #include <string.h>
00206 #endif
00207 #ifdef WANT_TIME
00208 #include <time.h>
00209 #endif
00210 #ifdef WANT_FSTREAM
00211 #include <fstream.h>
00212 #endif
00213 #undef DEFAULT_HEADER
00214 #endif
00215
00216
00217 #ifdef macintosh // MPW C++ on the Mac
00218 #include <stdlib.h>
00219 #ifdef WANT_STREAM
00220 #include <iostream.h>
00221 #include <iomanip.h>
00222 #endif
00223 #ifdef WANT_MATH
00224 #include <float.h>
00225 #include <math.h>
00226 #endif
00227 #ifdef WANT_STRING
00228 #include <string.h>
00229 #endif
00230 #ifdef WANT_TIME
00231 #include <time.h>
00232 #endif
00233 #ifdef WANT_FSTREAM
00234 #include <fstream.h>
00235 #endif
00236 #undef DEFAULT_HEADER
00237 #endif
00238
00239 #ifdef use_float_h // use float.h for precision values
00240 #include <stdlib.h>
00241 #ifdef WANT_STREAM
00242 #include <iostream.h>
00243 #include <iomanip.h>
00244 #endif
00245 #ifdef WANT_MATH
00246 #include <float.h>
00247 #include <math.h>
00248 #endif
00249 #ifdef WANT_STRING
00250 #include <string.h>
00251 #endif
00252 #ifdef WANT_TIME
00253 #include <time.h>
00254 #endif
00255 #ifdef WANT_FSTREAM
00256 #include <fstream.h>
00257 #endif
00258 #undef DEFAULT_HEADER
00259 #endif
00260
00261
00262 #ifdef DEFAULT_HEADER // for example AT&T
00263 #define ATandT
00264 #include <stdlib.h>
00265 #ifdef WANT_STREAM
00266 #include <iostream.h>
00267 #include <iomanip.h>
00268 #endif
00269 #ifdef WANT_MATH
00270 #include <math.h>
00271 #define SystemV // use System V
00272 #include <values.h>
00273 #endif
00274 #ifdef WANT_STRING
00275 #include <string.h>
00276 #endif
00277 #ifdef WANT_TIME
00278 #include <time.h>
00279 #endif
00280 #ifdef WANT_FSTREAM
00281 #include <fstream.h>
00282 #endif
00283 #endif // DEFAULT_HEADER
00284
00285 #endif // _STANDARD_
00286
00287 #ifdef use_namespace
00288 namespace RBD_COMMON {
00289 #endif
00290
00291
00292 #ifdef USING_FLOAT // set precision type to float
00293 typedef float Real;
00294 typedef double long_Real;
00295 #endif
00296
00297 #ifdef USING_DOUBLE // set precision type to double
00298 typedef double Real;
00299 typedef long double long_Real;
00300 #endif
00301
00302
00303
00304
00305 #ifndef bool_LIB
00306 #define bool_LIB 0
00307
00308 class bool
00309 {
00310 int value;
00311 public:
00312 bool(const int b) { value = b ? 1 : 0; }
00313 bool(const void* b) { value = b ? 1 : 0; }
00314 bool() {}
00315 operator int() const { return value; }
00316 int operator!() const { return !value; }
00317 };
00318
00319
00320 const bool true = 1;
00321 const bool false = 0;
00322
00323 #endif
00324
00325
00326 #ifdef use_namespace
00327 }
00328 #endif
00329
00330
00331 #ifdef use_namespace
00332 namespace RBD_COMMON {}
00333 namespace RBD_LIBRARIES
00334 {
00335 using namespace RBD_COMMON;
00336 }
00337 #endif
00338
00339
00340 #endif