Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

CommIncludes.h

Go to the documentation of this file.
00001 
00002 //
00003 //  Title     : CommIncludes.h
00004 //  Project   : OSCAR Version 2.0
00005 //  Created   : 
00006 //  Author    : Chetan Kapoor
00007 //  Platforms : UNIX & NT
00008 //  Copyright : Copyright© The University of Texas at Austin, 2002. All rights reserved.
00009 //                 
00010 //          This software and documentation constitute an unpublished work
00011 //          and contain valuable trade secrets and proprietary information
00012 //          belonging to the University. None of the foregoing material may be
00013 //          copied or duplicated or disclosed without the express, written
00014 //          permission of University. THE UNIVERSITY EXPRESSLY DISCLAIMS ANY
00015 //          AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION,
00016 //          INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
00017 //          PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY
00018 //          THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE.
00019 //          NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF
00020 //          THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall the
00021 //          University be liable for incidental, special, indirect, direct or
00022 //          consequential damages or loss of profits, interruption of business,
00023 //          or related expenses which may arise from use of software or documentation,
00024 //          including but not limited to those resulting from defects in software
00025 //          and/or documentation, or loss or inaccuracy of data of any kind.
00026 // 
00027 //    Purpose: Contains common include files for all platforms
00028 //
00029 //------------------------------------------------------------------------------
00030 //  
00031 //  $Revisions$
00032 //
00033 //  $Log: CommIncludes.h,v $
00034 //  Revision 1.17  2007/07/10 18:41:13  kapoorc
00035 //  Added #ifndef WINCE for Win32 Debug compiling
00036 //
00037 //  Revision 1.16  2006/05/10 18:39:19  chetan
00038 //  Removed #define TLS __thread for unix
00039 //
00040 //  Revision 1.15  2005/11/04 21:50:00  chetan
00041 //  Added include <assert.h> and also #ifndef for compiling VC memory leak checking stuff with ACE
00042 //
00043 //  Revision 1.14  2005/11/04 05:31:21  chetan
00044 //  Added some memory leak checking headers
00045 //
00046 //  Revision 1.13  2005/05/17 20:09:05  edjung
00047 //  Revised STATIC_THREAD_LOCAL macros and updated all libraries to use them
00048 //
00049 //  Revision 1.12  2005/04/07 15:57:09  chetan
00050 //  Added #pragma warning to disable stl warnings
00051 //
00052 //  Revision 1.11  2005/04/01 16:24:39  chetan
00053 //  Added #pragma that cause STL warnings when compiling under VC
00054 //
00055 //  Revision 1.10  2005/03/14 21:50:06  pmarch
00056 //  Added to namespace OSCAR and removed "RR" from front of class names.
00057 //
00058 //  Revision 1.9  2005/02/01 17:27:54  edjung
00059 //  Added macro includes for thread local storage.
00060 //
00061 //  Revision 1.8  2005/01/06 20:11:58  chetan
00062 //  Commented thread safe local storage for VC++ till C2483 bug is fixed
00063 //
00064 //  Revision 1.7  2005/01/06 19:37:48  chetan
00065 //  Added thread local storage definition for unix
00066 //
00067 //  Revision 1.6  2005/01/06 17:21:47  chetan
00068 //  Did a #define for thread local storage
00069 //
00070 //  Revision 1.5  2004/07/15 20:39:26  chetan
00071 //  Removed the static defnition of the const OSCARError's. Also, replaced use of strstream with use of sstream
00072 //
00073 //  Revision 1.4  2004/06/04 21:49:22  chetan
00074 //  using namespace std in CommIncludes.h was removed. std:: was added anywhere STL components such as iostream and vector were being used
00075 //
00076 //  Revision 1.3  2004/06/04 20:06:21  chetan
00077 //  Moved #include <string> from CommIncludes.h to String.h
00078 //
00079 //  Revision 1.2  2003/09/05 15:36:18  eswint
00080 //  - Changed default arguments OSCARError(0,"No Error"...) to OSCARError(noError) and String(" ") to String("")
00081 //  - Commented, format
00082 //
00083 //  Revision 1.1  2003/08/14 16:20:22  pmarch
00084 //  Added files to module
00085 //
00086 //
00088 #ifndef CommIncludes_h
00089 #define CommIncludes_h
00090 
00091 #ifdef _MSC_VER
00092 // Compilation Warning remover, used to skip some STL compilation warnings
00093 #  pragma warning (disable:4786)  // this warning occurs when VC6 truncate a debug symbol which is longer than 255 chars
00094 #  pragma warning (disable:4251)  // this warning occurs when a class member doesn't have a dll-interface.
00095 #  pragma warning (disable:4180)
00096 #  pragma warning (disable:4355)
00097 #endif // _MSC_VER
00098 
00099 #ifndef THREADSAFEOSCAR
00100 #ifndef WINCE
00101   #ifdef WIN32
00102   #define _CRTDBG_MAP_ALLOC   // enables memory leak detection
00103   #include <stdlib.h>
00104   #include <crtdbg.h>
00105   #endif
00106 #endif
00107 #endif
00108 
00109 
00110 //STL and iostream includes
00111 #include <cmath>
00112 #include <cstdlib>
00113 #include <ctime>
00114 #include <fstream>
00115 #include <functional>
00116 #include <iomanip>
00117 #include <iostream>
00118 #include <new>
00119 #include <sstream>
00120 #include <assert.h>
00121 
00122 #ifdef __unix
00123 
00124 #include <arpa/inet.h>
00125 #include <errno.h>
00126 #include <fcntl.h>
00127 #include <netinet/in.h>
00128 #include <sys/socket.h>
00129 #include <sys/stat.h>
00130 #include <sys/types.h>
00131 #include <termio.h>
00132 #include <time.h>
00133 #include <unistd.h>
00134 #endif
00135 
00136 #include "StaticThreadLocal.h"
00137 
00138 #ifdef THREADSAFEOSCAR
00139 
00140 #ifdef WIN32
00141 #define TLS 
00142 // comment the line above and uncomment below when the visual C++
00143 // bug related to compiler error C2483 gets fixed
00144 // #define TLS __declspec( thread )  // TLS (Thread Local Storage)
00145 #endif
00146 
00147 #ifdef __unix
00148 #define TLS   // TLS (Thread Local Storage)
00149 #endif
00150 
00151 #else
00152 
00153 #define TLS 
00154 
00155 #endif
00156 
00157 
00158 #endif //end of CommIncludes_h
RRG Homepage OSCAR Overview OSCAR Tutorials Simulations