Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

dtool/src/dtoolbase/dtoolbase.h

Go to the documentation of this file.
00001 /* Filename: dtoolbase.h
00002  * Created by:  drose (12Sep00)
00003  *
00004  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00005  *
00006  * PANDA 3D SOFTWARE
00007  * Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008  *
00009  * All use of this software is subject to the terms of the Panda 3d
00010  * Software license.  You should have received a copy of this license
00011  * along with this source code; you will also find a current copy of
00012  * the license at http://www.panda3d.org/license.txt .
00013  *
00014  * To contact the maintainers of this program write to
00015  * panda3d@yahoogroups.com .
00016  *
00017  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00018 
00019 /* This file is included at the beginning of every header file and/or
00020    C or C++ file.  It must be compilable for C as well as C++ files,
00021    so no C++-specific code or syntax can be put here.  See
00022    dtoolbase_cc.h for C++-specific stuff. */
00023 
00024 #ifndef DTOOLBASE_H
00025 #define DTOOLBASE_H
00026 
00027 #include <dtool_config.h>
00028 
00029 #ifdef WIN32_VC
00030 /* These warning pragmas must appear before anything else for VC++ to
00031    respect them.  Sheesh. */
00032 
00033 /* C4231: extern before template instantiation */
00034 /* For some reason, this particular warning won't disable. */
00035 #pragma warning (disable : 4231)
00036 /* C4786: 255 char debug symbols */
00037 #pragma warning (disable : 4786)
00038 /* C4251: needs dll interface */
00039 #pragma warning (disable : 4251)
00040 /* C4503: decorated name length exceeded */
00041 #pragma warning (disable : 4503)
00042 /* C4305: truncation from 'const double' to 'float' */
00043 #pragma warning (disable : 4305)
00044 /* C4250: 'myclass' : inherits 'baseclass::member' via dominance */
00045 #pragma warning (disable : 4250)
00046 /* C4355: 'this' : used in base member initializer list */
00047 #pragma warning (disable : 4355)
00048 /* C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data */
00049 #pragma warning (disable : 4244)
00050 
00051 #if _MSC_VER >= 1300
00052  #if _MSC_VER >= 1310
00053    #define USING_MSVC7_1
00054 //#pragma message("VC 7.1")    
00055  #else
00056 //#pragma message("VC 7.0") 
00057  #endif
00058 #define USING_MSVC7
00059 #else 
00060 // #pragma message("VC 6.0")
00061 #endif
00062 
00063 // Use NODEFAULT to optimize a switch() stmt to tell MSVC to automatically go to the final untested case 
00064 // after it has failed all the other cases (i.e. 'assume at least one of the cases is always true')
00065 #ifdef _DEBUG
00066 # define NODEFAULT  default: assert(0);
00067 #else
00068 # define NODEFAULT  default: __assume(0);   // special VC keyword
00069 #endif
00070 
00071 #else /* if !WIN32_VC */
00072 #ifdef _DEBUG
00073 # define NODEFAULT   default: assert(0);
00074 #else
00075 # define NODEFAULT
00076 #endif
00077 #endif  /* WIN32_VC */
00078 
00079 #include "dtoolsymbols.h"
00080 
00081 #ifdef HAVE_MALLOC_H
00082 #include <malloc.h>
00083 #endif
00084 
00085 #ifdef HAVE_ALLOCA_H
00086 #include <alloca.h>
00087 #endif
00088 
00089 #ifdef HAVE_UNISTD_H
00090 #include <unistd.h>
00091 #endif
00092 
00093 #ifdef HAVE_IO_H
00094 #include <io.h>
00095 #endif
00096 
00097 #ifdef HAVE_MINMAX_H
00098 #include <minmax.h>
00099 #endif
00100 
00101 #ifdef HAVE_SYS_TYPES_H
00102 #include <sys/types.h>
00103 #endif
00104 
00105 #ifdef HAVE_SYS_TIME_H
00106 #include <sys/time.h>
00107 #endif
00108 
00109 
00110 #ifdef CPPPARSER
00111 #include <stdtypedefs.h>
00112 #endif
00113 
00114 /*
00115  We define the macros BEGIN_PUBLISH and END_PUBLISH to bracket
00116  functions and global variable definitions that are to be published
00117  via interrogate to scripting languages.
00118  */
00119 #ifdef CPPPARSER
00120 #define BEGIN_PUBLISH __begin_publish
00121 #define END_PUBLISH __end_publish
00122 #else
00123 #define BEGIN_PUBLISH
00124 #define END_PUBLISH
00125 #endif
00126 
00127 #ifdef __cplusplus
00128 #include "dtoolbase_cc.h"
00129 #endif
00130 
00131 #endif
00132 

Generated on Thu May 1 22:12:58 2003 for DTool by doxygen1.3