include.h

00001 //$$ include.h           include files required by various versions of C++
00002 
00003 #ifndef INCLUDE_LIB
00004 #define INCLUDE_LIB
00005 
00006 #ifdef HAVE_CONFIG_H
00007 #include "OPT++_config.h"
00008 #endif
00009 
00010 #ifdef HAVE_NAMESPACES
00011 #define use_namespace                   // define name spaces
00012 #endif
00013 
00014 #define SETUP_C_SUBSCRIPTS              // allow element access via A[i][j]
00015 
00016 #define OPT_COMPATIBLE                  // for use with opt++
00017 
00018 // Activate just one of the following 3 statements
00019 
00020 #define SimulateExceptions              // use simulated exceptions
00021 //#define UseExceptions                   // use C++ exceptions
00022 //#define DisableExceptions               // do not use exceptions
00023 
00024 
00025 #define TEMPS_DESTROYED_QUICKLY         // for compilers that delete
00026                                         // temporaries too quickly
00027 
00028 //#define TEMPS_DESTROYED_QUICKLY_R       // the same thing but applied
00029                                         // to return from functions only
00030 
00031 //#define DO_FREE_CHECK                   // check news and deletes balance
00032 
00033 #define USING_DOUBLE                    // elements of type double
00034 //#define USING_FLOAT                   // elements of type float
00035 
00036 #define bool_LIB 0                      // for compatibility with my older libraries
00037 
00038 //#define ios_format_flags ios::fmtflags  // for Gnu 3 and Intel for Linux
00039 
00040 //#define _STANDARD_                    // using standard library
00041 
00042 //#define use_float_h                   // use float.h for precision data
00043 
00044 
00045 //#define HAS_INT64                     // if unsigned _int64 is recognised
00046                                         // used by newran03
00047                                         
00048 // comment out next line if Exception causes a problem
00049 #define TypeDefException
00050 
00051 //*********************** end of options set by user ********************
00052 
00053 
00054 // for Gnu C++ version 3
00055 #if defined __GNUG__ && __GNUG__ >= 3
00056    #define _STANDARD_                   // use standard library
00057    #define ios_format_flags ios::fmtflags
00058 #endif
00059 
00060 // for Intel C++ for Linux
00061 #if defined __ICC
00062    #define _STANDARD_                   // use standard library
00063    #define ios_format_flags ios::fmtflags
00064 #endif
00065 
00066 
00067 #ifdef _STANDARD_                       // using standard library
00068    #include <cstdlib>
00069    #ifdef _MSC_VER
00070       #include <limits>                 // for VC++6
00071    #endif
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                                         // if no other compiler is recognised
00093 
00094 #ifdef _MSC_VER                         // Microsoft
00095    #include <stdlib.h>
00096 
00097 //   reactivate these statements to run under MSC version 7.0
00098 //   typedef int jmp_buf[9];
00099 //   extern "C"
00100 //   {
00101 //      int __cdecl setjmp(jmp_buf);
00102 //      void __cdecl longjmp(jmp_buf, int);
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>            // Borland has both float and values
00157                                     // but values.h returns +INF for
00158                                     // MAXDOUBLE in BC5
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 __PGI                         // Gnu 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 #ifdef __WATCOMC__                      // Watcom C/C++
00217    #include <stdlib.h>
00218    #ifdef WANT_STREAM
00219       #include <iostream.h>
00220       #include <iomanip.h>
00221    #endif
00222    #ifdef WANT_MATH
00223       #include <math.h>
00224       #include <float.h>
00225    #endif
00226    #ifdef WANT_STRING
00227       #include <string.h>
00228    #endif
00229    #ifdef WANT_TIME
00230       #include <time.h>
00231    #endif
00232    #ifdef WANT_FSTREAM
00233       #include <fstream.h>
00234    #endif
00235    #undef DEFAULT_HEADER
00236 #endif
00237 
00238 
00239 #ifdef macintosh                        // MPW C++ on the Mac
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 #ifdef use_float_h                      // use float.h for precision values
00262 #include <stdlib.h>
00263 #ifdef WANT_STREAM
00264 #include <iostream.h>
00265 #include <iomanip.h>
00266 #endif
00267 #ifdef WANT_MATH
00268 #include <float.h>
00269 #include <math.h>
00270 #endif
00271 #ifdef WANT_STRING
00272 #include <string.h>
00273 #endif
00274 #ifdef WANT_TIME
00275 #include <time.h>
00276 #endif
00277 #ifdef WANT_FSTREAM
00278 #include <fstream.h>
00279 #endif
00280 #undef DEFAULT_HEADER
00281 #endif
00282 
00283 
00284 #ifdef DEFAULT_HEADER                   // for example AT&T
00285 #define ATandT
00286 #include <stdlib.h>
00287 #ifdef WANT_STREAM
00288 #include <iostream.h>
00289 #include <iomanip.h>
00290 #endif
00291 #ifdef WANT_MATH
00292 #include <math.h>
00293 #define SystemV                         // use System V
00294 #include <values.h>
00295 #endif
00296 #ifdef WANT_STRING
00297 #include <string.h>
00298 #endif
00299 #ifdef WANT_TIME
00300 #include <time.h>
00301 #endif
00302 #ifdef WANT_FSTREAM
00303 #include <fstream.h>
00304 #endif
00305 #endif                                  // DEFAULT_HEADER
00306 
00307 #endif                                  // _STANDARD_
00308 
00309 #ifdef use_namespace
00310 namespace RBD_COMMON {
00311 #endif
00312 
00313 
00314 #ifdef USING_FLOAT                      // set precision type to float
00315 typedef float Real;
00316 typedef double long_Real;
00317 #endif
00318 
00319 #ifdef USING_DOUBLE                     // set precision type to double
00320 typedef double Real;
00321 typedef long double long_Real;
00322 #endif
00323 
00324 
00325 #ifdef use_namespace
00326 }
00327 #endif
00328 
00329 
00330 #ifdef use_namespace
00331 namespace RBD_COMMON {}
00332 namespace RBD_LIBRARIES                 // access all my libraries
00333 {
00334    using namespace RBD_COMMON;
00335 }
00336 #endif
00337 
00338 
00339 #endif
Generated on Mon Jan 24 12:04:37 2011 for FASTlib by  doxygen 1.6.3