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


rl_agent
Author(s): Todd Hester
autogenerated on Thu Jun 6 2019 22:00:13